Index: samba/source/smbd/service.c =================================================================== --- samba/source/smbd/service.c.orig +++ samba/source/smbd/service.c @@ -836,6 +836,15 @@ static connection_struct *make_connectio get_current_username(), current_user_info.domain, s, sizeof(s)); + + if (strlen(s) == 0) { + DEBUG(6, ("service [%s] did not resolve to a path\n", + lp_servicename(snum))); + conn_free(conn); + *status = NT_STATUS_BAD_NETWORK_NAME; + return NULL; + } + set_conn_connectpath(conn,s); DEBUG(3,("Connect path is '%s' for service [%s]\n",s, lp_servicename(snum)));