diff options
author | Günther Deschner <gd@samba.org> | 2008-07-17 01:00:33 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-18 17:21:44 +0200 |
commit | c7b151e78c704ff878d11894c2e22aa2454dcff0 (patch) | |
tree | 3189776099103cdf64f64b39ea47b2133bde2634 /source3/lib | |
parent | 757bc51539fb015f946511cd137ae5609e0add7a (diff) | |
download | samba-c7b151e78c704ff878d11894c2e22aa2454dcff0.tar.gz samba-c7b151e78c704ff878d11894c2e22aa2454dcff0.tar.bz2 samba-c7b151e78c704ff878d11894c2e22aa2454dcff0.zip |
netapi: add skeleton for NetUserSetInfo.
Guenther
(This used to be commit 8cc555602f53f6afaded2eff58ed57f87b915c64)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 48 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 9 | ||||
-rw-r--r-- | source3/lib/netapi/user.c | 18 |
3 files changed, 75 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 8013c74fd6..567fab6113 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -678,6 +678,54 @@ NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */, } /**************************************************************** + NetUserSetInfo +****************************************************************/ + +NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */) +{ + struct NetUserSetInfo 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.user_name = user_name; + r.in.level = level; + r.in.buffer = buffer; + + /* Out parameters */ + r.out.parm_err = parm_err; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetUserSetInfo, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetUserSetInfo_l(ctx, &r); + } else { + werr = NetUserSetInfo_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetUserSetInfo, &r); + } + + return r.out.result; +} + +/**************************************************************** NetQueryDisplayInformation ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 349c3c1d3c..f104b72f30 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -116,6 +116,15 @@ WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx, struct NetUserGetInfo *r); WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx, struct NetUserGetInfo *r); +NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */, + const char * user_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */); +WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx, + struct NetUserSetInfo *r); +WERROR NetUserSetInfo_l(struct libnetapi_ctx *ctx, + struct NetUserSetInfo *r); NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */, uint32_t level /* [in] */, uint32_t idx /* [in] */, diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index b318aa66dc..2c18cd0282 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -1204,3 +1204,21 @@ WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx, return WERR_NOT_SUPPORTED; } +/**************************************************************** +****************************************************************/ + +WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx, + struct NetUserSetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetUserSetInfo_l(struct libnetapi_ctx *ctx, + struct NetUserSetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + |