mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
netapi: add NetShareDel skeleton.
Guenther
(This used to be commit 5b6e4740ea
)
This commit is contained in:
@ -1819,3 +1819,47 @@ NET_API_STATUS NetShareAdd(const char * server_name /* [in] */,
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetShareDel
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetShareDel(const char * server_name /* [in] */,
|
||||
const char * net_name /* [in] */,
|
||||
uint32_t reserved /* [in] */)
|
||||
{
|
||||
struct NetShareDel 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.net_name = net_name;
|
||||
r.in.reserved = reserved;
|
||||
|
||||
/* Out parameters */
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetShareDel, &r);
|
||||
}
|
||||
|
||||
if (LIBNETAPI_LOCAL_SERVER(server_name)) {
|
||||
werr = NetShareDel_l(ctx, &r);
|
||||
} else {
|
||||
werr = NetShareDel_r(ctx, &r);
|
||||
}
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetShareDel, &r);
|
||||
}
|
||||
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user