Changeset 745 for trunk/server/source3/modules/vfs_recycle.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/modules/vfs_recycle.c
r414 r745 24 24 25 25 #include "includes.h" 26 #include "smbd/smbd.h" 27 #include "system/filesys.h" 28 #include "../librpc/gen_ndr/ndr_netlogon.h" 29 #include "auth.h" 26 30 27 31 #define ALLOC_CHECK(ptr, label) do { if ((ptr) == NULL) { DEBUG(0, ("recycle.bin: out of memory!\n")); errno = ENOMEM; goto label; } } while(0) … … 62 66 { 63 67 const char *tmp_str = NULL; 64 65 68 66 69 tmp_str = lp_parm_const_string(SNUM(handle->conn), "recycle", "repository",".recycle"); 67 70 68 71 DEBUG(10, ("recycle: repository = %s\n", tmp_str)); 69 72 70 73 return tmp_str; 71 74 } … … 74 77 { 75 78 bool ret; 76 79 77 80 ret = lp_parm_bool(SNUM(handle->conn), "recycle", "keeptree", False); 78 81 79 82 DEBUG(10, ("recycle_bin: keeptree = %s\n", ret?"True":"False")); 80 83 81 84 return ret; 82 85 } … … 89 92 90 93 DEBUG(10, ("recycle: versions = %s\n", ret?"True":"False")); 91 94 92 95 return ret; 93 96 } … … 100 103 101 104 DEBUG(10, ("recycle: touch = %s\n", ret?"True":"False")); 102 105 103 106 return ret; 104 107 } … … 111 114 112 115 DEBUG(10, ("recycle: touch_mtime = %s\n", ret?"True":"False")); 113 116 114 117 return ret; 115 118 } … … 118 121 { 119 122 const char **tmp_lp; 120 123 121 124 tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "exclude", NULL); 122 125 123 126 DEBUG(10, ("recycle: exclude = %s ...\n", tmp_lp?*tmp_lp:"")); 124 127 125 128 return tmp_lp; 126 129 } … … 129 132 { 130 133 const char **tmp_lp; 131 134 132 135 tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "exclude_dir", NULL); 133 136 134 137 DEBUG(10, ("recycle: exclude_dir = %s ...\n", tmp_lp?*tmp_lp:"")); 135 138 136 139 return tmp_lp; 137 140 } … … 140 143 { 141 144 const char **tmp_lp; 142 145 143 146 tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "noversions", NULL); 144 147 145 148 DEBUG(10, ("recycle: noversions = %s\n", tmp_lp?*tmp_lp:"")); 146 149 147 150 return tmp_lp; 148 151 } … … 151 154 { 152 155 SMB_OFF_T maxsize; 153 156 154 157 maxsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn), 155 158 "recycle", "maxsize", NULL)); 156 159 157 160 DEBUG(10, ("recycle: maxsize = %lu\n", (long unsigned int)maxsize)); 158 161 159 162 return maxsize; 160 163 } … … 163 166 { 164 167 SMB_OFF_T minsize; 165 168 166 169 minsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn), 167 170 "recycle", "minsize", NULL)); 168 171 169 172 DEBUG(10, ("recycle: minsize = %lu\n", (long unsigned int)minsize)); 170 173 171 174 return minsize; 172 175 } … … 465 468 466 469 repository = talloc_sub_advanced(NULL, lp_servicename(SNUM(conn)), 467 conn->se rver_info->unix_name,470 conn->session_info->unix_name, 468 471 conn->connectpath, 469 conn->se rver_info->utok.gid,470 conn->se rver_info->sanitized_username,471 pdb_get_domain(conn->server_info->sam_account),472 conn->session_info->utok.gid, 473 conn->session_info->sanitized_username, 474 conn->session_info->info3->base.domain.string, 472 475 recycle_repository(handle)); 473 476 ALLOC_CHECK(repository, done); … … 475 478 /* Yes :-). JRA. */ 476 479 trim_char(repository, '\0', '/'); 477 480 478 481 if(!repository || *(repository) == '\0') { 479 482 DEBUG(3, ("recycle: repository path not set, purging %s...\n", … … 674 677 if (!NT_STATUS_IS_OK(ret)) 675 678 return ret; 676 679 677 680 vfs_recycle_debug_level = debug_add_class("recycle"); 678 681 if (vfs_recycle_debug_level == -1) { … … 682 685 DEBUG(10, ("vfs_recycle: Debug class number of 'recycle': %d\n", vfs_recycle_debug_level)); 683 686 } 684 687 685 688 return ret; 686 689 }
Note:
See TracChangeset
for help on using the changeset viewer.