summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-01 00:02:48 +0200
committerGünther Deschner <gd@samba.org>2008-04-01 00:26:32 +0200
commita3991c9ef40b221ecd36344d65e723e357d8b3c7 (patch)
tree36731543b20d92d606c7cf4c7671473e37a4c46b /source3/rpc_server
parent493d61a1b3049d748ff131840762070a2063d184 (diff)
downloadsamba-a3991c9ef40b221ecd36344d65e723e357d8b3c7.tar.gz
samba-a3991c9ef40b221ecd36344d65e723e357d8b3c7.tar.bz2
samba-a3991c9ef40b221ecd36344d65e723e357d8b3c7.zip
Fix SRVSVC ShareInfo level 502 server side handling.
Guenther (This used to be commit 776facabf6f09f643d6dc526aa83f8db517465f9)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 57b42af4e5..7188360f69 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -379,6 +379,7 @@ static void init_srv_share_info_502(pipes_struct *p, struct srvsvc_NetShareInfo5
const char *net_name = lp_servicename(snum);
char *path = NULL;
SEC_DESC *sd = NULL;
+ struct sec_desc_buf *sd_buf = NULL;
size_t sd_size = 0;
TALLOC_CTX *ctx = p->mem_ctx;
char *remark = talloc_strdup(ctx, lp_comment(snum));;
@@ -397,6 +398,8 @@ static void init_srv_share_info_502(pipes_struct *p, struct srvsvc_NetShareInfo5
sd = get_share_security(ctx, lp_servicename(snum), &sd_size);
+ sd_buf = make_sec_desc_buf(p->mem_ctx, sd_size, sd);
+
init_srvsvc_NetShareInfo502(r, net_name,
get_share_type(snum),
remark ? remark : "",
@@ -405,8 +408,7 @@ static void init_srv_share_info_502(pipes_struct *p, struct srvsvc_NetShareInfo5
1,
path ? path : "",
"",
- 0,
- sd);
+ sd_buf);
}
/***************************************************************************
@@ -1541,7 +1543,7 @@ WERROR _srvsvc_NetShareSetInfo(pipes_struct *p,
comment = talloc_strdup(ctx, info->info502->comment);
pathname = info->info502->path;
type = info->info502->type;
- psd = info->info502->sd;
+ psd = info->info502->sd_buf.sd;
map_generic_share_sd_bits(psd);
break;
case 1004:
@@ -1734,7 +1736,7 @@ WERROR _srvsvc_NetShareAdd(pipes_struct *p,
max_connections = (r->in.info->info502->max_users == (uint32_t)-1) ?
0 : r->in.info->info502->max_users;
type = r->in.info->info502->type;
- psd = r->in.info->info502->sd;
+ psd = r->in.info->info502->sd_buf.sd;
map_generic_share_sd_bits(psd);
break;