svn commit: samba r12015 - branches/SAMBA_3_0/source/client
trunk/source/client
gd at samba.org
gd at samba.org
Fri Dec 2 10:26:29 GMT 2005
Author: gd
Date: 2005-12-02 10:26:29 +0000 (Fri, 02 Dec 2005)
New Revision: 12015
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12015
Log:
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
Modified:
branches/SAMBA_3_0/source/client/smbspool.c
trunk/source/client/smbspool.c
Changeset:
Modified: branches/SAMBA_3_0/source/client/smbspool.c
===================================================================
--- branches/SAMBA_3_0/source/client/smbspool.c 2005-12-02 07:30:34 UTC (rev 12014)
+++ branches/SAMBA_3_0/source/client/smbspool.c 2005-12-02 10:26:29 UTC (rev 12015)
@@ -461,6 +461,7 @@
{
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 @@
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...
*/
Modified: trunk/source/client/smbspool.c
===================================================================
--- trunk/source/client/smbspool.c 2005-12-02 07:30:34 UTC (rev 12014)
+++ trunk/source/client/smbspool.c 2005-12-02 10:26:29 UTC (rev 12015)
@@ -461,6 +461,7 @@
{
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 @@
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...
*/
More information about the samba-cvs
mailing list