]> git.baikalelectronics.ru Git - kernel.git/commit
Fix permission checking for the new utimensat() system call
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 8 Jul 2007 19:02:55 +0000 (12:02 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 8 Jul 2007 19:02:55 +0000 (12:02 -0700)
commit667de0d63c0265263fab6b79b375a0490d87cfa0
tree333a9686bbebefd85e1854f1b234a0fc0f75d77b
parent615150293827f9679c1d2d9c799d7e1c3994b698
Fix permission checking for the new utimensat() system call

Commit 757df3309602077187f9fc029136eef2681141bc added the utimensat()
system call, but didn't handle the case of checking for the writability
of the target right, when the target was a file descriptor, not a
filename.

We cannot use vfs_permission(MAY_WRITE) for that case, and need to
simply check whether the file descriptor is writable.  The oops from
using the wrong function was noticed and narrowed down by Markus
Trippelsdorf.

Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/utimes.c