summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
*/