summaryrefslogtreecommitdiffstats
path: root/source3/lib/netapi/tests/netshare.c
diff options
context:
space:
mode:
authorHans Leidekker <hans@meelstraat.net>2013-11-18 18:32:41 +0100
committerGünther Deschner <gd@samba.org>2013-11-19 21:48:17 +0100
commit4503bdf560f0e9461ac4eb1fe6220f6440c10fd3 (patch)
tree487bcc91973b007d3752f0c042eef6a80964cfdf /source3/lib/netapi/tests/netshare.c
parentec9f4d5c9b76b7b76dd0d5b3e9aa4a8eece8b659 (diff)
downloadsamba-4503bdf560f0e9461ac4eb1fe6220f6440c10fd3.tar.gz
samba-4503bdf560f0e9461ac4eb1fe6220f6440c10fd3.tar.xz
samba-4503bdf560f0e9461ac4eb1fe6220f6440c10fd3.zip
netapi: Add support for info level 502 in NetShareAdd.
Signed-off-by: Hans Leidekker <hans@meelstraat.net> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Nov 19 21:48:17 CET 2013 on sn-devel-104
Diffstat (limited to 'source3/lib/netapi/tests/netshare.c')
-rw-r--r--source3/lib/netapi/tests/netshare.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/netapi/tests/netshare.c b/source3/lib/netapi/tests/netshare.c
index 84af9e0827..a518ce9577 100644
--- a/source3/lib/netapi/tests/netshare.c
+++ b/source3/lib/netapi/tests/netshare.c
@@ -124,6 +124,7 @@ NET_API_STATUS netapitest_share(struct libnetapi_ctx *ctx,
const char *sharename, *comment;
uint8_t *buffer = NULL;
struct SHARE_INFO_2 i2;
+ struct SHARE_INFO_502 i502;
struct SHARE_INFO_1004 i1004;
struct SHARE_INFO_501 *i501 = NULL;
uint32_t parm_err = 0;
@@ -142,6 +143,23 @@ NET_API_STATUS netapitest_share(struct libnetapi_ctx *ctx,
printf("testing NetShareAdd\n");
+ ZERO_STRUCT(i502);
+
+ i502.shi502_netname = sharename;
+ i502.shi502_path = "c:\\";
+
+ status = NetShareAdd(hostname, 502, (uint8_t *)&i502, &parm_err);
+ if (status) {
+ NETAPI_STATUS(ctx, status, "NetShareAdd");
+ goto out;
+ };
+
+ status = NetShareDel(hostname, sharename, 0);
+ if (status) {
+ NETAPI_STATUS(ctx, status, "NetShareDel");
+ goto out;
+ };
+
ZERO_STRUCT(i2);
i2.shi2_netname = sharename;