Changeset 222 for branches/samba-3.3.x/source/locking/locking.c
- Timestamp:
- May 24, 2009, 7:45:16 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/locking/locking.c
r206 r222 1283 1283 *************************************************************************/ 1284 1284 1285 static UNIX_USER_TOKEN *copy_unix_token(TALLOC_CTX *ctx, UNIX_USER_TOKEN *tok)1285 static UNIX_USER_TOKEN *copy_unix_token(TALLOC_CTX *ctx, const UNIX_USER_TOKEN *tok) 1286 1286 { 1287 1287 UNIX_USER_TOKEN *cpy; … … 1314 1314 ****************************************************************************/ 1315 1315 1316 void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok)1316 void set_delete_on_close_token(struct share_mode_lock *lck, const UNIX_USER_TOKEN *tok) 1317 1317 { 1318 1318 TALLOC_FREE(lck->delete_token); /* Also deletes groups... */ … … 1334 1334 ****************************************************************************/ 1335 1335 1336 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok)1336 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, const UNIX_USER_TOKEN *tok) 1337 1337 { 1338 1338 if (lck->delete_on_close != delete_on_close) { … … 1346 1346 } 1347 1347 1348 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok) 1349 { 1348 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USER_TOKEN *tok) 1349 { 1350 UNIX_USER_TOKEN *tok_copy = NULL; 1350 1351 struct share_mode_lock *lck; 1351 1352 … … 1359 1360 if (lck == NULL) { 1360 1361 return False; 1362 } 1363 1364 if (fsp->conn->admin_user) { 1365 tok_copy = copy_unix_token(lck, tok); 1366 tok_copy->uid = (uid_t)0; 1367 if (tok_copy == NULL) { 1368 TALLOC_FREE(lck); 1369 return false; 1370 } 1371 tok = tok_copy; 1361 1372 } 1362 1373
Note:
See TracChangeset
for help on using the changeset viewer.