summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-25 01:02:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:10 -0500
commit9628e714ccc935c7c90c36c071c9193020c96155 (patch)
tree8d431edf581d66da59dcb40d43c3f6fe96e8952d /source4/rpc_server
parenteb66b26cd18ceef2368506479d90bf7e4f0f83a0 (diff)
downloadsamba-9628e714ccc935c7c90c36c071c9193020c96155.tar.gz
samba-9628e714ccc935c7c90c36c071c9193020c96155.tar.bz2
samba-9628e714ccc935c7c90c36c071c9193020c96155.zip
r14702: Accept our netbios aliases as valid names in the SPOOLSS server.
(Suggested by metze) Andrew Bartlett (This used to be commit 3dff2a0078e541392f585d81f7aea987c87edbf1)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index c8c0594612..9ff2bcf635 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -145,6 +145,8 @@ static WERROR spoolss_check_server_name(struct dcesrv_call_state *dce_call,
{
BOOL ret;
struct socket_address *myaddr;
+ const char **aliases;
+ int i;
/* NULL is ok */
if (!server_name) return WERR_OK;
@@ -169,6 +171,14 @@ static WERROR spoolss_check_server_name(struct dcesrv_call_state *dce_call,
ret = strequal(lp_netbios_name(), server_name);
if (ret) return WERR_OK;
+ aliases = lp_netbios_aliases();
+
+ for (i=0; aliases && aliases[i]; i++) {
+ if (strequal(aliases[i], server_name)) {
+ return WERR_OK;
+ }
+ }
+
/* DNS NAME is ok
* TODO: we need to check if aliases are also ok
*/