Changeset 746 for vendor/current/source3/rpc_server
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- Location:
- vendor/current/source3/rpc_server
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/rpc_server/lsa/srv_lsa_nt.c
r740 r746 2449 2449 struct security_descriptor *psd; 2450 2450 size_t sd_size; 2451 uint32_t owner_access = (LSA_ACCOUNT_ALL_ACCESS & 2452 ~(LSA_ACCOUNT_ADJUST_PRIVILEGES| 2453 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS| 2454 SEC_STD_DELETE)); 2451 2455 2452 2456 /* find the connection policy handle. */ … … 2474 2478 status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size, 2475 2479 &lsa_account_mapping, 2476 r->in.sid, LSA_POLICY_ALL_ACCESS);2480 r->in.sid, owner_access); 2477 2481 if (!NT_STATUS_IS_OK(status)) { 2478 2482 return status; … … 2515 2519 uint32_t des_access = r->in.access_mask; 2516 2520 uint32_t acc_granted; 2521 uint32_t owner_access = (LSA_ACCOUNT_ALL_ACCESS & 2522 ~(LSA_ACCOUNT_ADJUST_PRIVILEGES| 2523 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS| 2524 SEC_STD_DELETE)); 2517 2525 NTSTATUS status; 2518 2526 … … 2539 2547 status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size, 2540 2548 &lsa_account_mapping, 2541 r->in.sid, LSA_ACCOUNT_ALL_ACCESS);2549 r->in.sid, owner_access); 2542 2550 if (!NT_STATUS_IS_OK(status)) { 2543 2551 return status; … … 2887 2895 status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size, 2888 2896 &lsa_account_mapping, 2889 r->in.sid, LSA_ACCOUNT_ALL_ACCESS);2897 NULL, 0); 2890 2898 if (!NT_STATUS_IS_OK(status)) { 2891 2899 return status; … … 2958 2966 status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size, 2959 2967 &lsa_account_mapping, 2960 r->in.sid, LSA_ACCOUNT_ALL_ACCESS);2968 NULL, 0); 2961 2969 if (!NT_STATUS_IS_OK(status)) { 2962 2970 return status; -
vendor/current/source3/rpc_server/netlogon/srv_netlog_nt.c
r740 r746 1121 1121 } 1122 1122 1123 become_root(); 1123 1124 status = samr_find_machine_account(mem_ctx, 1124 1125 h, … … 1128 1129 NULL, 1129 1130 &user_handle); 1131 unbecome_root(); 1130 1132 if (!NT_STATUS_IS_OK(status)) { 1131 1133 goto out; … … 1171 1173 info->info18 = info18; 1172 1174 1175 become_root(); 1173 1176 status = dcerpc_samr_SetUserInfo2(h, 1174 1177 mem_ctx, … … 1177 1180 info, 1178 1181 &result); 1182 unbecome_root(); 1179 1183 if (!NT_STATUS_IS_OK(status)) { 1180 1184 goto out; … … 1248 1252 { 1249 1253 NTSTATUS status; 1250 struct netlogon_creds_CredentialState *creds ;1254 struct netlogon_creds_CredentialState *creds = NULL; 1251 1255 DATA_BLOB plaintext; 1252 1256 struct samr_CryptPassword password_buf; … … 1262 1266 1263 1267 if (!NT_STATUS_IS_OK(status)) { 1268 const char *computer_name = "<unknown>"; 1269 1270 if (creds && creds->computer_name) { 1271 computer_name = creds->computer_name; 1272 } 1264 1273 DEBUG(2,("_netr_ServerPasswordSet2: netlogon_creds_server_step " 1265 1274 "failed. Rejecting auth request from client %s machine account %s\n", 1266 r->in.computer_name, c reds->computer_name));1275 r->in.computer_name, computer_name)); 1267 1276 TALLOC_FREE(creds); 1268 1277 return status; … … 1274 1283 1275 1284 if (!extract_pw_from_buffer(p->mem_ctx, password_buf.data, &plaintext)) { 1285 TALLOC_FREE(creds); 1276 1286 return NT_STATUS_WRONG_PASSWORD; 1277 1287 } … … 1284 1294 creds->account_name, 1285 1295 &nt_hash); 1296 TALLOC_FREE(creds); 1286 1297 return status; 1287 1298 } -
vendor/current/source3/rpc_server/samr/srv_samr_nt.c
r740 r746 2825 2825 2826 2826 must_change_time = pdb_get_pass_must_change_time(pw); 2827 if ( must_change_time == get_time_t_max()) {2827 if (pdb_is_password_change_time_max(must_change_time)) { 2828 2828 unix_to_nt_time_abs(&force_password_change, must_change_time); 2829 2829 } else { -
vendor/current/source3/rpc_server/spoolss/srv_spoolss_nt.c
r740 r746 296 296 if (prn_hnd->notify.cli_chan) { 297 297 prn_hnd->notify.cli_chan->active_connections--; 298 prn_hnd->notify.cli_chan = NULL; 298 299 } 299 300 } … … 2042 2043 }; 2043 2044 2045 static const int drv_cversion[] = {SPOOLSS_DRIVER_VERSION_9X, 2046 SPOOLSS_DRIVER_VERSION_NT35, 2047 SPOOLSS_DRIVER_VERSION_NT4, 2048 SPOOLSS_DRIVER_VERSION_200X, 2049 -1}; 2050 2044 2051 static int get_version_id(const char *arch) 2045 2052 { … … 2064 2071 2065 2072 struct spoolss_DriverInfo8 *info = NULL; 2066 struct spoolss_DriverInfo8 *info_win2k = NULL;2067 2073 int version; 2068 2074 WERROR status; 2069 2075 struct dcerpc_binding_handle *b; 2076 TALLOC_CTX *tmp_ctx = NULL; 2077 int i; 2078 bool found; 2070 2079 2071 2080 /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, … … 2089 2098 return WERR_INVALID_ENVIRONMENT; 2090 2099 2091 status = winreg_printer_binding_handle(p->mem_ctx, 2100 tmp_ctx = talloc_new(p->mem_ctx); 2101 if (!tmp_ctx) { 2102 return WERR_NOMEM; 2103 } 2104 2105 status = winreg_printer_binding_handle(tmp_ctx, 2092 2106 get_session_info_system(), 2093 2107 p->msg_ctx, 2094 2108 &b); 2095 2109 if (!W_ERROR_IS_OK(status)) { 2096 return status; 2097 } 2098 2099 status = winreg_get_driver(p->mem_ctx, b, 2100 r->in.architecture, r->in.driver, 2101 version, &info); 2102 if (!W_ERROR_IS_OK(status)) { 2103 /* try for Win2k driver if "Windows NT x86" */ 2104 2105 if ( version == 2 ) { 2106 version = 3; 2107 2108 status = winreg_get_driver(p->mem_ctx, b, 2109 r->in.architecture, 2110 r->in.driver, 2111 version, &info); 2112 if (!W_ERROR_IS_OK(status)) { 2113 status = WERR_UNKNOWN_PRINTER_DRIVER; 2114 goto done; 2115 } 2116 } 2117 /* otherwise it was a failure */ 2118 else { 2119 status = WERR_UNKNOWN_PRINTER_DRIVER; 2110 goto done; 2111 } 2112 2113 for (found = false, i = 0; drv_cversion[i] >= 0; i++) { 2114 status = winreg_get_driver(tmp_ctx, b, 2115 r->in.architecture, r->in.driver, 2116 drv_cversion[i], &info); 2117 if (!W_ERROR_IS_OK(status)) { 2118 DEBUG(5, ("skipping del of driver with version %d\n", 2119 drv_cversion[i])); 2120 continue; 2121 } 2122 found = true; 2123 2124 if (printer_driver_in_use(tmp_ctx, get_session_info_system(), 2125 p->msg_ctx, info)) { 2126 status = WERR_PRINTER_DRIVER_IN_USE; 2120 2127 goto done; 2121 2128 } 2122 2129 2123 } 2124 2125 if (printer_driver_in_use(p->mem_ctx, 2126 get_session_info_system(), 2127 p->msg_ctx, 2128 info)) { 2130 status = winreg_del_driver(tmp_ctx, b, info, drv_cversion[i]); 2131 if (!W_ERROR_IS_OK(status)) { 2132 DEBUG(0, ("failed del of driver with version %d\n", 2133 drv_cversion[i])); 2134 goto done; 2135 } 2136 } 2137 if (found == false) { 2138 DEBUG(0, ("driver %s not found for deletion\n", r->in.driver)); 2139 status = WERR_UNKNOWN_PRINTER_DRIVER; 2140 } else { 2141 status = WERR_OK; 2142 } 2143 2144 done: 2145 talloc_free(tmp_ctx); 2146 return status; 2147 } 2148 2149 static WERROR spoolss_dpd_version(TALLOC_CTX *mem_ctx, 2150 struct pipes_struct *p, 2151 struct spoolss_DeletePrinterDriverEx *r, 2152 struct dcerpc_binding_handle *b, 2153 struct spoolss_DriverInfo8 *info) 2154 { 2155 WERROR status; 2156 bool delete_files; 2157 2158 if (printer_driver_in_use(mem_ctx, get_session_info_system(), 2159 p->msg_ctx, info)) { 2129 2160 status = WERR_PRINTER_DRIVER_IN_USE; 2130 2161 goto done; 2131 2162 } 2132 2163 2133 if (version == 2) { 2134 status = winreg_get_driver(p->mem_ctx, b, 2135 r->in.architecture, 2136 r->in.driver, 3, &info_win2k); 2137 if (W_ERROR_IS_OK(status)) { 2138 /* if we get to here, we now have 2 driver info structures to remove */ 2139 /* remove the Win2k driver first*/ 2140 2141 status = winreg_del_driver(p->mem_ctx, b, 2142 info_win2k, 3); 2143 talloc_free(info_win2k); 2144 2145 /* this should not have failed---if it did, report to client */ 2146 if (!W_ERROR_IS_OK(status)) { 2147 goto done; 2148 } 2149 } 2150 } 2151 2152 status = winreg_del_driver(p->mem_ctx, b, 2153 info, version); 2164 /* 2165 * we have a couple of cases to consider. 2166 * (1) Are any files in use? If so and DPD_DELETE_ALL_FILES is set, 2167 * then the delete should fail if **any** files overlap with 2168 * other drivers 2169 * (2) If DPD_DELETE_UNUSED_FILES is set, then delete all 2170 * non-overlapping files 2171 * (3) If neither DPD_DELETE_ALL_FILES nor DPD_DELETE_UNUSED_FILES 2172 * is set, then do not delete any files 2173 * Refer to MSDN docs on DeletePrinterDriverEx() for details. 2174 */ 2175 2176 delete_files = r->in.delete_flags 2177 & (DPD_DELETE_ALL_FILES | DPD_DELETE_UNUSED_FILES); 2178 2179 if (delete_files) { 2180 bool in_use = printer_driver_files_in_use(mem_ctx, 2181 get_session_info_system(), 2182 p->msg_ctx, 2183 info); 2184 if (in_use && (r->in.delete_flags & DPD_DELETE_ALL_FILES)) { 2185 status = WERR_PRINTER_DRIVER_IN_USE; 2186 goto done; 2187 } 2188 /* 2189 * printer_driver_files_in_use() has trimmed overlapping files 2190 * from info so they are not removed on DPD_DELETE_UNUSED_FILES 2191 */ 2192 } 2193 2194 status = winreg_del_driver(mem_ctx, b, info, info->version); 2195 if (!W_ERROR_IS_OK(status)) { 2196 goto done; 2197 } 2198 2199 /* 2200 * now delete any associated files if delete_files is 2201 * true. Even if this part failes, we return succes 2202 * because the driver doesn not exist any more 2203 */ 2204 if (delete_files) { 2205 delete_driver_files(get_session_info_system(), info); 2206 } 2154 2207 2155 2208 done: 2156 talloc_free(info);2157 2158 2209 return status; 2159 2210 } … … 2166 2217 struct spoolss_DeletePrinterDriverEx *r) 2167 2218 { 2168 struct spoolss_DriverInfo8 *info = NULL; 2169 struct spoolss_DriverInfo8 *info_win2k = NULL; 2170 int version; 2171 bool delete_files; 2219 struct spoolss_DriverInfo8 *info = NULL; 2172 2220 WERROR status; 2173 2221 struct dcerpc_binding_handle *b; 2222 TALLOC_CTX *tmp_ctx = NULL; 2223 int i; 2224 bool found; 2174 2225 2175 2226 /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, … … 2188 2239 2189 2240 /* check that we have a valid driver name first */ 2190 if ( (version = get_version_id(r->in.architecture)) == -1) {2241 if (get_version_id(r->in.architecture) == -1) { 2191 2242 /* this is what NT returns */ 2192 2243 return WERR_INVALID_ENVIRONMENT; 2193 2244 } 2194 2245 2195 if (r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION) 2196 version = r->in.version; 2197 2198 status = winreg_printer_binding_handle(p->mem_ctx, 2246 tmp_ctx = talloc_new(p->mem_ctx); 2247 if (!tmp_ctx) { 2248 return WERR_NOMEM; 2249 } 2250 2251 status = winreg_printer_binding_handle(tmp_ctx, 2199 2252 get_session_info_system(), 2200 2253 p->msg_ctx, 2201 2254 &b); 2202 2255 if (!W_ERROR_IS_OK(status)) { 2203 return status; 2204 } 2205 2206 status = winreg_get_driver(p->mem_ctx, b, 2207 r->in.architecture, 2208 r->in.driver, 2209 version, 2210 &info); 2211 if (!W_ERROR_IS_OK(status)) { 2256 goto done; 2257 } 2258 2259 for (found = false, i = 0; drv_cversion[i] >= 0; i++) { 2260 if ((r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION) 2261 && (drv_cversion[i] != r->in.version)) { 2262 continue; 2263 } 2264 2265 /* check if a driver with this version exists before delete */ 2266 status = winreg_get_driver(tmp_ctx, b, 2267 r->in.architecture, r->in.driver, 2268 drv_cversion[i], &info); 2269 if (!W_ERROR_IS_OK(status)) { 2270 DEBUG(5, ("skipping del of driver with version %d\n", 2271 drv_cversion[i])); 2272 continue; 2273 } 2274 found = true; 2275 2276 status = spoolss_dpd_version(tmp_ctx, p, r, b, info); 2277 if (!W_ERROR_IS_OK(status)) { 2278 DEBUG(0, ("failed to delete driver with version %d\n", 2279 drv_cversion[i])); 2280 goto done; 2281 } 2282 } 2283 if (found == false) { 2284 DEBUG(0, ("driver %s not found for deletion\n", r->in.driver)); 2212 2285 status = WERR_UNKNOWN_PRINTER_DRIVER; 2213 2214 /* 2215 * if the client asked for a specific version, 2216 * or this is something other than Windows NT x86, 2217 * then we've failed 2218 */ 2219 2220 if ( (r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION) || (version !=2) ) 2221 goto done; 2222 2223 /* try for Win2k driver if "Windows NT x86" */ 2224 2225 version = 3; 2226 status = winreg_get_driver(info, b, 2227 r->in.architecture, 2228 r->in.driver, 2229 version, &info); 2230 if (!W_ERROR_IS_OK(status)) { 2231 status = WERR_UNKNOWN_PRINTER_DRIVER; 2232 goto done; 2233 } 2234 } 2235 2236 if (printer_driver_in_use(info, 2237 get_session_info_system(), 2238 p->msg_ctx, 2239 info)) { 2240 status = WERR_PRINTER_DRIVER_IN_USE; 2241 goto done; 2242 } 2243 2244 /* 2245 * we have a couple of cases to consider. 2246 * (1) Are any files in use? If so and DPD_DELTE_ALL_FILE is set, 2247 * then the delete should fail if **any** files overlap with 2248 * other drivers 2249 * (2) If DPD_DELTE_UNUSED_FILES is sert, then delete all 2250 * non-overlapping files 2251 * (3) If neither DPD_DELTE_ALL_FILE nor DPD_DELTE_ALL_FILES 2252 * is set, the do not delete any files 2253 * Refer to MSDN docs on DeletePrinterDriverEx() for details. 2254 */ 2255 2256 delete_files = r->in.delete_flags & (DPD_DELETE_ALL_FILES|DPD_DELETE_UNUSED_FILES); 2257 2258 /* fail if any files are in use and DPD_DELETE_ALL_FILES is set */ 2259 2260 if (delete_files && 2261 (r->in.delete_flags & DPD_DELETE_ALL_FILES) && 2262 printer_driver_files_in_use(info, 2263 get_session_info_system(), 2264 p->msg_ctx, 2265 info)) { 2266 /* no idea of the correct error here */ 2267 status = WERR_ACCESS_DENIED; 2268 goto done; 2269 } 2270 2271 2272 /* also check for W32X86/3 if necessary; maybe we already have? */ 2273 2274 if ( (version == 2) && ((r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION) != DPD_DELETE_SPECIFIC_VERSION) ) { 2275 status = winreg_get_driver(info, b, 2276 r->in.architecture, 2277 r->in.driver, 3, &info_win2k); 2278 if (W_ERROR_IS_OK(status)) { 2279 2280 if (delete_files && 2281 (r->in.delete_flags & DPD_DELETE_ALL_FILES) && 2282 printer_driver_files_in_use(info, 2283 get_session_info_system(), 2284 p->msg_ctx, 2285 info_win2k)) { 2286 /* no idea of the correct error here */ 2287 talloc_free(info_win2k); 2288 status = WERR_ACCESS_DENIED; 2289 goto done; 2290 } 2291 2292 /* if we get to here, we now have 2 driver info structures to remove */ 2293 /* remove the Win2k driver first*/ 2294 2295 status = winreg_del_driver(info, b, 2296 info_win2k, 2297 3); 2298 2299 /* this should not have failed---if it did, report to client */ 2300 2301 if (!W_ERROR_IS_OK(status)) { 2302 goto done; 2303 } 2304 2305 /* 2306 * now delete any associated files if delete_files is 2307 * true. Even if this part failes, we return succes 2308 * because the driver doesn not exist any more 2309 */ 2310 if (delete_files) { 2311 delete_driver_files(get_session_info_system(), 2312 info_win2k); 2313 } 2314 } 2315 } 2316 2317 status = winreg_del_driver(info, b, 2318 info, 2319 version); 2320 if (!W_ERROR_IS_OK(status)) { 2321 goto done; 2322 } 2323 2324 /* 2325 * now delete any associated files if delete_files is 2326 * true. Even if this part failes, we return succes 2327 * because the driver doesn not exist any more 2328 */ 2329 if (delete_files) { 2330 delete_driver_files(get_session_info_system(), info); 2286 } else { 2287 status = WERR_OK; 2331 2288 } 2332 2289 2333 2290 done: 2334 talloc_free( info);2291 talloc_free(tmp_ctx); 2335 2292 return status; 2336 2293 } … … 3263 3220 TALLOC_CTX *mem_ctx) 3264 3221 { 3265 SETUP_SPOOLSS_NOTIFY_DATA_INTEGER(data, queue-> job);3222 SETUP_SPOOLSS_NOTIFY_DATA_INTEGER(data, queue->sysjob); 3266 3223 } 3267 3224 … … 3696 3653 } 3697 3654 3655 /* 3656 * When sending a PRINTER_NOTIFY_FIELD_SERVER_NAME we should send the 3657 * correct servername. 3658 */ 3659 pinfo2->servername = talloc_strdup(pinfo2, Printer->servername); 3660 if (pinfo2->servername == NULL) { 3661 return WERR_NOMEM; 3662 } 3663 3698 3664 for (i=0; i<option->count; i++) { 3699 3665 option_type = option->types[i]; … … 3720 3686 pinfo2, snum, 3721 3687 &option_type, 3722 queue[j]. job,3688 queue[j].sysjob, 3723 3689 mem_ctx); 3724 3690 } … … 6818 6784 t = gmtime(&queue->time); 6819 6785 6820 r->job_id = queue-> job;6786 r->job_id = queue->sysjob; 6821 6787 6822 6788 r->printer_name = talloc_strdup(mem_ctx, lp_servicename(snum)); … … 6859 6825 t = gmtime(&queue->time); 6860 6826 6861 r->job_id = queue-> job;6827 r->job_id = queue->sysjob; 6862 6828 6863 6829 r->printer_name = talloc_strdup(mem_ctx, lp_servicename(snum)); … … 6912 6878 struct spoolss_PrinterInfo2 *pinfo2) 6913 6879 { 6914 r->job_id = queue-> job;6880 r->job_id = queue->sysjob; 6915 6881 r->next_job_id = 0; 6916 6882 if (next_queue) { 6917 r->next_job_id = next_queue-> job;6883 r->next_job_id = next_queue->sysjob; 6918 6884 } 6919 6885 r->reserved = 0; … … 7224 7190 break; 7225 7191 case SPOOLSS_JOB_CONTROL_PAUSE: 7226 if (print_job_pause(session_info, p->msg_ctx, 7227 snum, r->in.job_id, &errcode)) { 7228 errcode = WERR_OK; 7229 } 7192 errcode = print_job_pause(session_info, p->msg_ctx, 7193 snum, r->in.job_id); 7230 7194 break; 7231 7195 case SPOOLSS_JOB_CONTROL_RESTART: 7232 7196 case SPOOLSS_JOB_CONTROL_RESUME: 7233 if (print_job_resume(session_info, p->msg_ctx, 7234 snum, r->in.job_id, &errcode)) { 7235 errcode = WERR_OK; 7236 } 7197 errcode = print_job_resume(session_info, p->msg_ctx, 7198 snum, r->in.job_id); 7237 7199 break; 7238 7200 case 0: … … 9063 9025 9064 9026 for (i=0; i<count; i++) { 9065 if (queue[i]. job == (int)jobid) {9027 if (queue[i].sysjob == (int)jobid) { 9066 9028 found = true; 9067 9029 break; … … 9098 9060 9099 9061 for (i=0; i<count; i++) { 9100 if (queue[i]. job == (int)jobid) {9062 if (queue[i].sysjob == (int)jobid) { 9101 9063 found = true; 9102 9064 break; … … 9116 9078 */ 9117 9079 9118 devmode = print_job_devmode( lp_const_servicename(snum), jobid);9080 devmode = print_job_devmode(mem_ctx, lp_const_servicename(snum), jobid); 9119 9081 if (!devmode) { 9120 9082 result = spoolss_create_default_devmode(mem_ctx, -
vendor/current/source3/rpc_server/srv_access_check.c
r740 r746 53 53 NTSTATUS status = NT_STATUS_ACCESS_DENIED; 54 54 uint32 saved_mask = 0; 55 bool priv_granted = false; 55 56 56 57 /* check privileges; certain SAM access bits should be overridden … … 60 61 if ((needed_priv_1 != SEC_PRIV_INVALID && security_token_has_privilege(token, needed_priv_1)) || 61 62 (needed_priv_2 != SEC_PRIV_INVALID && security_token_has_privilege(token, needed_priv_2))) { 63 priv_granted = true; 62 64 saved_mask = (des_access & rights_mask); 63 65 des_access &= ~saved_mask; … … 82 84 DEBUGADD(4,("but overritten by euid == sec_initial_uid()\n")); 83 85 86 priv_granted = true; 84 87 *acc_granted = des_access; 85 88 … … 90 93 91 94 done: 92 /* add in any bits saved during the privilege check (only 93 matters is status is ok) */ 95 if (priv_granted) { 96 /* add in any bits saved during the privilege check (only 97 matters if status is ok) */ 94 98 95 *acc_granted |= rights_mask; 99 *acc_granted |= rights_mask; 100 } 96 101 97 102 DEBUG(4,("%s: access %s (requested: 0x%08x, granted: 0x%08x)\n", -
vendor/current/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
r740 r746 2319 2319 security_info_sent = r->in.securityinformation; 2320 2320 2321 if (psd->owner_sid==0) { 2322 security_info_sent &= ~SECINFO_OWNER; 2323 } 2324 if (psd->group_sid==0) { 2325 security_info_sent &= ~SECINFO_GROUP; 2326 } 2327 if (psd->sacl==0) { 2328 security_info_sent &= ~SECINFO_SACL; 2329 } 2330 if (psd->dacl==0) { 2331 security_info_sent &= ~SECINFO_DACL; 2332 } 2333 2334 /* Convert all the generic bits. */ 2335 security_acl_map_generic(psd->dacl, &file_generic_mapping); 2336 security_acl_map_generic(psd->sacl, &file_generic_mapping); 2337 2338 nt_status = SMB_VFS_FSET_NT_ACL(fsp, 2339 security_info_sent, 2340 psd); 2321 nt_status = set_sd(fsp, psd, security_info_sent); 2341 2322 2342 2323 if (!NT_STATUS_IS_OK(nt_status) ) { -
vendor/current/source3/rpc_server/svcctl/srv_svcctl_reg.c
r740 r746 393 393 } 394 394 395 if (ipath == NULL || dname == NULL || description == NULL) {396 goto done;397 }398 399 395 /* Default to an external service if we haven't found a match */ 400 396 if (builtin_svcs[i].servicename == NULL) { -
vendor/current/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
r740 r746 33 33 #include "smbd/smbd.h" 34 34 #include "auth.h" 35 #include "krb5_env.h" 35 36 36 37 #undef DBGC_CLASS … … 868 869 869 870 become_root(); 871 setenv(KRB5_ENV_CCNAME, "MEMORY:_wkssvc_NetrJoinDomain2", 1); 870 872 werr = libnet_Join(p->mem_ctx, j); 873 unsetenv(KRB5_ENV_CCNAME); 871 874 unbecome_root(); 872 875 … … 934 937 935 938 become_root(); 939 setenv(KRB5_ENV_CCNAME, "MEMORY:_wkssvc_NetrUnjoinDomain2", 1); 936 940 werr = libnet_Unjoin(p->mem_ctx, u); 941 unsetenv(KRB5_ENV_CCNAME); 937 942 unbecome_root(); 938 943
Note:
See TracChangeset
for help on using the changeset viewer.