summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-29 21:04:31 +0100
committerGünther Deschner <gd@samba.org>2008-10-31 02:44:29 +0100
commit0b95cb251ce0043e393139a22a0f3ac6121406c5 (patch)
tree8bc527f53d2abf8c8768ac7d581c3cf9ba0a5280 /source4
parent4b8606f616cdd2fe885729a044d6139fc0001780 (diff)
downloadsamba-0b95cb251ce0043e393139a22a0f3ac6121406c5.tar.gz
samba-0b95cb251ce0043e393139a22a0f3ac6121406c5.tar.bz2
samba-0b95cb251ce0043e393139a22a0f3ac6121406c5.zip
s4-srvsvc: merge srvsvc_NetShareInfo502 from s3.
Apparently both s3 and s4 are not entirely correct one this. metze is looking into hand-marshalling security descriptors so this will fix this finally. For now, just keep the two in sync. Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/srvsvc.idl4
-rw-r--r--source4/rpc_server/common/share_info.c6
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c5
-rw-r--r--source4/torture/libnet/libnet_share.c4
-rw-r--r--source4/torture/rpc/samba3rpc.c2
-rw-r--r--source4/torture/rpc/srvsvc.c5
6 files changed, 9 insertions, 17 deletions
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index b8cf89ce3b..d0e52e255b 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -469,9 +469,7 @@ import "security.idl", "svcctl.idl";
uint32 current_users;
[string,charset(UTF16)] uint16 *path;
[string,charset(UTF16)] uint16 *password;
- /* maybe here is a struct sec_desc_buf following */
- uint32 unknown;
- [subcontext(4)] security_descriptor *sd;
+ sec_desc_buf sd_buf;
} srvsvc_NetShareInfo502;
typedef struct {
diff --git a/source4/rpc_server/common/share_info.c b/source4/rpc_server/common/share_info.c
index 130babd175..48870e602f 100644
--- a/source4/rpc_server/common/share_info.c
+++ b/source4/rpc_server/common/share_info.c
@@ -107,12 +107,6 @@ uint32_t dcesrv_common_get_share_dfs_flags(TALLOC_CTX *mem_ctx, struct dcesrv_co
}
/* This hardcoded value should go into a ldb database! */
-uint32_t dcesrv_common_get_share_unknown(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, struct share_config *scfg)
-{
- return 0;
-}
-
-/* This hardcoded value should go into a ldb database! */
struct security_descriptor *dcesrv_common_get_security_descriptor(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, struct share_config *scfg)
{
return NULL;
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index 58eed57f0f..70911e92fe 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -697,8 +697,7 @@ static WERROR dcesrv_srvsvc_fiel_ShareInfo(struct dcesrv_call_state *dce_call, T
info->info502->path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, scfg);
W_ERROR_HAVE_NO_MEMORY(info->info502->path);
info->info502->password = talloc_strdup(mem_ctx, share_string_option(scfg, SHARE_PASSWORD, NULL));
- info->info502->unknown = dcesrv_common_get_share_unknown(mem_ctx, dce_ctx, scfg);
- info->info502->sd = dcesrv_common_get_security_descriptor(mem_ctx, dce_ctx, scfg);
+ info->info502->sd_buf.sd = dcesrv_common_get_security_descriptor(mem_ctx, dce_ctx, scfg);
return WERR_OK;
}
@@ -1323,7 +1322,7 @@ static WERROR dcesrv_srvsvc_NetShareSetInfo(struct dcesrv_call_state *dce_call,
r->in.info.info502->type,
r->in.info.info502->max_users,
0,
- r->in.info.info502->sd);
+ r->in.info.info502->sd_buf.sd);
if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index 6bc5be40a6..76a29851e1 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -102,11 +102,11 @@ static void test_displayshares(struct libnet_ListShares s)
for (j = 0; j < ARRAY_SIZE(share_types); j++) {
if (share_types[j].type == info->type) break;
}
- d_printf("\t[%d] %s\t%s\n\t %s\n\t [perms=0x%08x, max_usr=%d, cur_usr=%d, path=%s, pass=%s, unknown=0x%08x]\n",
+ d_printf("\t[%d] %s\t%s\n\t %s\n\t [perms=0x%08x, max_usr=%d, cur_usr=%d, path=%s, pass=%s]\n",
i, info->name, share_types[j].desc, info->comment,
info->permissions, info->max_users,
info->current_users, info->path,
- info->password, info->unknown);
+ info->password);
}
break;
}
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index c53c4b72c7..5aff213533 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -2153,7 +2153,7 @@ static struct security_descriptor *get_sharesec(TALLOC_CTX *mem_ctx,
return NULL;
}
- result = talloc_steal(mem_ctx, r.out.info.info502->sd);
+ result = talloc_steal(mem_ctx, r.out.info.info502->sd_buf.sd);
talloc_free(tmp_ctx);
return result;
}
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 1fe1221b0d..9b475ab826 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -444,6 +444,7 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
struct srvsvc_NetShareSetInfo r;
struct srvsvc_NetShareGetInfo q;
struct srvsvc_NetShareDel d;
+ struct sec_desc_buf sd_buf;
struct {
uint32_t level;
WERROR expected;
@@ -524,6 +525,7 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
r.in.info.info501->csc_policy = 0;
break;
case 502:
+ ZERO_STRUCT(sd_buf);
r.in.info.info502 = talloc(tctx, struct srvsvc_NetShareInfo502);
r.in.info.info502->name = r.in.share_name;
r.in.info.info502->type = STYPE_DISKTREE;
@@ -533,8 +535,7 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
r.in.info.info502->current_users = 1;
r.in.info.info502->path = talloc_strdup(tctx, "C:\\");
r.in.info.info502->password = NULL;
- r.in.info.info502->unknown = 0;
- r.in.info.info502->sd = NULL;
+ r.in.info.info502->sd_buf = sd_buf;
break;
case 1004:
r.in.info.info1004 = talloc(tctx, struct srvsvc_NetShareInfo1004);