Changeset 919 for vendor/current/source3/modules
- Timestamp:
- Jun 9, 2016, 2:17:22 PM (9 years ago)
- Location:
- vendor/current/source3/modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/modules/vfs_acl_common.c
r860 r919 24 24 #include "../libcli/security/security.h" 25 25 #include "../librpc/gen_ndr/ndr_security.h" 26 #include "../lib/util/bitmap.h" 26 27 27 28 static NTSTATUS create_acl_blob(const struct security_descriptor *psd, -
vendor/current/source3/modules/vfs_full_audit.c
r917 r919 65 65 #include "auth.h" 66 66 #include "ntioctl.h" 67 #include "lib/util/bitmap.h" 67 68 68 69 static int vfs_full_audit_debug_level = DBGC_VFS; -
vendor/current/source3/modules/vfs_shadow_copy2.c
r917 r919 22 22 #include "includes.h" 23 23 #include "smbd/smbd.h" 24 #include "smbd/globals.h" 25 #include "../libcli/security/security.h" 24 26 #include "system/filesys.h" 25 27 #include "ntioctl.h" … … 765 767 } 766 768 769 static bool check_access_snapdir(struct vfs_handle_struct *handle, 770 const char *path) 771 { 772 struct smb_filename smb_fname; 773 int ret; 774 NTSTATUS status; 775 uint32_t access_granted = 0; 776 777 ZERO_STRUCT(smb_fname); 778 smb_fname.base_name = talloc_asprintf(talloc_tos(), 779 "%s", 780 path); 781 if (smb_fname.base_name == NULL) { 782 return false; 783 } 784 785 ret = SMB_VFS_NEXT_STAT(handle, &smb_fname); 786 if (ret != 0 || !S_ISDIR(smb_fname.st.st_ex_mode)) { 787 TALLOC_FREE(smb_fname.base_name); 788 return false; 789 } 790 791 status = smbd_check_open_rights(handle->conn, 792 &smb_fname, 793 SEC_DIR_LIST, 794 &access_granted); 795 if (!NT_STATUS_IS_OK(status)) { 796 DEBUG(0,("user does not have list permission " 797 "on snapdir %s\n", 798 smb_fname.base_name)); 799 TALLOC_FREE(smb_fname.base_name); 800 return false; 801 } 802 TALLOC_FREE(smb_fname.base_name); 803 return true; 804 } 805 767 806 static int shadow_copy2_rmdir(vfs_handle_struct *handle, const char *fname) 768 807 { … … 878 917 TALLOC_CTX *tmp_ctx = talloc_new(handle->data); 879 918 char *snapshot; 919 bool ret; 880 920 881 921 snapdir = shadow_copy2_find_snapdir(tmp_ctx, handle); … … 884 924 handle->conn->connectpath)); 885 925 errno = EINVAL; 926 talloc_free(tmp_ctx); 927 return -1; 928 } 929 ret = check_access_snapdir(handle, snapdir); 930 if (!ret) { 931 DEBUG(0,("access denied on listing snapdir %s\n", snapdir)); 932 errno = EACCES; 886 933 talloc_free(tmp_ctx); 887 934 return -1;
Note:
See TracChangeset
for help on using the changeset viewer.