Ignore:
Timestamp:
Jun 17, 2009, 2:19:52 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.3 branch to 3.3.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/posix_acls.c

    r224 r274  
    11181118                return True;
    11191119
    1120         /* Assume that the current user is in the current group (force group) */
    1121 
    1122         if (uid_ace->unix_ug.uid == current_user.ut.uid && group_ace->unix_ug.gid == current_user.ut.gid)
    1123                 return True;
     1120        /*
     1121         * if it's the current user, we already have the unix token
     1122         * and don't need to do the complex user_in_group_sid() call
     1123         */
     1124        if (uid_ace->unix_ug.uid == current_user.ut.uid) {
     1125                size_t i;
     1126
     1127                if (group_ace->unix_ug.gid == current_user.ut.gid) {
     1128                        return True;
     1129                }
     1130
     1131                for (i=0; i < current_user.ut.ngroups; i++) {
     1132                        if (group_ace->unix_ug.gid == current_user.ut.groups[i]) {
     1133                                return True;
     1134                        }
     1135                }
     1136        }
    11241137
    11251138        /* u_name talloc'ed off tos. */
     
    11281141                return False;
    11291142        }
     1143
     1144        /* notice that this is not reliable for users exported by winbindd! */
    11301145        return user_in_group_sid(u_name, &group_ace->trustee);
    11311146}
Note: See TracChangeset for help on using the changeset viewer.