diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
commit | 6d139ca4680abcbda5110f2f0886aa038ff62088 (patch) | |
tree | 7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/services/services_db.c | |
parent | 4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff) | |
parent | afa960cbbcd609123d710c301e7a9a070c1fed70 (diff) | |
download | samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2 samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
librpc/ndr.pc.in
Diffstat (limited to 'source3/services/services_db.c')
-rw-r--r-- | source3/services/services_db.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/services/services_db.c b/source3/services/services_db.c index e41524851f..6d1b5d5b95 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -567,7 +567,8 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, WERROR wresult; char *path = NULL; REGVAL_CTR *values = NULL; - prs_struct ps; + DATA_BLOB blob; + NTSTATUS status; bool ret = False; /* now add the security descriptor */ @@ -593,21 +594,18 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, /* stream the printer security descriptor */ - if (!prs_init( &ps, RPC_MAX_PDU_FRAG_LEN, key, MARSHALL)) { - DEBUG(0,("svcctl_set_secdesc: prs_init() failed!\n")); + status = marshall_sec_desc(ctx, sec_desc, &blob.data, &blob.length); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,("svcctl_set_secdesc: ndr_push_struct_blob() failed!\n")); TALLOC_FREE( key ); return False; } - if ( sec_io_desc("sec_desc", &sec_desc, &ps, 0 ) ) { - uint32 offset = prs_offset( &ps ); - regval_ctr_addvalue( values, "Security", REG_BINARY, prs_data_p(&ps), offset ); - ret = store_reg_values( key, values ); - } + regval_ctr_addvalue( values, "Security", REG_BINARY, (const char *)blob.data, blob.length); + ret = store_reg_values( key, values ); /* cleanup */ - prs_mem_free( &ps ); TALLOC_FREE( key); return ret; |