[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Sep 17 13:49:02 UTC 2019


The branch, master has been updated
       via  16eb80058ca build: Remove tests for getdents() and getdirentries()
       via  5a80f399b51 util_sec.c: Move __thread variable to global scope
       via  98fe813d9cd lib/replace/wscript: Avoid generating nested main function
      from  84f544b55f2 ctdb-client: Fix some typos in debug messages

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


- Log -----------------------------------------------------------------
commit 16eb80058ca4a34df96388c26736590247b6a3f4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 6 07:39:09 2019 +1200

    build: Remove tests for getdents() and getdirentries()
    
    These date back to 3a9beef2b7b25427ee4611cfc375e05cc82a1150 in 2003 and
    829e72fe9c97feaa3d45b768984a4c47b906a23a in 1998 and appear to be related
    to smbwrapper.
    
    More of these should be removed but the getdirents() test caused a timeout
    on an ARM builder in Debian.  It might just be a fluke but the tests are
    pointless regardless.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Tue Sep 17 13:48:18 UTC 2019 on sn-devel-184

commit 5a80f399b51221fb0b8661f30d940ca24e1ce627
Author: Khem Raj <raj.khem at gmail.com>
Date:   Thu Sep 5 21:39:05 2019 -0700

    util_sec.c: Move __thread variable to global scope
    
    Make clang happy otherwise it complains about variable scope
    
    fixes
    
    source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage
            } __thread cache;
              ^
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 98fe813d9cd360f9ac3f9836cd1de9c4a174413f
Author: Khem Raj <raj.khem at gmail.com>
Date:   Thu Sep 5 21:37:33 2019 -0700

    lib/replace/wscript: Avoid generating nested main function
    
    clang is not happy when it sees another main nested inside the main
    function and fails the test for prctl syscall, therefore avoid adding
    implicit main() here
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

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

Summary of changes:
 lib/replace/wscript    |  3 ++-
 source3/lib/util_sec.c | 19 +++++++++++--------
 source3/wscript        |  2 +-
 3 files changed, 14 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/wscript b/lib/replace/wscript
index 9af8ac49b2c..cdfe9435d84 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -137,6 +137,7 @@ def configure(conf):
                     }
                     ''',
                     'HAVE_PRCTL',
+                    addmain=False,
                     headers='sys/prctl.h',
                     msg='Checking for prctl syscall')
 
@@ -421,7 +422,7 @@ def configure(conf):
                         define = 'HAVE_BSD_STRTOLL',
                         )
     conf.CHECK_FUNCS('if_nametoindex strerror_r')
-    conf.CHECK_FUNCS('getdirentries getdents syslog')
+    conf.CHECK_FUNCS('syslog')
     conf.CHECK_FUNCS('gai_strerror get_current_dir_name')
     conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid')
     conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 974e458b06e..b6fb6c0a4a1 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -444,6 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid)
 	assert_gid(gid, gid);
 }
 
+#ifdef HAVE___THREAD
+	struct cache_t {
+		bool active;
+		uid_t uid;
+		gid_t gid;
+		size_t setlen;
+		uintptr_t gidset;
+	};
+
+static __thread struct cache_t cache;
+#endif
 /**********************************************************
  Function to set thread specific credentials. Leave
  saved-set uid/gid alone.Must be thread-safe code.
@@ -461,14 +472,6 @@ int set_thread_credentials(uid_t uid,
 	 * available.
 	 */
 #ifdef HAVE___THREAD
-	static struct {
-		bool active;
-		uid_t uid;
-		gid_t gid;
-		size_t setlen;
-		uintptr_t gidset;
-	} __thread cache;
-
 	if (cache.active &&
 	    cache.uid == uid &&
 	    cache.gid == gid &&
diff --git a/source3/wscript b/source3/wscript
index 1dc5abf0ab6..de6e875c7c3 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -393,7 +393,7 @@ __fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync
 _fork __fork fseeko
 _fstat __fstat fsync
 futimens futimes __fxstat getauthuid
-getcwd _getcwd __getcwd getdents __getdents getdirentries
+getcwd _getcwd __getcwd
 getgrent getgrnam getgrouplist getgrset getmntent getpagesize
 getpwanam getpwent_r getrlimit
 glob grantpt hstrerror initgroups innetgr


-- 
Samba Shared Repository



More information about the samba-cvs mailing list