diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-09-20 22:23:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:00:54 -0500 |
commit | 4db7642caa99c1b054322a8971c4b673556487ce (patch) | |
tree | 4ca6f040d613bc8127f43cd30a2bc12d3192471b /source3/rpc_server | |
parent | 3ef4b8cf2f4a52c08b71fa8cac1ce4e8409c160b (diff) | |
download | samba-4db7642caa99c1b054322a8971c4b673556487ce.tar.gz samba-4db7642caa99c1b054322a8971c4b673556487ce.tar.bz2 samba-4db7642caa99c1b054322a8971c4b673556487ce.zip |
r18745: Use the Samba4 data structures for security descriptors and security descriptor
buffers.
Make security access masks simply a uint32 rather than a structure
with a uint32 in it.
(This used to be commit b41c52b9db5fc4a553b20a7a5a051a4afced9366)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 26 | ||||
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 16dec45318..1a396a2391 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3008,8 +3008,8 @@ static void spoolss_notify_security_desc(int snum, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx) { - data->notify_data.sd.size = printer->info_2->secdesc_buf->len; - data->notify_data.sd.desc = dup_sec_desc( mem_ctx, printer->info_2->secdesc_buf->sec ) ; + data->notify_data.sd.size = printer->info_2->secdesc_buf->sd_size; + data->notify_data.sd.desc = dup_sec_desc( mem_ctx, printer->info_2->secdesc_buf->sd ) ; } /******************************************************************* @@ -4154,13 +4154,13 @@ static BOOL construct_printer_info_2(Printer_entry *print_hnd, PRINTER_INFO_2 *p printer->secdesc = NULL; if ( ntprinter->info_2->secdesc_buf - && ntprinter->info_2->secdesc_buf->len != 0 ) + && ntprinter->info_2->secdesc_buf->sd_size != 0 ) { /* don't use talloc_steal() here unless you do a deep steal of all the SEC_DESC members */ printer->secdesc = dup_sec_desc( get_talloc_ctx(), - ntprinter->info_2->secdesc_buf->sec ); + ntprinter->info_2->secdesc_buf->sd ); } free_a_printer(&ntprinter, 2); @@ -4194,12 +4194,12 @@ static BOOL construct_printer_info_3(Printer_entry *print_hnd, PRINTER_INFO_3 ** printer->flags = 0x4; - if (ntprinter->info_2->secdesc_buf && ntprinter->info_2->secdesc_buf->len != 0) { + if (ntprinter->info_2->secdesc_buf && ntprinter->info_2->secdesc_buf->sd_size != 0) { /* don't use talloc_steal() here unless you do a deep steal of all the SEC_DESC members */ printer->secdesc = dup_sec_desc( get_talloc_ctx(), - ntprinter->info_2->secdesc_buf->sec ); + ntprinter->info_2->secdesc_buf->sd ); } free_a_printer(&ntprinter, 2); @@ -5845,20 +5845,20 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, SEC_ACL *the_acl; int i; - the_acl = old_secdesc_ctr->sec->dacl; + the_acl = old_secdesc_ctr->sd->dacl; DEBUG(10, ("old_secdesc_ctr for %s has %d aces:\n", PRINTERNAME(snum), the_acl->num_aces)); for (i = 0; i < the_acl->num_aces; i++) { fstring sid_str; - sid_to_string(sid_str, &the_acl->ace[i].trustee); + sid_to_string(sid_str, &the_acl->aces[i].trustee); DEBUG(10, ("%s 0x%08x\n", sid_str, - the_acl->ace[i].info.mask)); + the_acl->aces[i].access_mask)); } - the_acl = secdesc_ctr->sec->dacl; + the_acl = secdesc_ctr->sd->dacl; if (the_acl) { DEBUG(10, ("secdesc_ctr for %s has %d aces:\n", @@ -5867,10 +5867,10 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, for (i = 0; i < the_acl->num_aces; i++) { fstring sid_str; - sid_to_string(sid_str, &the_acl->ace[i].trustee); + sid_to_string(sid_str, &the_acl->aces[i].trustee); DEBUG(10, ("%s 0x%08x\n", sid_str, - the_acl->ace[i].info.mask)); + the_acl->aces[i].access_mask)); } } else { DEBUG(10, ("dacl for secdesc_ctr is NULL\n")); @@ -5883,7 +5883,7 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, goto done; } - if (sec_desc_equal(new_secdesc_ctr->sec, old_secdesc_ctr->sec)) { + if (sec_desc_equal(new_secdesc_ctr->sd, old_secdesc_ctr->sd)) { result = WERR_OK; goto done; } diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index c65401f1c4..21032a4ed9 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -309,11 +309,11 @@ static void map_generic_share_sd_bits(SEC_DESC *psd) return; for (i = 0; i < ps_dacl->num_aces; i++) { - SEC_ACE *psa = &ps_dacl->ace[i]; - uint32 orig_mask = psa->info.mask; + SEC_ACE *psa = &ps_dacl->aces[i]; + uint32 orig_mask = psa->access_mask; - se_map_generic(&psa->info.mask, &file_generic_mapping); - psa->info.mask |= orig_mask; + se_map_generic(&psa->access_mask, &file_generic_mapping); + psa->access_mask |= orig_mask; } } @@ -1538,7 +1538,7 @@ WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S case 1501: pstrcpy(pathname, lp_pathname(snum)); fstrcpy(comment, lp_comment(snum)); - psd = q_u->info.share.info1501.sdb->sec; + psd = q_u->info.share.info1501.sdb->sd; map_generic_share_sd_bits(psd); type = STYPE_DISKTREE; break; |