Changeset 733 for branches/samba-3.5.x/source3/modules
- Timestamp:
- Nov 12, 2012, 5:09:31 PM (13 years ago)
- Location:
- branches/samba-3.5.x/source3/modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source3/modules/vfs_acl_common.c
r732 r733 374 374 } 375 375 } 376 is_directory = S_ISDIR( sbuf.st_ex_mode);376 is_directory = S_ISDIR(psbuf->st_ex_mode); 377 377 378 378 if (ignore_file_system_acl) { … … 409 409 } 410 410 if (!(security_info & DACL_SECURITY_INFORMATION)) { 411 psd->type &= ~SEC_DESC_DACL_PRESENT; 411 412 psd->dacl = NULL; 412 413 } 413 414 if (!(security_info & SACL_SECURITY_INFORMATION)) { 415 psd->type &= ~SEC_DESC_SACL_PRESENT; 414 416 psd->sacl = NULL; 415 417 } … … 533 535 (SECINFO_OWNER | 534 536 SECINFO_GROUP | 535 SECINFO_DACL), 537 SECINFO_DACL | 538 SECINFO_SACL), 536 539 pp_parent_desc); 537 540 … … 616 619 (OWNER_SECURITY_INFORMATION | 617 620 GROUP_SECURITY_INFORMATION | 618 DACL_SECURITY_INFORMATION), 621 DACL_SECURITY_INFORMATION | 622 SACL_SECURITY_INFORMATION), 619 623 &pdesc); 620 624 if (NT_STATUS_IS_OK(status)) { … … 627 631 if (!NT_STATUS_IS_OK(status)) { 628 632 DEBUG(10,("open_acl_xattr: %s open " 633 "for access 0x%x (0x%x) " 629 634 "refused with error %s\n", 630 635 fsp_str_dbg(fsp), 636 (unsigned int)fsp->access_mask, 637 (unsigned int)access_granted, 631 638 nt_errstr(status) )); 632 639 goto err; … … 912 919 int ret; 913 920 921 /* Try the normal rmdir first. */ 914 922 ret = SMB_VFS_NEXT_RMDIR(handle, path); 915 if (!(ret == -1 && (errno == EACCES || errno == EPERM))) { 916 DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n", 917 path, 918 strerror(errno) )); 919 return ret; 920 } 921 922 return acl_common_remove_object(handle, 923 path, 924 true); 923 if (ret == 0) { 924 return 0; 925 } 926 if (errno == EACCES || errno == EPERM) { 927 /* Failed due to access denied, 928 see if we need to root override. */ 929 return acl_common_remove_object(handle, 930 path, 931 true); 932 } 933 934 DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n", 935 path, 936 strerror(errno) )); 937 return -1; 925 938 } 926 939 … … 1040 1053 int ret; 1041 1054 1055 /* Try the normal unlink first. */ 1042 1056 ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); 1043 if ( !(ret == -1 && (errno == EACCES || errno == EPERM))) {1044 DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n",1045 smb_fname->base_name,1046 strerror(errno) ));1047 return ret;1048 }1049 /* Don't do anything fancy for streams. */ 1050 if (smb_fname->stream_name) {1051 return ret;1052 }1053 1054 return acl_common_remove_object(handle,1057 if (ret == 0) { 1058 return 0; 1059 } 1060 if (errno == EACCES || errno == EPERM) { 1061 /* Failed due to access denied, 1062 see if we need to root override. */ 1063 1064 /* Don't do anything fancy for streams. */ 1065 if (smb_fname->stream_name) { 1066 return -1; 1067 } 1068 return acl_common_remove_object(handle, 1055 1069 smb_fname->base_name, 1056 1070 false); 1071 } 1072 1073 DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n", 1074 smb_fname->base_name, 1075 strerror(errno) )); 1076 return -1; 1057 1077 } 1058 1078 -
branches/samba-3.5.x/source3/modules/vfs_commit.c
r414 r733 232 232 } 233 233 234 return 0;234 return fd; 235 235 } 236 236
Note:
See TracChangeset
for help on using the changeset viewer.