mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
netapi: add skeleton for NetUserSetGroups.
Guenther
(This used to be commit 165be948fa
)
This commit is contained in:
@ -825,6 +825,54 @@ NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */,
|
|||||||
return r.out.result;
|
return r.out.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
NetUserSetGroups
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
|
NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
|
||||||
|
const char * user_name /* [in] */,
|
||||||
|
uint32_t level /* [in] */,
|
||||||
|
uint8_t *buffer /* [in] [ref] */,
|
||||||
|
uint32_t num_entries /* [in] */)
|
||||||
|
{
|
||||||
|
struct NetUserSetGroups 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;
|
||||||
|
r.in.num_entries = num_entries;
|
||||||
|
|
||||||
|
/* Out parameters */
|
||||||
|
|
||||||
|
if (DEBUGLEVEL >= 10) {
|
||||||
|
NDR_PRINT_IN_DEBUG(NetUserSetGroups, &r);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LIBNETAPI_LOCAL_SERVER(server_name)) {
|
||||||
|
werr = NetUserSetGroups_l(ctx, &r);
|
||||||
|
} else {
|
||||||
|
werr = NetUserSetGroups_r(ctx, &r);
|
||||||
|
}
|
||||||
|
|
||||||
|
r.out.result = W_ERROR_V(werr);
|
||||||
|
|
||||||
|
if (DEBUGLEVEL >= 10) {
|
||||||
|
NDR_PRINT_OUT_DEBUG(NetUserSetGroups, &r);
|
||||||
|
}
|
||||||
|
|
||||||
|
return r.out.result;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
NetUserModalsGet
|
NetUserModalsGet
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
@ -145,6 +145,15 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
|
|||||||
struct NetUserGetGroups *r);
|
struct NetUserGetGroups *r);
|
||||||
WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
|
WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
|
||||||
struct NetUserGetGroups *r);
|
struct NetUserGetGroups *r);
|
||||||
|
NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
|
||||||
|
const char * user_name /* [in] */,
|
||||||
|
uint32_t level /* [in] */,
|
||||||
|
uint8_t *buffer /* [in] [ref] */,
|
||||||
|
uint32_t num_entries /* [in] */);
|
||||||
|
WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
|
||||||
|
struct NetUserSetGroups *r);
|
||||||
|
WERROR NetUserSetGroups_l(struct libnetapi_ctx *ctx,
|
||||||
|
struct NetUserSetGroups *r);
|
||||||
NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
|
NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
|
||||||
uint32_t level /* [in] */,
|
uint32_t level /* [in] */,
|
||||||
uint8_t **buffer /* [out] [ref] */);
|
uint8_t **buffer /* [out] [ref] */);
|
||||||
|
@ -2923,3 +2923,22 @@ WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
|
|||||||
{
|
{
|
||||||
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetUserGetGroups);
|
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetUserGetGroups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
|
||||||
|
struct NetUserSetGroups *r)
|
||||||
|
{
|
||||||
|
return WERR_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
****************************************************************/
|
||||||
|
|
||||||
|
WERROR NetUserSetGroups_l(struct libnetapi_ctx *ctx,
|
||||||
|
struct NetUserSetGroups *r)
|
||||||
|
{
|
||||||
|
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetUserSetGroups);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user