summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-12-02 10:26:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:41 -0500
commit4e5cdfb66841d3bee45173ac6d45d53add5f4eb8 (patch)
treecad4e43c9be764c8ef27b076f20dd67f3f78c94b /source3/client
parent15615dc1f6d3578fc4f14a19babb265be37bf576 (diff)
downloadsamba-4e5cdfb66841d3bee45173ac6d45d53add5f4eb8.tar.gz
samba-4e5cdfb66841d3bee45173ac6d45d53add5f4eb8.tar.bz2
samba-4e5cdfb66841d3bee45173ac6d45d53add5f4eb8.zip
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 1136862e6d6058df4ed027b75dbae40374712bac)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/smbspool.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index aff241adee..7fe918413d 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -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...
*/