[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Sun Sep 23 00:34:02 MDT 2012


The branch, master has been updated
       via  8e5f30c build: Remove unused define UNIXWARE
       via  ffb3f2a lib/replace: Remove unused nap and therefore the SCO define
       via  0f69bf2 build: Make waf configure match autoconf for HPUX ACLs
       via  e0bcce5 build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
       via  73bdb2a lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
       via  41b9cb3 build: Remove unused IRIX and IRIX6 defines
       via  502135d lib/replace: Try to fix build on HP-UX for os2_delete test
       via  08d3062 ntdb: Try to fix the build on Solaris which does not have err
      from  a4c54f6 s4:torture:smb2: add a durable-open.read-only test

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


- Log -----------------------------------------------------------------
commit 8e5f30c830c23d8223c38e34669f069e44fee64b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:37:24 2012 +1000

    build: Remove unused define UNIXWARE
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Sun Sep 23 08:33:02 CEST 2012 on sn-devel-104

commit ffb3f2a19f4780e45ea0b95520aeb73c20893c44
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:35:58 2012 +1000

    lib/replace: Remove unused nap and therefore the SCO define
    
    In any case, the Samba Team stopped supporting SCO systems a long time ago.
    
    Andrew Bartlett

commit 0f69bf2cc9ce8ab76afefa693f3d50e458459854
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:30:37 2012 +1000

    build: Make waf configure match autoconf for HPUX ACLs

commit e0bcce55033f27ffa734b839e23bc731d82614f0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:30:10 2012 +1000

    build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
    
    The autoconf build simply has 512 as the default, without a warning.  Rather than
    enumerate every OS ever made, just handle the known exceptions.
    
    Andrew Bartlett

commit 73bdb2a6c2f04c22780e2441a3e671722b16dfab
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 14:25:00 2012 +1000

    lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
    
    Removing this unbuilt file allows removing BROKEN_GETGRNAM which was only
    ever defined per-OS, not based on an actual test.
    
    Andrew Bartlett

commit 41b9cb32ce82a33b5dd8f5bd00d05ac0708a5a4d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 13:57:44 2012 +1000

    build: Remove unused IRIX and IRIX6 defines

commit 502135df9f0d839e75907260f5dcdab4052d995e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 13:39:01 2012 +1000

    lib/replace: Try to fix build on HP-UX for os2_delete test
    
    The issue is that this file is both used in an autoconf test, and
    later in a smbtorture test.  Because os2_delete.c does not include
    replace.h, bool may not be defined.
    
    So, instead we shift the need for bool to a different header.
    
    (The readdir tests in repdir.m4 are not yet in the waf configure).
    
    Andrew Bartlett

commit 08d3062fc3ece6b5d98e32bad5f1d54c088b0dd0
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Sep 23 13:20:45 2012 +1000

    ntdb: Try to fix the build on Solaris which does not have err

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

Summary of changes:
 lib/ccan/wscript                |    2 +-
 lib/ntdb/wscript                |    2 +-
 lib/replace/replace-test.h      |    4 -
 lib/replace/replace-testsuite.h |   10 ++
 lib/replace/replace.c           |   10 --
 lib/replace/test/main.c         |    4 +-
 lib/replace/test/testsuite.c    |    6 +-
 lib/util/util_getent.c          |  283 ---------------------------------------
 source3/configure.in            |   18 +--
 source3/wscript                 |   20 ++-
 source4/torture/local/local.c   |    2 +-
 11 files changed, 33 insertions(+), 328 deletions(-)
 create mode 100644 lib/replace/replace-testsuite.h
 delete mode 100644 lib/util/util_getent.c


Changeset truncated at 500 lines:

diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index be5eab2..334f8fe 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -147,11 +147,11 @@ def build(bld):
     ccan_module(bld, 'endian')
     ccan_module(bld, 'likely', 'ccan-str')
     ccan_module(bld, 'typesafe_cb')
+    ccan_module(bld, 'err', 'ccan-compiler')
 
     # Failtest pulls in a lot of stuff, and it's only for unit tests.
     if bld.env.DEVELOPER_MODE:
         ccan_module(bld, 'container_of', 'ccan-check_type')
-        ccan_module(bld, 'err', 'ccan-compiler')
         ccan_module(bld, 'htable', 'ccan-compiler')
         ccan_module(bld, 'list', 'ccan-container_of')
         ccan_module(bld, 'time')
diff --git a/lib/ntdb/wscript b/lib/ntdb/wscript
index 39802db..1a4b02b 100644
--- a/lib/ntdb/wscript
+++ b/lib/ntdb/wscript
@@ -155,7 +155,7 @@ def build(bld):
 
         bld.SAMBA_BINARY('ntdbtorture',
                          'tools/ntdbtorture.c',
-                         deps='ntdb',
+                         deps='ntdb ccan-err',
                          install=False)
 
         bld.SAMBA_BINARY('ntdbtool',
diff --git a/lib/replace/replace-test.h b/lib/replace/replace-test.h
index a522853..ed8e75e 100644
--- a/lib/replace/replace-test.h
+++ b/lib/replace/replace-test.h
@@ -1,10 +1,6 @@
 #ifndef __LIB_REPLACE_REPLACE_TEST_H__
 #define __LIB_REPLACE_REPLACE_TEST_H__
 
-#include <stdbool.h>
-struct torture_context;
-
-bool torture_local_replace(struct torture_context *ctx);
 int libreplace_test_strptime(void);
 int test_readdir_os2_delete(void);
 int getifaddrs_test(void);
diff --git a/lib/replace/replace-testsuite.h b/lib/replace/replace-testsuite.h
new file mode 100644
index 0000000..b28dbec
--- /dev/null
+++ b/lib/replace/replace-testsuite.h
@@ -0,0 +1,10 @@
+#ifndef __LIB_REPLACE_REPLACE_TESTSUITE_H__
+#define __LIB_REPLACE_REPLACE_TESTSUITE_H__
+
+#include <stdbool.h>
+struct torture_context;
+
+bool torture_local_replace(struct torture_context *ctx);
+
+#endif /* __LIB_REPLACE_REPLACE_TESTSUITE_H__ */
+
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 322bf49..ebfe04d 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -214,16 +214,6 @@ int rep_initgroups(char *name, gid_t id)
 #endif /* HAVE_INITGROUPS */
 
 
-#if (defined(SecureWare) && defined(SCO))
-/* This is needed due to needing the nap() function but we don't want
-   to include the Xenix libraries since that will break other things...
-   BTW: system call # 0x0c28 is the same as calling nap() */
-long nap(long milliseconds) {
-	 return syscall(0x0c28, milliseconds);
- }
-#endif
-
-
 #ifndef HAVE_MEMMOVE
 /*******************************************************************
 safely copies memory, ensuring no overlap problems.
diff --git a/lib/replace/test/main.c b/lib/replace/test/main.c
index 9bd1284..94264d7 100644
--- a/lib/replace/test/main.c
+++ b/lib/replace/test/main.c
@@ -24,9 +24,7 @@
 */
 
 #include "replace.h"
-
-struct torture_context;
-bool torture_local_replace(struct torture_context *ctx);
+#include "replace-testsuite.h"
 
 int main(void)
 {
diff --git a/lib/replace/test/testsuite.c b/lib/replace/test/testsuite.c
index 0c1fac6..04658be 100644
--- a/lib/replace/test/testsuite.c
+++ b/lib/replace/test/testsuite.c
@@ -24,6 +24,8 @@
 */
 
 #include "replace.h"
+#include "replace-test.h"
+#include "replace-testsuite.h"
 
 /*
   we include all the system/ include files here so that libreplace tests
@@ -48,8 +50,6 @@
 
 #define TESTFILE "testfile.dat"
 
-struct torture_context;
-bool torture_local_replace(struct torture_context *ctx);
 
 /*
   test ftruncate() function
@@ -379,8 +379,6 @@ static int test_opendir(void)
 	return true;
 }
 
-extern int test_readdir_os2_delete(void);
-
 static int test_readdir(void)
 {
 	printf("test: readdir\n");
diff --git a/lib/util/util_getent.c b/lib/util/util_getent.c
deleted file mode 100644
index b9b2658..0000000
--- a/lib/util/util_getent.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-   Samba utility functions
-   Copyright (C) Simo Sorce 2001
-   Copyright (C) Jeremy Allison 2001
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-
-/****************************************************************
- Returns a single linked list of group entries.
- Use grent_free() to free it after use.
-****************************************************************/
-
-struct sys_grent * getgrent_list(void)
-{
-	struct sys_grent *glist;
-	struct sys_grent *gent;
-	struct group *grp;
-	
-	gent = malloc_p(struct sys_grent);
-	if (gent == NULL) {
-		DEBUG (0, ("Out of memory in getgrent_list!\n"));
-		return NULL;
-	}
-	memset(gent, '\0', sizeof(struct sys_grent));
-	glist = gent;
-	
-	setgrent();
-	grp = getgrent();
-	if (grp == NULL) {
-		endgrent();
-		SAFE_FREE(glist);
-		return NULL;
-	}
-
-	while (grp != NULL) {
-		int i,num;
-		
-		if (grp->gr_name) {
-			if ((gent->gr_name = strdup(grp->gr_name)) == NULL)
-				goto err;
-		}
-		if (grp->gr_passwd) {
-			if ((gent->gr_passwd = strdup(grp->gr_passwd)) == NULL)
-				goto err;
-		}
-		gent->gr_gid = grp->gr_gid;
-		
-		/* number of strings in gr_mem */
-		for (num = 0; grp->gr_mem[num];	num++)
-			;
-		
-		/* alloc space for gr_mem string pointers */
-		if ((gent->gr_mem = malloc_array_p(char *, num+1)) == NULL)
-			goto err;
-
-		memset(gent->gr_mem, '\0', (num+1) * sizeof(char *));
-
-		for (i=0; i < num; i++) {
-			if ((gent->gr_mem[i] = strdup(grp->gr_mem[i])) == NULL)
-				goto err;
-		}
-		gent->gr_mem[num] = NULL;
-		
-		grp = getgrent();
-		if (grp) {
-			gent->next = malloc_p(struct sys_grent);
-			if (gent->next == NULL)
-				goto err;
-			gent = gent->next;
-			memset(gent, '\0', sizeof(struct sys_grent));
-		}
-	}
-	
-	endgrent();
-	return glist;
-
-  err:
-
-	endgrent();
-	DEBUG(0, ("Out of memory in getgrent_list!\n"));
-	grent_free(glist);
-	return NULL;
-}
-
-/****************************************************************
- Free the single linked list of group entries made by
- getgrent_list()
-****************************************************************/
-
-void grent_free (struct sys_grent *glist)
-{
-	while (glist) {
-		struct sys_grent *prev;
-		
-		SAFE_FREE(glist->gr_name);
-		SAFE_FREE(glist->gr_passwd);
-		if (glist->gr_mem) {
-			int i;
-			for (i = 0; glist->gr_mem[i]; i++)
-				SAFE_FREE(glist->gr_mem[i]);
-			SAFE_FREE(glist->gr_mem);
-		}
-		prev = glist;
-		glist = glist->next;
-		SAFE_FREE(prev);
-	}
-}
-
-/****************************************************************
- Returns a single linked list of passwd entries.
- Use pwent_free() to free it after use.
-****************************************************************/
-
-struct sys_pwent * getpwent_list(void)
-{
-	struct sys_pwent *plist;
-	struct sys_pwent *pent;
-	struct passwd *pwd;
-	
-	pent = malloc_p(struct sys_pwent);
-	if (pent == NULL) {
-		DEBUG (0, ("Out of memory in getpwent_list!\n"));
-		return NULL;
-	}
-	plist = pent;
-	
-	setpwent();
-	pwd = getpwent();
-	while (pwd != NULL) {
-		memset(pent, '\0', sizeof(struct sys_pwent));
-		if (pwd->pw_name) {
-			if ((pent->pw_name = strdup(pwd->pw_name)) == NULL)
-				goto err;
-		}
-		if (pwd->pw_passwd) {
-			if ((pent->pw_passwd = strdup(pwd->pw_passwd)) == NULL)
-				goto err;
-		}
-		pent->pw_uid = pwd->pw_uid;
-		pent->pw_gid = pwd->pw_gid;
-		if (pwd->pw_gecos) {
-			if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL)
-				goto err;
-		}
-		if (pwd->pw_dir) {
-			if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL)
-				goto err;
-		}
-		if (pwd->pw_shell) {
-			if ((pent->pw_name = strdup(pwd->pw_shell)) == NULL)
-				goto err;
-		}
-
-		pwd = getpwent();
-		if (pwd) {
-			pent->next = malloc_p(struct sys_pwent);
-			if (pent->next == NULL)
-				goto err;
-			pent = pent->next;
-		}
-	}
-	
-	endpwent();
-	return plist;
-
-  err:
-
-	endpwent();
-	DEBUG(0, ("Out of memory in getpwent_list!\n"));
-	pwent_free(plist);
-	return NULL;
-}
-
-/****************************************************************
- Free the single linked list of passwd entries made by
- getpwent_list()
-****************************************************************/
-
-void pwent_free (struct sys_pwent *plist)
-{
-	while (plist) {
-		struct sys_pwent *prev;
-		
-		SAFE_FREE(plist->pw_name);
-		SAFE_FREE(plist->pw_passwd);
-		SAFE_FREE(plist->pw_gecos);
-		SAFE_FREE(plist->pw_dir);
-		SAFE_FREE(plist->pw_shell);
-
-		prev = plist;
-		plist = plist->next;
-		SAFE_FREE(prev);
-	}
-}
-
-/****************************************************************
- Add the individual group users onto the list.
-****************************************************************/
-
-static struct sys_userlist *add_members_to_userlist(struct sys_userlist *list_head, const struct group *grp)
-{
-	size_t num_users, i;
-
-	/* Count the number of users. */
-	for (num_users = 0; grp->gr_mem[num_users]; num_users++)
-		;
-
-	for (i = 0; i < num_users; i++) {
-		struct sys_userlist *entry = malloc_p(struct sys_userlist);
-		if (entry == NULL) {
-			free_userlist(list_head);
-			return NULL;
-		}
-		entry->unix_name = (char *)strdup(grp->gr_mem[i]);
-		if (entry->unix_name == NULL) {
-			SAFE_FREE(entry);
-			free_userlist(list_head);
-			return NULL;
-		}
-		DLIST_ADD(list_head, entry);
-	}
-	return list_head;
-}
-
-/****************************************************************
- Get the list of UNIX users in a group.
- We have to enumerate the /etc/group file as some UNIX getgrnam()
- calls won't do that for us (notably Tru64 UNIX).
-****************************************************************/
-
-struct sys_userlist *get_users_in_group(const char *gname)
-{
-	struct sys_userlist *list_head = NULL;
-	struct group *gptr;
-
-#if !defined(BROKEN_GETGRNAM)
-	if ((gptr = (struct group *)getgrnam(gname)) == NULL)
-		return NULL;
-	return add_members_to_userlist(list_head, gptr);
-#else
-	/* BROKEN_GETGRNAM - True64 */
-	setgrent();
-	while((gptr = getgrent()) != NULL) {
-		if (strequal(gname, gptr->gr_name)) {
-			list_head = add_members_to_userlist(list_head, gptr);
-			if (list_head == NULL)
-				return NULL;
-		}
-	}
-	endgrent();
-	return list_head;
-#endif
-}
-
-/****************************************************************
- Free list allocated above.
-****************************************************************/
-
-void free_userlist(struct sys_userlist *list_head)
-{
-	while (list_head) {
-		struct sys_userlist *old_head = list_head;
-		DLIST_REMOVE(list_head, list_head);
-		SAFE_FREE(old_head->unix_name);
-		SAFE_FREE(old_head);
-	}
-}
diff --git a/source3/configure.in b/source3/configure.in
index 06f6028..89e813e 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1363,7 +1363,6 @@ DSO_EXPORTS=""
 				SONAMEFLAG="-Wl,-h,"
 			fi
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 			;;
 		*sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
 			BLDSHARED="true"
@@ -1371,7 +1370,6 @@ DSO_EXPORTS=""
 			SONAMEFLAG="-Wl,-h,"
 			PICFLAG="-KPIC"   # Is this correct for SunOS
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 			;;
 		*netbsd* | *freebsd* | *dragonfly* )
 			BLDSHARED="true"
@@ -1380,7 +1378,6 @@ DSO_EXPORTS=""
 			SONAMEFLAG="-Wl,-soname,"
 			PICFLAG="-fPIC -DPIC"
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 			;;
 		*openbsd*)  BLDSHARED="true"
 			LDSHFLAGS="-shared"
@@ -1388,14 +1385,8 @@ DSO_EXPORTS=""
 			SONAMEFLAG="-Wl,-soname,"
 			PICFLAG="-fPIC"
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 			;;
-		*irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
-			case "$host_os" in
-			*irix6*) AC_DEFINE(IRIX6,1,[Whether the host os is irix6])
-			;;
-			esac
-			BLDSHARED="true"
+		*irix*) BLDSHARED="true"
 			LDSHFLAGS="-Wl,-set_version,sgi1.0 -shared"
 			SONAMEFLAG="-Wl,-soname,"
 			if test "${GCC}" = "yes"; then
@@ -1474,7 +1465,6 @@ DSO_EXPORTS=""
 				PICFLAG="-fPIC"
 			fi
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-			AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
 			for flags in "-expect_unresolved '*'" "-Wl,-expect_unresolved,'*'" ; do
 				saved_ldflags="$LDFLAGS"
 				AC_MSG_CHECKING([if $flags works])
@@ -1487,11 +1477,9 @@ DSO_EXPORTS=""
 				test x"$LDSHFLAGS_Z_NODEFS" != x && break
 			done
 			;;
-		*sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
-			AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+		*sco*) AC_DEFINE(STAT_ST_BLOCKSIZE,512)
 			;;
-		*unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
-			BLDSHARED="true"
+		*unixware*) BLDSHARED="true"
 			LDSHFLAGS="-shared"
 			SONAMEFLAG="-Wl,-soname,"
 			PICFLAG="-KPIC"
diff --git a/source3/wscript b/source3/wscript
index 23ea327..cb76293 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -287,22 +287,29 @@ utimensat vsyslog _write __write __xstat
         conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
     elif (host_os.rfind('darwin') > -1):
         conf.DEFINE('DARWINOS', 1)
-        conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
         conf.ADD_CFLAGS('-fno-common')
+        conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
     elif (host_os.rfind('freebsd') > -1):
         if conf.CHECK_HEADERS('sunacl.h'):
             conf.DEFINE('HAVE_FREEBSD_SUNACL_H', '1')
             conf.CHECK_FUNCS_IN('acl', 'sunacl')
         conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
-    elif (host_os.rfind('netbsd') > -1):


-- 
Samba Shared Repository


More information about the samba-cvs mailing list