diff options
author | Günther Deschner <gd@samba.org> | 2008-09-04 20:03:14 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-09-05 13:22:14 +0200 |
commit | 582a48d89ce5e9650e6a5b293c06b2294cac0841 (patch) | |
tree | b6532f87037c8c8754cd6ecc254ae4c726ba3f78 /source3/lib/netapi/libnetapi.c | |
parent | f97cb336fcc8a20e559b732d7fef0f0c40a165c1 (diff) | |
download | samba-582a48d89ce5e9650e6a5b293c06b2294cac0841.tar.gz samba-582a48d89ce5e9650e6a5b293c06b2294cac0841.tar.bz2 samba-582a48d89ce5e9650e6a5b293c06b2294cac0841.zip |
netapi: add skeleton for NetShareSetInfo.
Guenther
(This used to be commit 4d7947e54959c6a445e8b0f7a8313fe232c1fb8f)
Diffstat (limited to 'source3/lib/netapi/libnetapi.c')
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 2ad63e37dd..1f3f2d9bdb 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; +} + |