Bug 633

Summary: futimes() should not fail with ENOENT
Product: glibc Reporter: Dmitry V. Levin <ldv>
Component: libcAssignee: Roland McGrath <roland>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: 2.3.4   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on:    
Bug Blocks: 724    
Attachments: glibc-alt-futimes.patch

Description Dmitry V. Levin 2005-01-03 23:20:42 UTC
On linux where no futimes syscall available, futimes wrapper uses /proc
filesystem and utimes/utime.
When /proc is not available, this wrapper fails with undocumented ENOENT instead
of documented ENOSYS.
Comment 1 Dmitry V. Levin 2005-01-03 23:22:06 UTC
Created attachment 334 [details]
glibc-alt-futimes.patch

Proposed patch.
Comment 2 Sourceware Commits 2005-01-07 02:43:00 UTC
Subject: Bug 633

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2005-01-07 02:42:55

Modified files:
	sysdeps/unix/sysv/linux: futimes.c 

Log message:
	2005-01-06  Roland McGrath  <roland@redhat.com>
	
	[BZ #633]
	* sysdeps/unix/sysv/linux/futimes.c (__futimes): Catch errno values
	indicating file-name lookup errors, and return ENOSYS or EBADF instead.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/futimes.c.diff?cvsroot=glibc&r1=1.6&r2=1.7

Comment 3 Roland McGrath 2005-01-07 02:43:34 UTC
Please try the patch in CVS and tell me if you have any more trouble.
Comment 4 Dmitry V. Levin 2005-01-18 17:45:04 UTC
Thank you for the patch, it fixes even more potential issues than my proposal.
Comment 5 Sourceware Commits 2005-02-16 10:47:37 UTC
Subject: Bug 633

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-16 10:47:27

Modified files:
	sysdeps/unix/sysv/linux: futimes.c 

Log message:
	2005-01-06  Roland McGrath  <roland@redhat.com>
	
	[BZ #633]
	* sysdeps/unix/sysv/linux/futimes.c (__futimes): Catch errno values
	indicating file-name lookup errors, and return ENOSYS or EBADF instead.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/futimes.c.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.6&r2=1.6.4.1