lkml.org 
[lkml]   [2008]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 11/22] vfs: utimes immutable fix
    From: Miklos Szeredi <mszeredi@suse.cz>

    If updating file times to the current time and using a file
    descriptor, then don't check for immutable inode, only if the file is
    opened for write. In this case immutability has been checked at open
    time. This is the same as how write() and ftruncate() are handled.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    CC: Ulrich Drepper <drepper@redhat.com>
    ---
    fs/utimes.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6/fs/utimes.c
    ===================================================================
    --- linux-2.6.orig/fs/utimes.c 2008-05-16 17:50:45.000000000 +0200
    +++ linux-2.6/fs/utimes.c 2008-05-16 17:50:47.000000000 +0200
    @@ -130,7 +130,7 @@ long do_utimes(int dfd, char __user *fil
    if (!times || (nsec_special(times[0].tv_nsec) &&
    nsec_special(times[1].tv_nsec))) {
    error = -EACCES;
    - if (IS_IMMUTABLE(inode))
    + if (!f && IS_IMMUTABLE(inode))
    goto mnt_drop_write_and_out;

    if (!is_owner_or_cap(inode)) {
    --


    \
     
     \ /
      Last update: 2008-05-16 18:37    [W:0.023 / U:122.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site