svn commit: samba r18315 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/common rpc_server/srvsvc

idra at samba.org idra at samba.org
Sun Sep 10 00:41:16 GMT 2006


Author: idra
Date: 2006-09-10 00:41:15 +0000 (Sun, 10 Sep 2006)
New Revision: 18315

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18315

Log:

Implement netSrvGetInfo level 102
fix names to be consistent between level 101 and 102 and typo in idl


Modified:
   branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
   branches/SAMBA_4_0/source/rpc_server/common/server_info.c
   branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl	2006-09-09 23:50:44 UTC (rev 18314)
+++ branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl	2006-09-10 00:41:15 UTC (rev 18315)
@@ -626,8 +626,8 @@
 	typedef struct {
 		srvsvc_PlatformId platform_id;
 		[string,charset(UTF16)] uint16 *server_name;
-		uint32 ver_major;
-		uint32 ver_minor;
+		uint32 version_major;
+		uint32 version_minor;
 		svcctl_ServerType server_type;
 		[string,charset(UTF16)] uint16 *comment;
 		uint32 users;
@@ -635,7 +635,7 @@
 		uint32 hidden;
 		uint32 announce;
 		uint32 anndelta;
-		uint32 licences;
+		uint32 licenses;
 		[string,charset(UTF16)] uint16 *userpath;
 	} srvsvc_NetSrvInfo102;
 

Modified: branches/SAMBA_4_0/source/rpc_server/common/server_info.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/common/server_info.c	2006-09-09 23:50:44 UTC (rev 18314)
+++ branches/SAMBA_4_0/source/rpc_server/common/server_info.c	2006-09-10 00:41:15 UTC (rev 18315)
@@ -89,3 +89,47 @@
 {
 	return talloc_strdup(mem_ctx, "");
 }
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_users(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return -1;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_disc(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return 15;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_hidden(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return 0;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_announce(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return 240;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_anndelta(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return 3000;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_licenses(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return 0;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ const char *dcesrv_common_get_userpath(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
+{
+	return talloc_strdup(mem_ctx, "c:\\");
+}
+
+

Modified: branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c	2006-09-09 23:50:44 UTC (rev 18314)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c	2006-09-10 00:41:15 UTC (rev 18315)
@@ -1025,6 +1025,35 @@
 		r->out.info.info101 = info101;
 		return WERR_OK;
 	}
+	case 102:
+	{
+		struct srvsvc_NetSrvInfo102 *info102;
+
+		info102 = talloc(mem_ctx, struct srvsvc_NetSrvInfo102);
+		W_ERROR_HAVE_NO_MEMORY(info102);
+
+		info102->platform_id	= dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
+		info102->server_name	= dcesrv_common_get_server_name(mem_ctx, dce_ctx, r->in.server_unc);
+		W_ERROR_HAVE_NO_MEMORY(info102->server_name);
+
+		info102->version_major	= dcesrv_common_get_version_major(mem_ctx, dce_ctx);
+		info102->version_minor	= dcesrv_common_get_version_minor(mem_ctx, dce_ctx);
+		info102->server_type	= dcesrv_common_get_server_type(mem_ctx, dce_ctx);
+		info102->comment	= talloc_strdup(mem_ctx, lp_serverstring());
+		W_ERROR_HAVE_NO_MEMORY(info102->comment);
+
+		info102->users		= dcesrv_common_get_users(mem_ctx, dce_ctx);
+		info102->disc		= dcesrv_common_get_disc(mem_ctx, dce_ctx);
+		info102->hidden		= dcesrv_common_get_hidden(mem_ctx, dce_ctx);
+		info102->announce	= dcesrv_common_get_announce(mem_ctx, dce_ctx);
+		info102->anndelta	= dcesrv_common_get_anndelta(mem_ctx, dce_ctx);
+		info102->licenses	= dcesrv_common_get_licenses(mem_ctx, dce_ctx);
+		info102->userpath	= dcesrv_common_get_userpath(mem_ctx, dce_ctx);
+		W_ERROR_HAVE_NO_MEMORY(info102->userpath);
+
+		r->out.info.info102 = info102;
+		return WERR_OK;
+	}
 	default:
 		return WERR_UNKNOWN_LEVEL;
 	}



More information about the samba-cvs mailing list