1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r12015: When smbspool tries to connect to a printer shared on a standalone

Windows XP box, smbspool has to mimic smbclient behaviour and also send
a password-less NTLMSSP session setup.

Guenther
This commit is contained in:
Günther Deschner 2005-12-02 10:26:29 +00:00 committed by Gerald (Jerry) Carter
parent 270fef5175
commit 1136862e6d

View File

@ -461,6 +461,7 @@ smb_connect(const char *workgroup, /* I - Workgroup */
{
struct cli_state *cli; /* New connection */
pstring myname; /* Client name */
struct passwd *pwd;
/*
* Get the names and addresses of the client and server...
@ -488,12 +489,24 @@ smb_connect(const char *workgroup, /* I - Workgroup */
if (cli ) { return cli; }
/* give a chance for a passwordless NTLMSSP session setup */
pwd = getpwuid(geteuid());
if (pwd == NULL) {
return NULL;
}
cli = smb_complete_connection(myname, server, port, pwd->pw_name, "",
workgroup, share, 0);
if (cli) { return cli; }
/*
* last try. Use anonymous authentication
*/
cli = smb_complete_connection(myname, server, port, "", "",
workgroup, share, 0);
/*
* Return the new connection...
*/