Changeset 8506

Show
Ignore:
Timestamp:
09/20/10 16:10:37 (3 years ago)
Author:
bligon
Message:

Changed the ".perms" value for the unstuff state machine from PINT_SERVER_CHECK_WRITE to
PINT_SERVER_CHECK_ATTR. The CHECK_WRITE perms value caused the unstuff machine to check
file permissions for the user, even when the user was the owner. This security check
caused a problem with the "tar" command when it tried to untar a file having only
444 permissions on it. The "tar" command used the system call
open(<filename>,O_CREAT|O_WRONLY|O_EXCL,444). According to the Linux man page, this
combination of open parameters should be allowable. ext3, ext4, and qfs all
allowed this combination. NOTE: PINT_SERVER_CHECK_ATTR allows the owner of the
file to perform an unstuff, no file permissions are checked. If the user is not
the owner, then file permissions are checked.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/server/unstuff.sm

    r8201 r8506  
    478478{ 
    479479    .string_name = "unstuff", 
    480     .perm = PINT_SERVER_CHECK_WRITE, 
     480    .perm = PINT_SERVER_CHECK_ATTR, 
    481481    .access_type = PINT_server_req_modify, 
    482482    .sched_policy = PINT_SERVER_REQ_SCHEDULE,