diff options
author | Jeremy Allison <jra@samba.org> | 2000-06-08 00:17:05 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-06-08 00:17:05 +0000 |
commit | b2eef912cfaf768fd26b3b2acbcfc0be2951a197 (patch) | |
tree | 967334b6045c7f7766c5bdbf526ed0f3b275ffcc /source3/printing/nt_printing.c | |
parent | 0164047afbd082b0003147845a72ca08b4781b81 (diff) | |
download | samba-b2eef912cfaf768fd26b3b2acbcfc0be2951a197.tar.gz samba-b2eef912cfaf768fd26b3b2acbcfc0be2951a197.tar.bz2 samba-b2eef912cfaf768fd26b3b2acbcfc0be2951a197.zip |
Cause printer SD's to be displayed correctly (full control).
Jeremy.
(This used to be commit 341d07c516865bdd9be99f98cd0754d12b25f9c0)
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r-- | source3/printing/nt_printing.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 991f66a8ac..f9365b481d 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1493,20 +1493,22 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) static SEC_DESC_BUF *construct_default_printer_sdb(void) { extern DOM_SID global_sid_World; - SEC_ACE ace; + SEC_ACE ace[2]; SEC_ACCESS sa; SEC_ACL *psa = NULL; SEC_DESC_BUF *sdb = NULL; SEC_DESC *psd = NULL; size_t sd_size; - init_sec_access(&sa,PRINTER_ALL_ACCESS); - init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0); + init_sec_access(&sa,PRINTER_MANAGE_DOCUMENTS); + init_sec_ace(&ace[0], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, + sa, SEC_ACE_FLAG_OBJECT_INHERIT|SEC_ACE_FLAG_INHERIT_ONLY); + init_sec_ace(&ace[1], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, + sa, SEC_ACE_FLAG_CONTAINER_INHERIT); - if ((psa = make_sec_acl( 3, 1, &ace)) != NULL) { - psd = make_sec_desc(1, SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT, - &global_sid_World, &global_sid_World, - NULL, psa, &sd_size); + if ((psa = make_sec_acl( ACL_REVISION, 2, &ace)) != NULL) { + psd = make_sec_desc(SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT, + &global_sid_World, &global_sid_World, NULL, psa, &sd_size); free_sec_acl(&psa); } |