summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/serverinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/netapi/serverinfo.c')
-rw-r--r--source3/lib/netapi/serverinfo.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index 6cd074615b..7fa166e411 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -22,6 +22,9 @@
#include "lib/netapi/netapi.h"
#include "libnet/libnet.h"
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerGetInfoLocal_1005(struct libnetapi_ctx *ctx,
uint8_t **buffer)
{
@@ -36,6 +39,9 @@ static WERROR NetServerGetInfoLocal_1005(struct libnetapi_ctx *ctx,
return WERR_OK;
}
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerGetInfoLocal(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -51,6 +57,9 @@ static WERROR NetServerGetInfoLocal(struct libnetapi_ctx *ctx,
return WERR_UNKNOWN_LEVEL;
}
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerGetInfoRemote(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -102,6 +111,9 @@ static WERROR NetServerGetInfoRemote(struct libnetapi_ctx *ctx,
return werr;
}
+/****************************************************************
+****************************************************************/
+
static WERROR libnetapi_NetServerGetInfo(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -121,6 +133,10 @@ static WERROR libnetapi_NetServerGetInfo(struct libnetapi_ctx *ctx,
}
+/****************************************************************
+ NetServerGetInfo
+****************************************************************/
+
NET_API_STATUS NetServerGetInfo(const char *server_name,
uint32_t level,
uint8_t **buffer)
@@ -142,17 +158,18 @@ NET_API_STATUS NetServerGetInfo(const char *server_name,
return W_ERROR_V(werr);
}
- return 0;
+ return NET_API_STATUS_SUCCESS;
}
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerSetInfoLocal_1005(struct libnetapi_ctx *ctx,
uint8_t *buffer,
uint32_t *parm_error)
{
WERROR werr;
struct libnet_conf_ctx *conf_ctx;
- TALLOC_CTX *mem_ctx;
-
struct srvsvc_NetSrvInfo1005 *info1005;
if (!buffer) {
@@ -171,8 +188,7 @@ static WERROR NetServerSetInfoLocal_1005(struct libnetapi_ctx *ctx,
return WERR_NOT_SUPPORTED;
}
- mem_ctx = talloc_stackframe();
- werr = libnet_conf_open(mem_ctx, &conf_ctx);
+ werr = libnet_conf_open(ctx, &conf_ctx);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
@@ -181,12 +197,14 @@ static WERROR NetServerSetInfoLocal_1005(struct libnetapi_ctx *ctx,
"server string",
info1005->comment);
-done:
+ done:
libnet_conf_close(conf_ctx);
- TALLOC_FREE(mem_ctx);
return werr;
}
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerSetInfoLocal(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -203,6 +221,9 @@ static WERROR NetServerSetInfoLocal(struct libnetapi_ctx *ctx,
return WERR_UNKNOWN_LEVEL;
}
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerSetInfoRemote(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -263,6 +284,9 @@ static WERROR NetServerSetInfoRemote(struct libnetapi_ctx *ctx,
return werr;
}
+/****************************************************************
+****************************************************************/
+
static WERROR libnetapi_NetServerSetInfo(struct libnetapi_ctx *ctx,
const char *server_name,
uint32_t level,
@@ -284,6 +308,9 @@ static WERROR libnetapi_NetServerSetInfo(struct libnetapi_ctx *ctx,
parm_error);
}
+/****************************************************************
+ NetServerSetInfo
+****************************************************************/
NET_API_STATUS NetServerSetInfo(const char *server_name,
uint32_t level,
@@ -308,5 +335,5 @@ NET_API_STATUS NetServerSetInfo(const char *server_name,
return W_ERROR_V(werr);
}
- return 0;
+ return NET_API_STATUS_SUCCESS;
}