Changeset 566

Show
Ignore:
Timestamp:
03/01/07 19:27:59 (2 years ago)
Author:
chtekk
Message:

Fix SUID setting on file copy (chown clears SUID, crazy wtf behaviour, check man 2 chown).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vcd/methods/vx/vx_create.c

    r561 r566  
    190190        } 
    191191 
    192         if (do_chmod && fchmodat(vdirfd, fpath, sb->st_mode, 0) == -1) { 
    193                 method_set_sys_faultf(global_env, "fchmodat(%s)", fpath); 
    194                 return FTW_STOP; 
    195         } 
    196  
    197192        if (do_chown && fchownat(vdirfd, fpath, sb->st_uid, 
    198193                        sb->st_gid, AT_SYMLINK_NOFOLLOW) == -1) { 
    199194                method_set_sys_faultf(global_env, "fchownat(%s)", fpath); 
     195                return FTW_STOP; 
     196        } 
     197 
     198        if (do_chmod && fchmodat(vdirfd, fpath, sb->st_mode, 0) == -1) { 
     199                method_set_sys_faultf(global_env, "fchmodat(%s)", fpath); 
    200200                return FTW_STOP; 
    201201        }