summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-11 19:22:08 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-11 19:22:08 +0000
commit60a91a1dca12e675e4498062f33ed773ddd5600a (patch)
tree7b828ffbd2c92b29f88238d1f43cce0b5b493953 /source3/rpcclient
parent16a243ec5efe0fed8a6934442e87f57c635e4703 (diff)
downloadsamba-60a91a1dca12e675e4498062f33ed773ddd5600a.tar.gz
samba-60a91a1dca12e675e4498062f33ed773ddd5600a.tar.bz2
samba-60a91a1dca12e675e4498062f33ed773ddd5600a.zip
clearing up security descriptor
(This used to be commit abdc9d790b7d27b70aaf88451f5c82c99c94ca6e)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_reg.c11
-rw-r--r--source3/rpcclient/display.c2
2 files changed, 8 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c
index 4d49d19b3b..fd5fc71828 100644
--- a/source3/rpcclient/cmd_reg.c
+++ b/source3/rpcclient/cmd_reg.c
@@ -766,17 +766,20 @@ void cmd_reg_get_key_sec(struct client_info *info)
/* query key sec info. first call sets sec_buf_size. */
sec_buf_size = 0;
+ sec_buf.sec = NULL;
+
res4 = res3 ? do_reg_get_key_sec(smb_cli, &key_pol,
&sec_buf_size, &sec_buf) : False;
res4 = res4 ? do_reg_get_key_sec(smb_cli, &key_pol,
&sec_buf_size, &sec_buf) : False;
- if (res4 && sec_buf.len > 0)
+ if (res4 && sec_buf.len > 0 && sec_buf.sec != NULL)
{
- display_sec_desc(out_hnd, ACTION_HEADER , &sec_buf.sec);
- display_sec_desc(out_hnd, ACTION_ENUMERATE, &sec_buf.sec);
- display_sec_desc(out_hnd, ACTION_FOOTER , &sec_buf.sec);
+ display_sec_desc(out_hnd, ACTION_HEADER , sec_buf.sec);
+ display_sec_desc(out_hnd, ACTION_ENUMERATE, sec_buf.sec);
+ display_sec_desc(out_hnd, ACTION_FOOTER , sec_buf.sec);
+ free(sec_buf.sec);
}
/* close the key handle */
diff --git a/source3/rpcclient/display.c b/source3/rpcclient/display.c
index c55358bc9c..c35f8db9af 100644
--- a/source3/rpcclient/display.c
+++ b/source3/rpcclient/display.c
@@ -1175,7 +1175,7 @@ void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *sec)
{
case ACTION_HEADER:
{
- fprintf(out_hnd, "\tSecurity Descriptor\tunk 1,2: %x %x\n", sec->unknown_1, sec->unknown_2);
+ fprintf(out_hnd, "\tSecurity Descriptor\tunk 1: %x\n", sec->unknown_1);
fprintf(out_hnd, "\t-------------------\n");
break;