diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-11-01 15:50:52 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-11-01 15:50:52 +0100 |
commit | d3df4061d9e0a3f0cae161022ee9253b7295bd58 (patch) | |
tree | 24d09fefba4f121e34d1c434e0fb6348931931e9 /source4/rpc_server/wkssvc | |
parent | 1b05be10399a8fab80072e7aaccd55a3f6e8f651 (diff) | |
download | samba-d3df4061d9e0a3f0cae161022ee9253b7295bd58.tar.gz samba-d3df4061d9e0a3f0cae161022ee9253b7295bd58.tar.bz2 samba-d3df4061d9e0a3f0cae161022ee9253b7295bd58.zip |
Use struct for server versions.
Diffstat (limited to 'source4/rpc_server/wkssvc')
-rw-r--r-- | source4/rpc_server/wkssvc/dcesrv_wkssvc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c index cbade288ca..e23485aea9 100644 --- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c +++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c @@ -23,6 +23,7 @@ #include "rpc_server/dcerpc_server.h" #include "librpc/gen_ndr/ndr_wkssvc.h" #include "rpc_server/common/common.h" +#include "param/param.h" /* wkssvc_NetWkstaGetInfo @@ -31,6 +32,7 @@ static WERROR dcesrv_wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, struct wkssvc_NetWkstaGetInfo *r) { struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx; + struct dcerpc_server_info *server_info = lp_dcerpc_server_info(mem_ctx, dce_ctx->lp_ctx); ZERO_STRUCT(r->out); r->out.info = talloc_zero(mem_ctx, union wkssvc_NetWkstaInfo); @@ -49,10 +51,10 @@ static WERROR dcesrv_wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, info100->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx); info100->server_name = dcesrv_common_get_server_name(mem_ctx, dce_ctx, NULL); W_ERROR_HAVE_NO_MEMORY(info100->server_name); - info100->domain_name = dcesrv_common_get_domain_name(mem_ctx, dce_ctx); + info100->domain_name = talloc_reference(mem_ctx, server_info->domain_name); W_ERROR_HAVE_NO_MEMORY(info100->domain_name); - info100->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx->lp_ctx); - info100->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx->lp_ctx); + info100->version_major = server_info->version_major; + info100->version_minor = server_info->version_minor; r->out.info->info100 = info100; return WERR_OK; @@ -67,10 +69,10 @@ static WERROR dcesrv_wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, info101->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx); info101->server_name = dcesrv_common_get_server_name(mem_ctx, dce_ctx, NULL); W_ERROR_HAVE_NO_MEMORY(info101->server_name); - info101->domain_name = dcesrv_common_get_domain_name(mem_ctx, dce_ctx); + info101->domain_name = talloc_reference(mem_ctx, server_info->domain_name); W_ERROR_HAVE_NO_MEMORY(info101->domain_name); - info101->version_major = dcesrv_common_get_version_major(mem_ctx, dce_ctx->lp_ctx); - info101->version_minor = dcesrv_common_get_version_minor(mem_ctx, dce_ctx->lp_ctx); + info101->version_major = server_info->version_major; + info101->version_minor = server_info->version_minor; info101->lan_root = dcesrv_common_get_lan_root(mem_ctx, dce_ctx); r->out.info->info101 = info101; |