[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jan 31 15:29:03 MST 2012


The branch, master has been updated
       via  a1901b5 Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
       via  6b8a4c9 s3:client: ignore SMBecho errors (the server may not support it) (bug #8139)
       via  27c686d Revert "Fix bug #8139 - smbclient fails if server does not support Echo request."
      from  507872f s3:smbd: inline code in reply_sesssetup_and_X_spnego()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a1901b55cfa658f39a33d0ea120641f56453fe4e
Author: Ira Cooper <samba at ira.wakeful.net>
Date:   Tue Jan 31 12:15:36 2012 -0800

    Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104

commit 6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 31 08:47:38 2012 +0100

    s3:client: ignore SMBecho errors (the server may not support it) (bug #8139)
    
    metze

commit 27c686dd70daf6a565c83c037e1ced09212cfff6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 31 08:41:07 2012 +0100

    Revert "Fix bug #8139 - smbclient fails if server does not support Echo request."
    
    This reverts commit 1fdc96ecaff8ca12e9aa0082527468ad4242a8a9.
    
    This is wrong in master as the error codes are different compared to
    3.5.x. The correct way to handle this is to call cli_state_is_connected().
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/replace.h       |   11 +++++++++++
 lib/replace/system/passwd.h |    2 ++
 source3/client/client.c     |   14 +++++++-------
 3 files changed, 20 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index c081f23..c47cf1c 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -802,4 +802,15 @@ int fdatasync(int );
 /* prototype is in "system/network.h" */
 #endif
 
+#if !defined(getpass)
+#ifdef REPLACE_GETPASS
+#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
+#define getpass(prompt) getpassphrase(prompt)
+#else
+#define getpass(prompt) rep_getpass(prompt)
+char *rep_getpass(const char *prompt);
+#endif
+#endif
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
diff --git a/lib/replace/system/passwd.h b/lib/replace/system/passwd.h
index f630012..223324c 100644
--- a/lib/replace/system/passwd.h
+++ b/lib/replace/system/passwd.h
@@ -67,6 +67,7 @@
 #include <compat.h>
 #endif
 
+#if !defined(getpass)
 #ifdef REPLACE_GETPASS
 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
 #define getpass(prompt) getpassphrase(prompt)
@@ -75,6 +76,7 @@
 char *rep_getpass(const char *prompt);
 #endif
 #endif
+#endif 
 
 #ifndef NGROUPS_MAX
 #define NGROUPS_MAX 32 /* Guess... */
diff --git a/source3/client/client.c b/source3/client/client.c
index 9b36ff7..89fd1d4 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5032,15 +5032,15 @@ static void readline_callback(void)
 	/* Ping the server to keep the connection alive using SMBecho. */
 	memset(garbage, 0xf0, sizeof(garbage));
 	status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
-	if (NT_STATUS_EQUAL(status, NT_STATUS_PIPE_BROKEN) ||
-			NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-			NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
-		DEBUG(0, ("SMBecho failed (%s). Maybe server has closed "
-			"the connection\n", nt_errstr(status)));
+	if (NT_STATUS_IS_OK(status)) {
+		return;
+	}
+
+	if (!cli_state_is_connected(cli)) {
+		DEBUG(0,("SMBecho failed (%s). The connection is "
+			 "disconnected now\n", nt_errstr(status)));
 		finished = true;
 		smb_readline_done();
-		/* Ignore all other errors - sometimes servers simply
-		   don't implement SMBecho (Apple for example). */
 	}
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list