Changeset 745 for trunk/server/libgpo
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 1 deleted
- 8 edited
- 1 copied
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/libgpo/gpext/gpext.c
r414 r745 19 19 20 20 #include "includes.h" 21 #include "../libgpo/gpo.h" 21 22 #include "../libgpo/gpext/gpext.h" 22 23 #include "librpc/gen_ndr/ndr_misc.h" 23 24 #include "lib/util/dlinklist.h" 25 #include "../libcli/registry/util_reg.h" 26 #if _SAMBA_BUILD_ == 3 27 #include "libgpo/gpo_proto.h" 28 #include "registry.h" 29 #include "registry/reg_api.h" 30 #endif 24 31 25 32 static struct gp_extension *extensions = NULL; … … 277 284 case REG_SZ: 278 285 case REG_EXPAND_SZ: 279 data->v.sz.str = talloc_strdup(mem_ctx, data_s);280 NT_STATUS_HAVE_NO_MEMORY(data->v.sz.str);281 data->v.sz.len = strlen(data_s);286 if (!push_reg_sz(mem_ctx, &data->data, data_s)) { 287 return NT_STATUS_NO_MEMORY; 288 } 282 289 break; 283 case REG_DWORD: 284 data->v.dword = atoi(data_s); 290 case REG_DWORD: { 291 uint32_t v = atoi(data_s); 292 data->data = data_blob_talloc(mem_ctx, NULL, 4); 293 SIVAL(data->data.data, 0, v); 285 294 break; 295 } 286 296 default: 287 297 return NT_STATUS_NOT_SUPPORTED; … … 587 597 588 598 if (!reg_ctx) { 589 NT_USER_TOKEN*token;599 struct security_token *token; 590 600 591 601 token = registry_create_system_token(mem_ctx); … … 671 681 TALLOC_CTX *mem_ctx, 672 682 uint32_t flags, 673 const NT_USER_TOKEN*token,683 const struct security_token *token, 674 684 struct GROUP_POLICY_OBJECT *gpo_list, 675 685 const char *extension_guid, … … 685 695 TALLOC_CTX *mem_ctx, 686 696 uint32_t flags, 687 const NT_USER_TOKEN*token,697 const struct security_token *token, 688 698 struct registry_key *root_key, 689 699 struct GROUP_POLICY_OBJECT *gpo, -
trunk/server/libgpo/gpext/gpext.h
r414 r745 66 66 uint32_t flags, 67 67 struct registry_key *root_key, 68 const NT_USER_TOKEN*token,68 const struct security_token *token, 69 69 struct GROUP_POLICY_OBJECT *gpo, 70 70 const char *extension_guid, … … 74 74 TALLOC_CTX *mem_ctx, 75 75 uint32_t flags, 76 const NT_USER_TOKEN*token,76 const struct security_token *token, 77 77 struct GROUP_POLICY_OBJECT *gpo_list, 78 78 const char *extension_guid); … … 110 110 TALLOC_CTX *mem_ctx, 111 111 uint32_t flags, 112 const NT_USER_TOKEN*token,112 const struct security_token *token, 113 113 struct GROUP_POLICY_OBJECT *gpo_list, 114 114 const char *extension_guid, … … 117 117 TALLOC_CTX *mem_ctx, 118 118 uint32_t flags, 119 const NT_USER_TOKEN*token,119 const struct security_token *token, 120 120 struct registry_key *root_key, 121 121 struct GROUP_POLICY_OBJECT *gpo, -
trunk/server/libgpo/gpo.h
r414 r745 25 25 #else 26 26 struct loadparm_context; 27 #include "ads.h" 27 28 #endif 28 29 … … 156 157 157 158 struct gp_registry_context { 158 const NT_USER_TOKEN*token;159 const struct security_token *token; 159 160 const char *path; 160 161 struct registry_key *curr_key; … … 215 216 TALLOC_CTX *mem_ctx, 216 217 const char *dn, 217 NT_USER_TOKEN**token);218 struct security_token **token); 218 219 ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads, 219 220 TALLOC_CTX *mem_ctx, 220 221 const char *dn, 221 222 uint32_t flags, 222 const NT_USER_TOKEN*token,223 const struct security_token *token, 223 224 struct GROUP_POLICY_OBJECT **gpo_list); 224 225 … … 226 227 227 228 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo, 228 const NT_USER_TOKEN*token);229 const struct security_token *token); 229 230 230 231 /* The following definitions come from libgpo/gpo_util.c */ … … 245 246 ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads, 246 247 TALLOC_CTX *mem_ctx, 247 const NT_USER_TOKEN*token,248 const struct security_token *token, 248 249 struct registry_key *root_key, 249 250 struct GROUP_POLICY_OBJECT *gpo, … … 252 253 ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads, 253 254 TALLOC_CTX *mem_ctx, 254 const NT_USER_TOKEN*token,255 const struct security_token *token, 255 256 struct GROUP_POLICY_OBJECT *gpo_list, 256 257 const char *extensions_guid_filter, … … 282 283 struct loadparm_context *lp_ctx, 283 284 const char *dn, 284 NT_USER_TOKEN**token);285 struct security_token **token); 285 286 286 287 -
trunk/server/libgpo/gpo_fetch.c
r414 r745 26 26 #include "param/param.h" 27 27 #include "libcli/resolve/resolve.h" 28 #include "../lib/tevent/tevent.h"28 #include <tevent.h> 29 29 #include "libcli/libcli.h" 30 30 #include "libcli/raw/libcliraw.h" … … 33 33 #include "libgpo/gpo_s4.h" 34 34 #include "lib/util/util.h" 35 #else 36 #include "libgpo/gpo_proto.h" 37 #include "libsmb/libsmb.h" 35 38 #endif 36 39 … … 149 152 CLI_FULL_CONNECTION_USE_KERBEROS | 150 153 CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS, 151 Undefined , NULL);154 Undefined); 152 155 if (!NT_STATUS_IS_OK(result)) { 153 156 DEBUG(10,("check_refresh_gpo: " -
trunk/server/libgpo/gpo_ldap.c
r414 r745 19 19 20 20 #include "includes.h" 21 #include "libgpo/gpo.h" 22 #include "auth.h" 21 23 #if _SAMBA_BUILD_ == 4 22 #include "libgpo/gpo.h"23 24 #include "libgpo/gpo_s4.h" 24 25 #include "source4/libgpo/ads_convenience.h" 25 26 #endif 27 #include "../libcli/security/security.h" 26 28 27 29 /**************************************************************** … … 486 488 "versionNumber", 487 489 NULL}; 488 uint32_t sd_flags = DACL_SECURITY_INFORMATION;490 uint32_t sd_flags = SECINFO_DACL; 489 491 490 492 ZERO_STRUCTP(gpo); … … 553 555 enum GPO_LINK_TYPE link_type, 554 556 bool only_add_forced_gpos, 555 const NT_USER_TOKEN*token)557 const struct security_token *token) 556 558 { 557 559 ADS_STATUS status; … … 620 622 TALLOC_CTX *mem_ctx, 621 623 const char *dn, 622 NT_USER_TOKEN**token)624 struct security_token **token) 623 625 { 624 626 ADS_STATUS status; 625 DOM_SIDobject_sid;626 DOM_SIDprimary_group_sid;627 DOM_SID*ad_token_sids;627 struct dom_sid object_sid; 628 struct dom_sid primary_group_sid; 629 struct dom_sid *ad_token_sids; 628 630 size_t num_ad_token_sids = 0; 629 DOM_SID*token_sids;630 size_t num_token_sids = 0;631 NT_USER_TOKEN*new_token = NULL;631 struct dom_sid *token_sids; 632 uint32_t num_token_sids = 0; 633 struct security_token *new_token = NULL; 632 634 int i; 633 635 … … 639 641 } 640 642 641 token_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, 1);643 token_sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, 1); 642 644 ADS_ERROR_HAVE_NO_MEMORY(token_sids); 643 645 … … 671 673 *token = new_token; 672 674 673 debug_nt_user_token(DBGC_CLASS, 5, *token);675 security_token_debug(DBGC_CLASS, 5, *token); 674 676 675 677 return ADS_ERROR_LDAP(LDAP_SUCCESS); … … 711 713 const char *dn, 712 714 uint32_t flags, 713 const NT_USER_TOKEN*token,715 const struct security_token *token, 714 716 struct GROUP_POLICY_OBJECT **gpo_list) 715 717 { … … 725 727 if (!dn) { 726 728 return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER); 729 } 730 731 if (!ads_set_sasl_wrap_flags(ads, ADS_AUTH_SASL_SIGN)) { 732 return ADS_ERROR(LDAP_INVALID_CREDENTIALS); 727 733 } 728 734 -
trunk/server/libgpo/gpo_sec.c
r414 r745 19 19 20 20 #include "includes.h" 21 #include "libcli/security/dom_sid.h" 21 #include "libcli/security/security.h" 22 #include "../libgpo/gpo.h" 23 #include "auth.h" 24 #include "../librpc/ndr/libndr.h" 22 25 #if _SAMBA_BUILD_ == 4 23 26 #include "libgpo/ads_convenience.h" … … 25 28 #include "librpc/gen_ndr/ndr_misc.h" 26 29 #include "../libcli/security/secace.h" 27 #include "../libgpo/gpo.h"28 30 #endif 29 31 … … 102 104 103 105 static NTSTATUS gpo_sd_check_ace_denied_object(const struct security_ace *ace, 104 const NT_USER_TOKEN*token)106 const struct security_token *token) 105 107 { 106 108 char *sid_str; … … 124 126 125 127 static NTSTATUS gpo_sd_check_ace_allowed_object(const struct security_ace *ace, 126 const NT_USER_TOKEN*token)128 const struct security_token *token) 127 129 { 128 130 char *sid_str; … … 147 149 148 150 static NTSTATUS gpo_sd_check_ace(const struct security_ace *ace, 149 const NT_USER_TOKEN*token)151 const struct security_token *token) 150 152 { 151 153 switch (ace->type) { … … 163 165 164 166 NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo, 165 const NT_USER_TOKEN*token)167 const struct security_token *token) 166 168 { 167 169 struct security_descriptor *sd = gpo->security_descriptor; -
trunk/server/libgpo/gpo_util.c
r414 r745 19 19 #define TALLOC_DEPRECATED 1 20 20 #include "includes.h" 21 #include "system/filesys.h" 21 22 #include "librpc/gen_ndr/ndr_misc.h" 23 #include "../librpc/gen_ndr/ndr_security.h" 24 #include "../libgpo/gpo.h" 25 #include "../libcli/security/security.h" 22 26 #if _SAMBA_BUILD_ == 4 23 #include "system/filesys.h"24 27 #include "auth/auth.h" 25 #include "../libgpo/gpo.h" 26 #include "../lib/talloc/talloc.h" 28 #include <talloc.h> 27 29 #include "source4/libgpo/ads_convenience.h" 28 30 #endif … … 322 324 dump_gp_ext(gp_ext, lvl); 323 325 } 324 325 DEBUGADD(lvl,("security descriptor:\n")); 326 327 NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor); 326 if (gpo->security_descriptor) { 327 DEBUGADD(lvl,("security descriptor:\n")); 328 329 NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor); 330 } 328 331 } 329 332 … … 447 450 ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads, 448 451 TALLOC_CTX *mem_ctx, 449 const NT_USER_TOKEN*token,452 const struct security_token *token, 450 453 struct registry_key *root_key, 451 454 struct GROUP_POLICY_OBJECT *gpo, … … 504 507 static ADS_STATUS gpo_process_gpo_list_by_ext(ADS_STRUCT *ads, 505 508 TALLOC_CTX *mem_ctx, 506 const NT_USER_TOKEN*token,509 const struct security_token *token, 507 510 struct registry_key *root_key, 508 511 struct GROUP_POLICY_OBJECT *gpo_list, … … 542 545 ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads, 543 546 TALLOC_CTX *mem_ctx, 544 const NT_USER_TOKEN*token,547 const struct security_token *token, 545 548 struct GROUP_POLICY_OBJECT *gpo_list, 546 549 const char *extensions_guid_filter, … … 839 842 struct loadparm_context *lp_ctx, 840 843 const char *dn, 841 NT_USER_TOKEN**token)842 { 843 NT_USER_TOKEN*ad_token = NULL;844 struct security_token **token) 845 { 846 struct security_token *ad_token = NULL; 844 847 ADS_STATUS status; 845 848 #if _SAMBA_BUILD_ == 4
Note:
See TracChangeset
for help on using the changeset viewer.