summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-01 18:54:53 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 13:03:36 +0200
commit78a80f18651fa08482427485e024c74120218925 (patch)
tree0a6a4cbd41c1a944087e2217d3da61a9f775b627 /source3/lib/netapi
parentc59158b2258995833373b7c596b0a6e1d09dba4f (diff)
downloadsamba-78a80f18651fa08482427485e024c74120218925.tar.gz
samba-78a80f18651fa08482427485e024c74120218925.tar.bz2
samba-78a80f18651fa08482427485e024c74120218925.zip
netapi: add support for local query of level 101 in NetServerGetInfo.
Guenther (This used to be commit b7a2f27c1cae9abed2f821177fca425012222632)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/serverinfo.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index 12a0808658..b2a134b0af 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -28,6 +28,29 @@
/****************************************************************
****************************************************************/
+static WERROR NetServerGetInfo_l_101(struct libnetapi_ctx *ctx,
+ uint8_t **buffer)
+{
+ struct SERVER_INFO_101 i;
+
+ i.sv101_platform_id = PLATFORM_ID_NT;
+ i.sv101_name = global_myname();
+ i.sv101_version_major = lp_major_announce_version();
+ i.sv101_version_minor = lp_minor_announce_version();
+ i.sv101_type = lp_default_server_announce();
+ i.sv101_comment = lp_serverstring();
+
+ *buffer = (uint8_t *)talloc_memdup(ctx, &i, sizeof(i));
+ if (!*buffer) {
+ return WERR_NOMEM;
+ }
+
+ return WERR_OK;
+}
+
+/****************************************************************
+****************************************************************/
+
static WERROR NetServerGetInfo_l_1005(struct libnetapi_ctx *ctx,
uint8_t **buffer)
{
@@ -49,6 +72,8 @@ WERROR NetServerGetInfo_l(struct libnetapi_ctx *ctx,
struct NetServerGetInfo *r)
{
switch (r->in.level) {
+ case 101:
+ return NetServerGetInfo_l_101(ctx, r->out.buffer);
case 1005:
return NetServerGetInfo_l_1005(ctx, r->out.buffer);
default: