netapi: add skeleton for NetUserGetInfo().
authorGünther Deschner <gd@samba.org>
Wed, 16 Jul 2008 08:47:38 +0000 (10:47 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 18 Jul 2008 15:16:36 +0000 (17:16 +0200)
Guenther
(This used to be commit 84962bf50d2c3265c0134481f24f6fa34f1dfc99)

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

index 0953de6058cb0197e38977efc9125f0503a0972b..8013c74fd6c3c5da71c21341213fbd6cfa5954e4 100644 (file)
@@ -631,6 +631,52 @@ NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */,
        return r.out.result;
 }
 
+/****************************************************************
+ NetUserGetInfo
+****************************************************************/
+
+NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
+                             const char * user_name /* [in] */,
+                             uint32_t level /* [in] */,
+                             uint8_t **buffer /* [out] [ref] */)
+{
+       struct NetUserGetInfo 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;
+
+       /* Out parameters */
+       r.out.buffer = buffer;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(NetUserGetInfo, &r);
+       }
+
+       if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+               werr = NetUserGetInfo_l(ctx, &r);
+       } else {
+               werr = NetUserGetInfo_r(ctx, &r);
+       }
+
+       r.out.result = W_ERROR_V(werr);
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(NetUserGetInfo, &r);
+       }
+
+       return r.out.result;
+}
+
 /****************************************************************
  NetQueryDisplayInformation
 ****************************************************************/
index a6c8e84b6bfd612dedb07f173e11d248a0b51aca..349c3c1d3c761f40a3364defe7acbf2beb1dbf14 100644 (file)
@@ -108,6 +108,14 @@ WERROR NetUserChangePassword_r(struct libnetapi_ctx *ctx,
                               struct NetUserChangePassword *r);
 WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx,
                               struct NetUserChangePassword *r);
+NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
+                             const char * user_name /* [in] */,
+                             uint32_t level /* [in] */,
+                             uint8_t **buffer /* [out] [ref] */);
+WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx,
+                       struct NetUserGetInfo *r);
+WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx,
+                       struct NetUserGetInfo *r);
 NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
                                          uint32_t level /* [in] */,
                                          uint32_t idx /* [in] */,
index 8b1287e300fd1dbb51f62c0e4067fd76ffaaae22..b5e64fb67db54196b845e3883f46bee1061af4ba 100644 (file)
@@ -1082,3 +1082,22 @@ WERROR NetUserChangePassword_l(struct libnetapi_ctx *ctx,
 {
        return WERR_NOT_SUPPORTED;
 }
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx,
+                       struct NetUserGetInfo *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetUserGetInfo_l(struct libnetapi_ctx *ctx,
+                       struct NetUserGetInfo *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
+