Subject: kern/12861: fdesc doesn't handle append-only files well
To: None <>
From: Jaromír <>
List: netbsd-bugs
Date: 05/07/2001 19:34:45
>Number:         12861
>Category:       kern
>Synopsis:       fdesc doesn't handle append-only files well
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 07 10:35:00 PDT 2001
>Originator:     Jaromír Dolecek
>Release:        2001-05-07
System: NetBSD 1.5U NetBSD 1.5U (SARUMAN) #52: Fri May 4 08:44:44 CEST 2001 i386
Architecture: i386
Machine: i386
	If fdesc filesystem is used for /dev/fd, opening a
	/dev/fd/X entry with O_TRUNC on filedescriptor opened
	append-only can cause the target file to be truncated.
	This can bite e.g. for stdout (if fdesc is used, /dev/stdout
	is linked to /dev/fd/1), for example if a process opens /dev/stdout
	for write via fopen("/dev/stdout", "w").

	See also bin/12239 (worked around in rev. 1.24 of
	See above (and bin/12239).
	None provided, sorry.