From a3991c9ef40b221ecd36344d65e723e357d8b3c7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 1 Apr 2008 00:02:48 +0200 Subject: Fix SRVSVC ShareInfo level 502 server side handling. Guenther (This used to be commit 776facabf6f09f643d6dc526aa83f8db517465f9) --- source3/rpc_server/srv_srvsvc_nt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server') 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; -- cgit