mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
netapi: add skeleton for NetGroupEnum().
Guenther
(This used to be commit 21a0d9d254
)
This commit is contained in:
@ -771,6 +771,59 @@ NET_API_STATUS NetGroupDel(const char * server_name /* [in] */,
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetGroupEnum
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */,
|
||||
uint32_t prefmaxlen /* [in] */,
|
||||
uint32_t *entries_read /* [out] [ref] */,
|
||||
uint32_t *total_entries /* [out] [ref] */,
|
||||
uint32_t *resume_handle /* [in,out] [ref] */)
|
||||
{
|
||||
struct NetGroupEnum 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.level = level;
|
||||
r.in.prefmaxlen = prefmaxlen;
|
||||
r.in.resume_handle = resume_handle;
|
||||
|
||||
/* Out parameters */
|
||||
r.out.buffer = buffer;
|
||||
r.out.entries_read = entries_read;
|
||||
r.out.total_entries = total_entries;
|
||||
r.out.resume_handle = resume_handle;
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetGroupEnum, &r);
|
||||
}
|
||||
|
||||
if (LIBNETAPI_LOCAL_SERVER(server_name)) {
|
||||
werr = NetGroupEnum_l(ctx, &r);
|
||||
} else {
|
||||
werr = NetGroupEnum_r(ctx, &r);
|
||||
}
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetGroupEnum, &r);
|
||||
}
|
||||
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetGroupSetInfo
|
||||
****************************************************************/
|
||||
|
Reference in New Issue
Block a user