Changeset 988 for vendor/current/source3/libgpo
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/source3/libgpo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/libgpo/gpext/registry.c
r740 r988 24 24 #include "registry.h" 25 25 #include "../librpc/gen_ndr/ndr_preg.h" 26 #include "libgpo/gpext/gpext.h" 26 27 27 28 #define GP_EXT_NAME "registry" … … 112 113 ZERO_STRUCTP(*reg_entry); 113 114 114 data = TALLOC_ZERO_P(mem_ctx, struct registry_value);115 data = talloc_zero(mem_ctx, struct registry_value); 115 116 if (!data) 116 117 return false; … … 119 120 data->data = data_blob_talloc(data, r->data, r->size); 120 121 121 entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry);122 entry = talloc_zero(mem_ctx, struct gp_registry_entry); 122 123 if (!entry) 123 124 return false; … … 173 174 status = ndr_map_error2ntstatus(ndr_err); 174 175 goto out; 176 } 177 178 if (flags & GPO_INFO_FLAG_VERBOSE) { 179 NDR_PRINT_DEBUG(preg_file, &r); 175 180 } 176 181 … … 270 275 ****************************************************************/ 271 276 272 static NTSTATUS registry_process_group_policy(ADS_STRUCT *ads, 273 TALLOC_CTX *mem_ctx, 277 static NTSTATUS registry_process_group_policy(TALLOC_CTX *mem_ctx, 274 278 uint32_t flags, 275 279 struct registry_key *root_key, 276 280 const struct security_token *token, 277 struct GROUP_POLICY_OBJECT *gpo, 278 const char *extension_guid, 279 const char *snapin_guid) 281 const struct GROUP_POLICY_OBJECT *deleted_gpo_list, 282 const struct GROUP_POLICY_OBJECT *changed_gpo_list) 280 283 { 281 284 NTSTATUS status; … … 284 287 size_t num_entries = 0; 285 288 char *unix_path = NULL; 286 287 debug_gpext_header(0, "registry_process_group_policy", flags, gpo, 288 extension_guid, snapin_guid); 289 290 status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path); 291 NT_STATUS_NOT_OK_RETURN(status); 292 293 status = reg_parse_registry(mem_ctx, 294 flags, 295 unix_path, 296 &entries, 297 &num_entries); 298 if (!NT_STATUS_IS_OK(status)) { 299 DEBUG(0,("failed to parse registry: %s\n", 300 nt_errstr(status))); 301 return status; 302 } 303 304 dump_reg_entries(flags, "READ", entries, num_entries); 305 306 werr = reg_apply_registry(mem_ctx, token, root_key, flags, 307 entries, num_entries); 308 if (!W_ERROR_IS_OK(werr)) { 309 DEBUG(0,("failed to apply registry: %s\n", 310 win_errstr(werr))); 311 return werror_to_ntstatus(werr); 312 } 313 314 return NT_STATUS_OK; 289 const struct GROUP_POLICY_OBJECT *gpo; 290 char *gpo_cache_path = cache_path(GPO_CACHE_DIR); 291 if (gpo_cache_path == NULL) { 292 return NT_STATUS_NO_MEMORY; 293 } 294 295 /* implementation of the policy callback function, see 296 * http://msdn.microsoft.com/en-us/library/aa373494%28v=vs.85%29.aspx 297 * for details - gd */ 298 299 /* for now do not process the list of deleted group policies 300 301 for (gpo = deleted_gpo_list; gpo; gpo = gpo->next) { 302 } 303 304 */ 305 306 for (gpo = changed_gpo_list; gpo; gpo = gpo->next) { 307 308 gpext_debug_header(0, "registry_process_group_policy", flags, 309 gpo, GP_EXT_GUID_REGISTRY, NULL); 310 311 status = gpo_get_unix_path(mem_ctx, gpo_cache_path, 312 gpo, &unix_path); 313 if (!NT_STATUS_IS_OK(status)) { 314 goto err_cache_path_free; 315 } 316 317 status = reg_parse_registry(mem_ctx, 318 flags, 319 unix_path, 320 &entries, 321 &num_entries); 322 if (!NT_STATUS_IS_OK(status)) { 323 DEBUG(0,("failed to parse registry: %s\n", 324 nt_errstr(status))); 325 goto err_cache_path_free; 326 } 327 328 dump_reg_entries(flags, "READ", entries, num_entries); 329 330 werr = reg_apply_registry(mem_ctx, token, root_key, flags, 331 entries, num_entries); 332 if (!W_ERROR_IS_OK(werr)) { 333 DEBUG(0,("failed to apply registry: %s\n", 334 win_errstr(werr))); 335 status = werror_to_ntstatus(werr); 336 goto err_cache_path_free; 337 } 338 } 339 status = NT_STATUS_OK; 340 341 err_cache_path_free: 342 talloc_free(gpo_cache_path); 343 return status; 315 344 } 316 345 … … 328 357 }; 329 358 330 info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info);359 info = talloc_zero(mem_ctx, struct gp_extension_reg_info); 331 360 NT_STATUS_HAVE_NO_MEMORY(info); 332 361 333 status = gp _ext_info_add_entry(mem_ctx, GP_EXT_NAME,334 335 362 status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME, 363 GP_EXT_GUID_REGISTRY, 364 table, info); 336 365 NT_STATUS_NOT_OK_RETURN(status); 337 366 … … 356 385 NTSTATUS status; 357 386 358 status = unregister_gp_extension(GP_EXT_NAME);387 status = gpext_unregister_gp_extension(GP_EXT_NAME); 359 388 if (NT_STATUS_IS_OK(status)) { 360 389 return status; … … 386 415 NT_STATUS_HAVE_NO_MEMORY(ctx); 387 416 388 status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,389 390 417 status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, 418 GP_EXT_NAME, GP_EXT_GUID_REGISTRY, 419 ®istry_methods); 391 420 if (!NT_STATUS_IS_OK(status)) { 392 421 TALLOC_FREE(ctx); -
vendor/current/source3/libgpo/gpext/scripts.c
r740 r988 25 25 #include "registry/reg_api.h" 26 26 #include "../libcli/registry/util_reg.h" 27 #include "libgpo/gpext/gpext.h" 27 28 28 29 #define GP_EXT_NAME "scripts" … … 63 64 }; 64 65 65 info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info);66 info = talloc_zero(mem_ctx, struct gp_extension_reg_info); 66 67 NT_STATUS_HAVE_NO_MEMORY(info); 67 68 68 status = gp _ext_info_add_entry(mem_ctx, GP_EXT_NAME,69 70 69 status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME, 70 GP_EXT_GUID_SCRIPTS, 71 table, info); 71 72 NT_STATUS_NOT_OK_RETURN(status); 72 73 … … 90 91 struct registry_value *data = NULL; 91 92 92 entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry);93 entry = talloc_zero(mem_ctx, struct gp_registry_entry); 93 94 NT_STATUS_HAVE_NO_MEMORY(entry); 94 95 95 data = TALLOC_ZERO_P(mem_ctx, struct registry_value);96 data = talloc_zero(mem_ctx, struct registry_value); 96 97 NT_STATUS_HAVE_NO_MEMORY(data); 97 98 … … 103 104 break; 104 105 case REG_SZ: 105 if (!push_reg_sz(mem_ctx, &data->data, (c har *)data_p)) {106 if (!push_reg_sz(mem_ctx, &data->data, (const char *)data_p)) { 106 107 return NT_STATUS_NO_MEMORY; 107 108 } … … 228 229 static WERROR scripts_store_reg_gpovals(TALLOC_CTX *mem_ctx, 229 230 struct registry_key *key, 230 struct GROUP_POLICY_OBJECT *gpo)231 const struct GROUP_POLICY_OBJECT *gpo) 231 232 { 232 233 WERROR werr; … … 267 268 uint32_t flags, 268 269 const char *section, 269 struct GROUP_POLICY_OBJECT *gpo,270 const struct GROUP_POLICY_OBJECT *gpo, 270 271 struct gp_registry_entry *entries, 271 272 size_t num_entries) … … 336 337 ****************************************************************/ 337 338 338 static NTSTATUS scripts_process_group_policy(ADS_STRUCT *ads, 339 TALLOC_CTX *mem_ctx, 339 static NTSTATUS scripts_process_group_policy(TALLOC_CTX *mem_ctx, 340 340 uint32_t flags, 341 341 struct registry_key *root_key, 342 342 const struct security_token *token, 343 struct GROUP_POLICY_OBJECT *gpo, 344 const char *extension_guid, 345 const char *snapin_guid) 343 const struct GROUP_POLICY_OBJECT *deleted_gpo_list, 344 const struct GROUP_POLICY_OBJECT *changed_gpo_list) 346 345 { 347 346 NTSTATUS status; … … 358 357 GP_SCRIPTS_INI_LOGOFF 359 358 }; 360 361 debug_gpext_header(0, "scripts_process_group_policy", flags, gpo, 362 extension_guid, snapin_guid); 363 364 status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path); 365 NT_STATUS_NOT_OK_RETURN(status); 366 367 status = gp_inifile_init_context(mem_ctx, flags, unix_path, 368 GP_SCRIPTS_INI, &ini_ctx); 369 NT_STATUS_NOT_OK_RETURN(status); 370 371 for (i = 0; i < ARRAY_SIZE(list); i++) { 372 373 TALLOC_FREE(entries); 374 num_entries = 0; 375 376 status = scripts_parse_ini_section(ini_ctx, flags, list[i], 377 &entries, &num_entries); 378 if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { 379 continue; 380 } 381 359 const struct GROUP_POLICY_OBJECT *gpo; 360 char *gpo_cache_path = cache_path(GPO_CACHE_DIR); 361 if (gpo_cache_path == NULL) { 362 return NT_STATUS_NO_MEMORY; 363 } 364 365 /* implementation of the policy callback function, see 366 * http://msdn.microsoft.com/en-us/library/aa373494%28v=vs.85%29.aspx 367 * for details - gd */ 368 369 /* for now do not process the list of deleted group policies 370 371 for (gpo = deleted_gpo_list; gpo; gpo = gpo->next) { 372 } 373 374 */ 375 376 for (gpo = changed_gpo_list; gpo; gpo = gpo->next) { 377 378 gpext_debug_header(0, "scripts_process_group_policy", flags, 379 gpo, GP_EXT_GUID_SCRIPTS, NULL); 380 381 status = gpo_get_unix_path(mem_ctx, gpo_cache_path, 382 gpo, &unix_path); 382 383 if (!NT_STATUS_IS_OK(status)) { 383 return status; 384 } 385 386 dump_reg_entries(flags, "READ", entries, num_entries); 387 388 werr = scripts_apply(ini_ctx->mem_ctx, token, root_key, 389 flags, list[i], gpo, entries, num_entries); 390 if (!W_ERROR_IS_OK(werr)) { 391 continue; /* FIXME: finally fix storing emtpy strings and REG_QWORD! */ 392 TALLOC_FREE(ini_ctx); 393 return werror_to_ntstatus(werr); 394 } 395 } 396 397 TALLOC_FREE(ini_ctx); 384 goto err_cache_path_free; 385 } 386 387 status = gp_inifile_init_context(mem_ctx, flags, unix_path, 388 GP_SCRIPTS_INI, &ini_ctx); 389 if (!NT_STATUS_IS_OK(status)) { 390 goto err_cache_path_free; 391 } 392 393 for (i = 0; i < ARRAY_SIZE(list); i++) { 394 395 TALLOC_FREE(entries); 396 num_entries = 0; 397 398 status = scripts_parse_ini_section(ini_ctx, flags, list[i], 399 &entries, &num_entries); 400 if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { 401 continue; 402 } 403 404 if (!NT_STATUS_IS_OK(status)) { 405 TALLOC_FREE(ini_ctx); 406 goto err_cache_path_free; 407 } 408 409 dump_reg_entries(flags, "READ", entries, num_entries); 410 411 werr = scripts_apply(ini_ctx->mem_ctx, token, root_key, 412 flags, list[i], gpo, entries, num_entries); 413 if (!W_ERROR_IS_OK(werr)) { 414 continue; /* FIXME: finally fix storing emtpy strings and REG_QWORD! */ 415 } 416 } 417 418 TALLOC_FREE(ini_ctx); 419 } 420 status = NT_STATUS_OK; 421 422 err_cache_path_free: 423 talloc_free(gpo_cache_path); 424 return status; 425 } 426 427 /**************************************************************** 428 ****************************************************************/ 429 430 static NTSTATUS scripts_initialize(TALLOC_CTX *mem_ctx) 431 { 398 432 return NT_STATUS_OK; 399 433 } … … 402 436 ****************************************************************/ 403 437 404 static NTSTATUS scripts_initialize(TALLOC_CTX *mem_ctx)405 {406 return NT_STATUS_OK;407 }408 409 /****************************************************************410 ****************************************************************/411 412 438 static NTSTATUS scripts_shutdown(void) 413 439 { 414 440 NTSTATUS status; 415 441 416 status = unregister_gp_extension(GP_EXT_NAME);442 status = gpext_unregister_gp_extension(GP_EXT_NAME); 417 443 if (NT_STATUS_IS_OK(status)) { 418 444 return status; … … 444 470 NT_STATUS_HAVE_NO_MEMORY(ctx); 445 471 446 status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,447 448 472 status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, 473 GP_EXT_NAME, GP_EXT_GUID_SCRIPTS, 474 &scripts_methods); 449 475 if (!NT_STATUS_IS_OK(status)) { 450 476 TALLOC_FREE(ctx); -
vendor/current/source3/libgpo/gpext/security.c
r740 r988 22 22 #include "../libgpo/gpo.h" 23 23 #include "libgpo/gpo_proto.h" 24 #include "libgpo/gpext/gpext.h" 24 25 25 26 #define GP_EXT_NAME "security" … … 56 57 #define GPTTMPL_PARAMETER_REVISION "Revision" 57 58 #define GPTTMPL_PARAMETER_SIGNATURE "signature" 58 #define GPTTMPL_VALUE_CHICAGO " $CHICAGO$" /* whatever this is good for... */59 #define GPTTMPL_VALUE_CHICAGO "\"$CHICAGO$\"" /* whatever this is good for... */ 59 60 #define GPTTMPL_PARAMETER_UNICODE "Unicode" 60 61 … … 65 66 NTSTATUS result; 66 67 int version; 67 int is_unicode;68 bool is_unicode = false; 68 69 69 70 if (!ini_ctx) { … … 90 91 } 91 92 92 result = gp_inifile_get int(ini_ctx, GPTTMPL_SECTION_UNICODE93 result = gp_inifile_getbool(ini_ctx, GPTTMPL_SECTION_UNICODE 93 94 ":"GPTTMPL_PARAMETER_UNICODE, &is_unicode); 94 95 if (!NT_STATUS_IS_OK(result) || !is_unicode) { … … 141 142 ****************************************************************/ 142 143 143 static NTSTATUS security_process_group_policy(ADS_STRUCT *ads, 144 TALLOC_CTX *mem_ctx, 144 static NTSTATUS security_process_group_policy(TALLOC_CTX *mem_ctx, 145 145 uint32_t flags, 146 146 struct registry_key *root_key, 147 147 const struct security_token *token, 148 struct GROUP_POLICY_OBJECT *gpo, 149 const char *extension_guid, 150 const char *snapin_guid) 148 const struct GROUP_POLICY_OBJECT *deleted_gpo_list, 149 const struct GROUP_POLICY_OBJECT *changed_gpo_list) 151 150 { 152 151 NTSTATUS status; 153 152 char *unix_path = NULL; 154 153 struct gp_inifile_context *ini_ctx = NULL; 155 156 debug_gpext_header(0, "security_process_group_policy", flags, gpo, 157 extension_guid, snapin_guid); 158 159 /* this handler processes the gpttmpl files and merge output to the 160 * registry */ 161 162 status = gpo_get_unix_path(mem_ctx, cache_path(GPO_CACHE_DIR), gpo, &unix_path); 163 if (!NT_STATUS_IS_OK(status)) { 164 goto out; 165 } 166 167 status = gpttmpl_init_context(mem_ctx, flags, unix_path, &ini_ctx); 168 if (!NT_STATUS_IS_OK(status)) { 169 goto out; 170 } 171 172 status = gpttmpl_process(ini_ctx, root_key, flags); 173 if (!NT_STATUS_IS_OK(status)) { 174 goto out; 154 const struct GROUP_POLICY_OBJECT *gpo; 155 char *gpo_cache_path = cache_path(GPO_CACHE_DIR); 156 if (gpo_cache_path == NULL) { 157 return NT_STATUS_NO_MEMORY; 158 } 159 160 /* implementation of the policy callback function, see 161 * http://msdn.microsoft.com/en-us/library/aa373494%28v=vs.85%29.aspx 162 * for details - gd */ 163 164 /* for now do not process the list of deleted group policies 165 166 for (gpo = deleted_gpo_list; gpo; gpo = gpo->next) { 167 } 168 169 */ 170 171 for (gpo = changed_gpo_list; gpo; gpo = gpo->next) { 172 173 gpext_debug_header(0, "security_process_group_policy", flags, 174 gpo, GP_EXT_GUID_SECURITY, NULL); 175 176 /* this handler processes the gpttmpl files and merge output to the 177 * registry */ 178 179 status = gpo_get_unix_path(mem_ctx, gpo_cache_path, 180 gpo, &unix_path); 181 if (!NT_STATUS_IS_OK(status)) { 182 goto out; 183 } 184 185 status = gpttmpl_init_context(mem_ctx, flags, unix_path, 186 &ini_ctx); 187 if (!NT_STATUS_IS_OK(status)) { 188 goto out; 189 } 190 191 status = gpttmpl_process(ini_ctx, root_key, flags); 192 if (!NT_STATUS_IS_OK(status)) { 193 goto out; 194 } 195 196 TALLOC_FREE(ini_ctx); 175 197 } 176 198 … … 181 203 } 182 204 TALLOC_FREE(ini_ctx); 205 talloc_free(gpo_cache_path); 183 206 184 207 return status; … … 203 226 }; 204 227 205 info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info);228 info = talloc_zero(mem_ctx, struct gp_extension_reg_info); 206 229 NT_STATUS_HAVE_NO_MEMORY(info); 207 230 208 status = gp _ext_info_add_entry(mem_ctx, GP_EXT_NAME,209 210 231 status = gpext_info_add_entry(mem_ctx, GP_EXT_NAME, 232 GP_EXT_GUID_SECURITY, 233 table, info); 211 234 NT_STATUS_NOT_OK_RETURN(status); 212 235 … … 232 255 NTSTATUS status; 233 256 234 status = unregister_gp_extension(GP_EXT_NAME);257 status = gpext_unregister_gp_extension(GP_EXT_NAME); 235 258 if (NT_STATUS_IS_OK(status)) { 236 259 return status; … … 262 285 NT_STATUS_HAVE_NO_MEMORY(ctx); 263 286 264 status = register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION,265 266 287 status = gpext_register_gp_extension(ctx, SMB_GPEXT_INTERFACE_VERSION, 288 GP_EXT_NAME, GP_EXT_GUID_SECURITY, 289 &security_methods); 267 290 if (!NT_STATUS_IS_OK(status)) { 268 291 TALLOC_FREE(ctx); -
vendor/current/source3/libgpo/gpext/wscript_build
r740 r988 1 1 #!/usr/bin/env python 2 2 3 GPEXT_REGISTRY_SRC = 'registry.c'4 GPEXT_SCRIPTS_SRC = 'scripts.c'5 GPEXT_SECURITY_SRC = 'security.c'6 7 GPEXT_SRC = '''../../../libgpo/gpext/gpext.c'''8 9 3 bld.SAMBA3_SUBSYSTEM('gpext', 10 source= GPEXT_SRC,11 vars=locals())4 source='../../../libgpo/gpext/gpext.c', 5 deps='samba-util samba3core gpo') 12 6 13 7 bld.SAMBA3_MODULE('gpext_registry', 14 8 subsystem='gpext', 15 source= GPEXT_REGISTRY_SRC,9 source='registry.c', 16 10 deps='NDR_PREG', 17 11 init_function='', … … 21 15 bld.SAMBA3_MODULE('gpext_scripts', 22 16 subsystem='gpext', 23 source= GPEXT_SCRIPTS_SRC,17 source='scripts.c', 24 18 init_function='', 25 19 internal_module=bld.SAMBA3_IS_STATIC_MODULE('gpext_scripts'), … … 28 22 bld.SAMBA3_MODULE('gpext_security', 29 23 subsystem='gpext', 30 source= GPEXT_SECURITY_SRC,24 source='security.c', 31 25 init_function='', 32 26 internal_module=bld.SAMBA3_IS_STATIC_MODULE('gpext_security'), -
vendor/current/source3/libgpo/gpo_filesync.c
r740 r988 51 51 off_t nread = 0; 52 52 53 result = cli_open (cli, nt_path, O_RDONLY, DENY_NONE, &fnum);53 result = cli_openx(cli, nt_path, O_RDONLY, DENY_NONE, &fnum); 54 54 if (!NT_STATUS_IS_OK(result)) { 55 55 goto out; 56 56 } 57 57 58 if ((fd = sys_open(unix_path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) {58 if ((fd = open(unix_path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) { 59 59 result = map_nt_error_from_unix(errno); 60 60 goto out; … … 67 67 68 68 while (1) { 69 70 int n = cli_read(cli, fnum, data, nread, read_size); 71 72 if (n <= 0) 69 size_t n = 0; 70 71 result = cli_read(cli, fnum, data, nread, read_size, &n); 72 if (!NT_STATUS_IS_OK(result)) { 73 goto out; 74 } 75 76 if (n == 0) 73 77 break; 74 78 … … 228 232 ctx.mem_ctx = mem_ctx; 229 233 ctx.cli = cli; 230 ctx.remote_path = CONST_DISCARD(char *, nt_path);231 ctx.local_path = CONST_DISCARD(char *, local_path);234 ctx.remote_path = discard_const_p(char, nt_path); 235 ctx.local_path = discard_const_p(char, local_path); 232 236 ctx.attribute = (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY); 233 237 -
vendor/current/source3/libgpo/gpo_proto.h
r740 r988 32 32 const char *nt_path, 33 33 const char *local_path); 34 35 /* The following definitions come from libgpo/gpo_ini.c */36 37 NTSTATUS parse_gpt_ini(TALLOC_CTX *mem_ctx,38 const char *filename,39 uint32_t *version,40 char **display_name);41 34 42 35 /* The following definitions come from libgpo/gpo_reg.c */ -
vendor/current/source3/libgpo/gpo_reg.c
r740 r988 37 37 struct security_token *token = NULL; 38 38 39 token = TALLOC_ZERO_P(mem_ctx, struct security_token);39 token = talloc_zero(mem_ctx, struct security_token); 40 40 if (!token) { 41 41 DEBUG(1,("talloc failed\n")); … … 75 75 } 76 76 77 tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);77 tmp_ctx = talloc_zero(mem_ctx, struct gp_registry_context); 78 78 W_ERROR_HAVE_NO_MEMORY(tmp_ctx); 79 79 … … 286 286 287 287 werr = gp_store_reg_val_sz(mem_ctx, key, "SOM", 288 gpo->link );288 gpo->link ? gpo->link : ""); 289 289 W_ERROR_NOT_OK_RETURN(werr); 290 290 … … 294 294 295 295 werr = gp_store_reg_val_sz(mem_ctx, key, "WQL-Id", 296 NULL);296 ""); 297 297 W_ERROR_NOT_OK_RETURN(werr); 298 298 … … 396 396 struct security_token *tmp_token = NULL; 397 397 398 tmp_token = TALLOC_ZERO_P(mem_ctx, struct security_token);398 tmp_token = talloc_zero(mem_ctx, struct security_token); 399 399 W_ERROR_HAVE_NO_MEMORY(tmp_token); 400 400 … … 543 543 if (!W_ERROR_IS_OK(werr)) { 544 544 DEBUG(0,("gp_reg_state_store: " 545 "gp o_store_reg_gpovals failed for %s: %s\n",545 "gp_store_reg_gpovals failed for %s: %s\n", 546 546 gpo->display_name, win_errstr(werr))); 547 547 goto done; … … 603 603 } 604 604 605 gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);605 gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT); 606 606 W_ERROR_HAVE_NO_MEMORY(gpo); 607 607 … … 902 902 size_t *num) 903 903 { 904 *entries = TALLOC_REALLOC_ARRAY(mem_ctx, *entries,904 *entries = talloc_realloc(mem_ctx, *entries, 905 905 struct gp_registry_entry, 906 906 (*num)+1);
Note:
See TracChangeset
for help on using the changeset viewer.