[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Thu Sep 11 14:03:04 MDT 2014


The branch, v4-0-test has been updated
       via  a48e472 selftest: Fix selftest where pid is used uninitialized.
       via  836d1ec s3: smbd: vfs_dirsort module.
      from  d14c83e s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit a48e4729be5017a6c0f876f56ac9f0a7754abe83
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 4 12:55:53 2014 +0200

    selftest: Fix selftest where pid is used uninitialized.
    
    On my system this gets evaluated to 0 so in the end we detect samba to
    be running cause $childpid is set to 0.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10793
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Sep  4 17:09:17 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 6d2f56dbaf84203b351f33179cc3feaf557e0683)
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Thu Sep 11 22:02:42 CEST 2014 on sn-devel-104

commit 836d1eca08ae7e029586e5707640ff346c8e3934
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Sep 3 07:54:51 2014 -0700

    s3: smbd: vfs_dirsort module.
    
    Fix an off-by-one check that would cause seekdir to
    seek off the end of the cached array.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ronnie Sahlberg <ronniesahlberg.gmail.com>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Sep  3 19:59:54 CEST 2014 on sn-devel-104
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10794
    vfs_dirsort has an off-by-one error that can cause uninitialized memory read

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

Summary of changes:
 selftest/target/Samba.pm      |    7 ++++++-
 source3/modules/vfs_dirsort.c |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index d811053..5f18a47 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -186,7 +186,12 @@ sub get_interface($)
 sub cleanup_child($$)
 {
     my ($pid, $name) = @_;
-    my $childpid = waitpid($pid, WNOHANG);
+    my $childpid = -1;
+
+    if (defined($pid)) {
+        $childpid = waitpid($pid, WNOHANG);
+    }
+
     if ($childpid == 0) {
     } elsif ($childpid < 0) {
 	printf STDERR "%s child process %d isn't here any more\n",
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index 72b46c9..1d46e43 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -261,7 +261,7 @@ static void dirsort_seekdir(vfs_handle_struct *handle, DIR *dirp,
 	if (data == NULL) {
 		return;
 	}
-	if (offset > data->number_of_entries) {
+	if (offset >= data->number_of_entries) {
 		return;
 	}
 	data->pos = offset;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list