cvs commit: src/sys/ufs/ufs ufs_vnops.c

Scott Long scottl at samsco.org
Thu Jun 1 09:58:18 UTC 2006


Maxim Konovalov wrote:

> maxim       2006-05-31 13:15:29 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/ufs/ufs          ufs_vnops.c 
>   Log:
>   o According to POSIX, the result of ftruncate(2) is unspecified
>   for file types other than VREG, VDIR and shared memory objects.
>   We already handle VREG, VLNK and VDIR cases.  Silently ignore
>   truncate requests for all the rest.  Adjust comments.
>   
>   PR:             kern/98064
>   Submitted by:   bde
>   Security:       local DoS
>   Regress. test:  regression/fifo/fifo_misc
>   MFC after:      2 weeks
>   
>   Revision  Changes    Path
>   1.276     +22 -4     src/sys/ufs/ufs/ufs_vnops.c

If POSIX says that the result is undefined, wouldn't it be in our
best interests to return EBADF instead of 0?  Or would that break
3rd party software?

Scott



More information about the cvs-src mailing list