From 9628e714ccc935c7c90c36c071c9193020c96155 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 25 Mar 2006 01:02:10 +0000 Subject: r14702: Accept our netbios aliases as valid names in the SPOOLSS server. (Suggested by metze) Andrew Bartlett (This used to be commit 3dff2a0078e541392f585d81f7aea987c87edbf1) --- source4/rpc_server/spoolss/dcesrv_spoolss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 */ -- cgit