mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +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 used to be commit 1136862e6d
)
This commit is contained in:
parent
15615dc1f6
commit
4e5cdfb668
@ -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...
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user