lkml.org 
[lkml]   [2012]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2 RESEND] POSIX-compliant version of fchmodat with flag argument
Date
Hi,

The below patches implement a 4 argument version of fchmodat (fchmodat4)
that has a flag argument, as specified by POSIX. This is needed to
implement a proper glibc wrapper.

fchmodat4 supports the same two flags as fchownat: AT_SYMLINK_NOFOLLOW
and AT_EMPTY_PATH.

Besides the POSIX-compliance, this patch will make it possible to
ensure, in a race-free way, that you do not follow symlinks when
chmodding. Previously, you could open a file with O_NOFOLLOW and fchmod
it, but this only worked if you had read or write permissions on the
file. Now you can open the file with O_PATH|O_NOFOLLOW and do fchmodat
with AT_EMPTY_PATH.

Could this patch be applied? Any feedback is welcome.

Cheers,
Andrew


\
 
 \ /
  Last update: 2012-01-13 02:57    [W:0.044 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site