mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r14702: Accept our netbios aliases as valid names in the SPOOLSS server.
(Suggested by metze) Andrew Bartlett
This commit is contained in:
parent
cb6c27b4f2
commit
3dff2a0078
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user