int plus_allowed = 1;
char *file_host;
char *file_user;
- FILE *fp = fopen(equiv_file, "r");
+ FILE *fp = sys_fopen(equiv_file, "r");
DEBUG(5, ("check_user_equiv %s %s %s\n", user, remote, equiv_file));
if (! fp) return False;
while(fgets(buf, sizeof(buf), fp))
make_nmb_name(&calling, local_machine, 0x0 , scope);
make_nmb_name(&called , desthost , 0x20, scope);
- if (!cli_session_request(cli, &calling, &called))
- {
- DEBUG(1,("%s rejected the session\n",desthost));
+ if (!cli_session_request(cli, &calling, &called)) {
+ /* try with *SMBSERVER if the first name fails */
cli_shutdown(cli);
- return NULL;
+ make_nmb_name(&called , "*SMBSERVER", 0x20, scope);
+ if (!cli_initialise(cli) ||
+ !cli_connect(cli, desthost, &dest_ip) ||
+ !cli_session_request(cli, &calling, &called)) {
+ DEBUG(1,("%s rejected the session\n",desthost));
+ cli_shutdown(cli);
+ return NULL;
+ }
}
DEBUG(3,("got session\n"));