summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-04 20:03:14 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 13:22:14 +0200
commit582a48d89ce5e9650e6a5b293c06b2294cac0841 (patch)
treeb6532f87037c8c8754cd6ecc254ae4c726ba3f78 /source3
parentf97cb336fcc8a20e559b732d7fef0f0c40a165c1 (diff)
downloadsamba-582a48d89ce5e9650e6a5b293c06b2294cac0841.tar.gz
samba-582a48d89ce5e9650e6a5b293c06b2294cac0841.tar.xz
samba-582a48d89ce5e9650e6a5b293c06b2294cac0841.zip
netapi: add skeleton for NetShareSetInfo.
Guenther (This used to be commit 4d7947e54959c6a445e8b0f7a8313fe232c1fb8f)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/netapi/libnetapi.c48
-rw-r--r--source3/lib/netapi/libnetapi.h9
-rw-r--r--source3/lib/netapi/share.c18
3 files changed, 75 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c
index 2ad63e37dd5..1f3f2d9bdbe 100644
--- a/source3/lib/netapi/libnetapi.c
+++ b/source3/lib/netapi/libnetapi.c
@@ -2010,3 +2010,51 @@ NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */,
return r.out.result;
}
+/****************************************************************
+ NetShareSetInfo
+****************************************************************/
+
+NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */,
+ const char * net_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [in] [ref] */,
+ uint32_t *parm_err /* [out] [ref] */)
+{
+ struct NetShareSetInfo r;
+ struct libnetapi_ctx *ctx = NULL;
+ NET_API_STATUS status;
+ WERROR werr;
+
+ status = libnetapi_getctx(&ctx);
+ if (status != 0) {
+ return status;
+ }
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.net_name = net_name;
+ r.in.level = level;
+ r.in.buffer = buffer;
+
+ /* Out parameters */
+ r.out.parm_err = parm_err;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(NetShareSetInfo, &r);
+ }
+
+ if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+ werr = NetShareSetInfo_l(ctx, &r);
+ } else {
+ werr = NetShareSetInfo_r(ctx, &r);
+ }
+
+ r.out.result = W_ERROR_V(werr);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(NetShareSetInfo, &r);
+ }
+
+ return r.out.result;
+}
+
diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h
index 9c7aff82d20..00ad4de4798 100644
--- a/source3/lib/netapi/libnetapi.h
+++ b/source3/lib/netapi/libnetapi.h
@@ -360,4 +360,13 @@ WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
struct NetShareGetInfo *r);
WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
struct NetShareGetInfo *r);
+NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */,
+ const char * net_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [in] [ref] */,
+ uint32_t *parm_err /* [out] [ref] */);
+WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
+ struct NetShareSetInfo *r);
+WERROR NetShareSetInfo_l(struct libnetapi_ctx *ctx,
+ struct NetShareSetInfo *r);
#endif /* __LIBNETAPI_LIBNETAPI__ */
diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c
index 1b3cd4abc8a..36f8133f7da 100644
--- a/source3/lib/netapi/share.c
+++ b/source3/lib/netapi/share.c
@@ -461,3 +461,21 @@ WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
{
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareGetInfo);
}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
+ struct NetShareSetInfo *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetShareSetInfo_l(struct libnetapi_ctx *ctx,
+ struct NetShareSetInfo *r)
+{
+ LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareSetInfo);
+}