]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netapi: add skeleton for NetUserSetInfo.
authorGünther Deschner <gd@samba.org>
Wed, 16 Jul 2008 23:00:33 +0000 (01:00 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 18 Jul 2008 15:21:44 +0000 (17:21 +0200)
Guenther

source/lib/netapi/libnetapi.c
source/lib/netapi/libnetapi.h
source/lib/netapi/user.c

index 8013c74fd6c3c5da71c21341213fbd6cfa5954e4..567fab611351e2f62544136f1bd93d4e99629e22 100644 (file)
@@ -677,6 +677,54 @@ NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
        return r.out.result;
 }
 
+/****************************************************************
+ 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
 ****************************************************************/
index 349c3c1d3c761f40a3364defe7acbf2beb1dbf14..f104b72f306264fd156f59f0287549f7ad382133 100644 (file)
@@ -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] */,
index b318aa66dcf8260ac67c5ec67a6de0d77b40c918..2c18cd0282a9de091c99aa08ff35f99e12274314 100644 (file)
@@ -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;
+}
+