Changeset 274 for branches/samba-3.3.x/source/smbd/posix_acls.c
- Timestamp:
- Jun 17, 2009, 2:19:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/smbd/posix_acls.c
r224 r274 1118 1118 return True; 1119 1119 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 } 1124 1137 1125 1138 /* u_name talloc'ed off tos. */ … … 1128 1141 return False; 1129 1142 } 1143 1144 /* notice that this is not reliable for users exported by winbindd! */ 1130 1145 return user_in_group_sid(u_name, &group_ace->trustee); 1131 1146 }
Note:
See TracChangeset
for help on using the changeset viewer.