[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue May 19 08:38:02 MDT 2015


The branch, master has been updated
       via  4e1cc54 s3:tevent_wait: simplify the code by using tevent_req_defer_callback()
       via  9ee3422 s3:modules: remove unused allow_warnings=True for vfs_nfs4acl_xattr
       via  dacc86e s3:vfs_nfs4acl_xattr: fix compiler warnings
       via  15d9374 s3:modules: remove unused allow_undefined_symbols=False from vfs_glusterfs
       via  dfd245d s3:modules: remove unused allow_undefined_symbols=True from vfs_aio_*
       via  54f7672 s3:modules: remove unused allow_warnings=True for vfs_aio_fork
       via  54a80b3 s3:vfs_aio_fork: avoid -Wcast-qual warnings
       via  542a6d9 s3:modules: remove unused allow_warnings=True for vfs_preopen
       via  362288a s3:vfs_preopen: avoid compiler warnings
       via  a2ead17 s3:modules: remove unused allow_warnings=True for vfs_unityed_media
       via  60bacae s3:wscript: remove unused uint[16,32] rpc.h checks
      from  ffacfc1 auth: Make sure error_string is not used uninitialized

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


- Log -----------------------------------------------------------------
commit 4e1cc54c222f6274f28fec39579655b62ab73f2c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 18 22:54:23 2014 +0200

    s3:tevent_wait: simplify the code by using tevent_req_defer_callback()
    
    This way a user of this could also use tevent_req_error() or wrappers.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue May 19 16:37:52 CEST 2015 on sn-devel-104

commit 9ee3422a7097b060592794e8953d1c59f2b6c3c2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_warnings=True for vfs_nfs4acl_xattr
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit dacc86effb13bde19295860f6cf3ae411183e4db
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:29:59 2015 +0200

    s3:vfs_nfs4acl_xattr: fix compiler warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 15d9374444255ccda370a98b2fe23fa5be4eed28
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_undefined_symbols=False from vfs_glusterfs
    
    This is the default...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit dfd245dc382279b9137925f5930dabf195f41310
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_undefined_symbols=True from vfs_aio_*
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 54f7672d72b278f3f019632676d116aa8ffcd51b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_warnings=True for vfs_aio_fork
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 54a80b396c550eca19278c1ed557c0fd65115190
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:10:27 2015 +0200

    s3:vfs_aio_fork: avoid -Wcast-qual warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 542a6d9d0c36805f55d62316d0bfccddf2d287c2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_warnings=True for vfs_preopen
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 362288a0a4d4ddc2cd8b0f4a5361778b6424027b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:31:31 2015 +0200

    s3:vfs_preopen: avoid compiler warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit a2ead174b4ecd399c7dfd62be82a37ea2d0db5d1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 10 11:12:04 2015 +0200

    s3:modules: remove unused allow_warnings=True for vfs_unityed_media
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 60bacae681d85fedb61c9cb08c65cc0b42487a6f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 18 15:00:14 2015 +0200

    s3:wscript: remove unused uint[16,32] rpc.h checks
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/lib/tevent_wait.c           | 27 +++------------------------
 source3/modules/vfs_aio_fork.c      |  6 +++---
 source3/modules/vfs_nfs4acl_xattr.c | 22 ++++++++++++----------
 source3/modules/vfs_preopen.c       |  7 ++++---
 source3/modules/wscript_build       | 19 +++++--------------
 source3/wscript                     | 16 ----------------
 6 files changed, 27 insertions(+), 70 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/tevent_wait.c b/source3/lib/tevent_wait.c
index 81fb213..31bb581 100644
--- a/source3/lib/tevent_wait.c
+++ b/source3/lib/tevent_wait.c
@@ -24,8 +24,7 @@
 #include "lib/util/tevent_unix.h"
 
 struct tevent_wait_state {
-	struct tevent_immediate *im;
-	struct tevent_context *ev;
+	uint8_t _dummy_;
 };
 
 struct tevent_req *tevent_wait_send(TALLOC_CTX *mem_ctx,
@@ -38,37 +37,17 @@ struct tevent_req *tevent_wait_send(TALLOC_CTX *mem_ctx,
 	if (req == NULL) {
 		return NULL;
 	}
-	state->ev = ev;
-	state->im = tevent_create_immediate(state);
-	if (tevent_req_nomem(state->im, req)) {
-		return tevent_req_post(req, ev);
-	}
+
+	tevent_req_defer_callback(req, ev);
 	return req;
 }
 
-static void tevent_wait_trigger(struct tevent_context *ctx,
-				struct tevent_immediate *im,
-				void *private_data);
-
 void tevent_wait_done(struct tevent_req *req)
 {
-	struct tevent_wait_state *state;
-
 	if (req == NULL) {
 		return;
 	}
-	state = tevent_req_data(req, struct tevent_wait_state);
-
-	tevent_schedule_immediate(state->im, state->ev,
-				  tevent_wait_trigger, req);
-}
 
-static void tevent_wait_trigger(struct tevent_context *ctx,
-				struct tevent_immediate *im,
-				void *private_data)
-{
-	struct tevent_req *req = talloc_get_type_abort(
-		private_data, struct tevent_req);
 	tevent_req_done(req);
 }
 
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index b15cf9d..5b398b2e 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -51,7 +51,7 @@ struct mmap_area {
 
 static int mmap_area_destructor(struct mmap_area *area)
 {
-	munmap((void *)area->ptr, area->size);
+	munmap(discard_const(area->ptr), area->size);
 	return 0;
 }
 
@@ -344,7 +344,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map)
 		switch (cmd_struct.cmd) {
 		case READ_CMD:
 			ret_struct.size = sys_pread(
-				fd, (void *)map->ptr, cmd_struct.n,
+				fd, discard_const(map->ptr), cmd_struct.n,
 				cmd_struct.offset);
 #if 0
 /* This breaks "make test" when run with aio_fork module. */
@@ -355,7 +355,7 @@ static void aio_child_loop(int sockfd, struct mmap_area *map)
 			break;
 		case WRITE_CMD:
 			ret_struct.size = sys_pwrite(
-				fd, (void *)map->ptr, cmd_struct.n,
+				fd, discard_const(map->ptr), cmd_struct.n,
 				cmd_struct.offset);
 			break;
 		case FSYNC_CMD:
diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c
index 9c311ce..d5d3e2b 100644
--- a/source3/modules/vfs_nfs4acl_xattr.c
+++ b/source3/modules/vfs_nfs4acl_xattr.c
@@ -344,11 +344,15 @@ static SMB4ACL_T *nfs4acls_defaultacl(TALLOC_CTX *mem_ctx)
 {
 	SMB4ACL_T *pacl = NULL;
 	SMB4ACE_T *pace;
-	SMB_ACE4PROP_T ace = { SMB_ACE4_ID_SPECIAL,
-		SMB_ACE4_WHO_EVERYONE,
-		SMB_ACE4_ACCESS_ALLOWED_ACE_TYPE,
-		0,
-		SMB_ACE4_ALL_MASKS };
+	SMB_ACE4PROP_T ace = {
+		.flags = SMB_ACE4_ID_SPECIAL,
+		.who = {
+			.id = SMB_ACE4_WHO_EVERYONE,
+		},
+		.aceType = SMB_ACE4_ACCESS_ALLOWED_ACE_TYPE,
+		.aceFlags = 0,
+		.aceMask = SMB_ACE4_ALL_MASKS,
+	};
 
 	DEBUG(10, ("Building default full access acl\n"));
 
@@ -467,8 +471,8 @@ static SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
 	     pace = smb_next_ace4(pace)) {
 		SMB4ACE_T *pchildace;
 		ace = *smb_get_ace4(pace);
-		if (isdir && !(ace.aceFlags & SMB_ACE4_DIRECTORY_INHERIT_ACE)
-		    || !isdir && !(ace.aceFlags & SMB_ACE4_FILE_INHERIT_ACE)) {
+		if ((isdir && !(ace.aceFlags & SMB_ACE4_DIRECTORY_INHERIT_ACE)) ||
+		    (!isdir && !(ace.aceFlags & SMB_ACE4_FILE_INHERIT_ACE))) {
 			DEBUG(10, ("non inheriting ace type: %d, iflags: %x, "
 				   "flags: %x, mask: %x, who: %d\n",
 				   ace.aceType, ace.flags, ace.aceFlags,
@@ -480,9 +484,7 @@ static SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
 			   ace.aceType, ace.flags, ace.aceFlags,
 			   ace.aceMask, ace.who.id));
 		ace.aceFlags |= SMB_ACE4_INHERITED_ACE;
-		if ((isdir && (ace.aceFlags & SMB_ACE4_DIRECTORY_INHERIT_ACE)
-		     || !isdir && (ace.aceFlags & SMB_ACE4_FILE_INHERIT_ACE))
-		    && ace.aceFlags & SMB_ACE4_INHERIT_ONLY_ACE) {
+		if (ace.aceFlags & SMB_ACE4_INHERIT_ONLY_ACE) {
 			ace.aceFlags &= ~SMB_ACE4_INHERIT_ONLY_ACE;
 		}
 		if (ace.aceFlags & SMB_ACE4_NO_PROPAGATE_INHERIT_ACE) {
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index cc38a90..c83d312 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -149,7 +149,7 @@ static bool preopen_helper_open_one(int sock_fd, char **pnamebuf,
 				    size_t to_read, void *filebuf)
 {
 	char *namebuf = *pnamebuf;
-	ssize_t nwritten, nread;
+	ssize_t nread;
 	char c = 0;
 	int fd;
 
@@ -185,7 +185,7 @@ static bool preopen_helper_open_one(int sock_fd, char **pnamebuf,
 	close(fd);
 
  done:
-	nwritten = write(sock_fd, &c, 1);
+	(void)write(sock_fd, &c, 1);
 	return true;
 }
 
@@ -341,7 +341,8 @@ static struct preopen_state *preopen_state_get(vfs_handle_struct *handle)
 static bool preopen_parse_fname(const char *fname, unsigned long *pnum,
 				size_t *pstart_idx, int *pnum_digits)
 {
-	const char *p, *q;
+	const char *p;
+	char *q = NULL;
 	unsigned long num;
 
 	p = strrchr_m(fname, '/');
diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build
index da29593..30f3bdd 100644
--- a/source3/modules/wscript_build
+++ b/source3/modules/wscript_build
@@ -205,7 +205,6 @@ bld.SAMBA3_MODULE('vfs_zfsacl',
 bld.SAMBA3_MODULE('vfs_nfs4acl_xattr',
                   subsystem='vfs',
                   source='vfs_nfs4acl_xattr.c',
-                  allow_warnings=True,
                   deps='NFS4_ACLS sunacl NDR_NFS4ACL',
                   init_function='',
                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_nfs4acl_xattr'),
@@ -320,12 +319,10 @@ bld.SAMBA3_MODULE('vfs_fileid',
 bld.SAMBA3_MODULE('vfs_aio_fork',
                  subsystem='vfs',
                  source='vfs_aio_fork.c',
-                 allow_warnings=True,
                  deps='samba-util tevent',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_aio_fork'),
-                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_fork'),
-                  allow_undefined_symbols=True)
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_fork'))
 
 bld.SAMBA3_MODULE('vfs_aio_pthread',
                  subsystem='vfs',
@@ -333,8 +330,7 @@ bld.SAMBA3_MODULE('vfs_aio_pthread',
                  deps='samba-util tevent',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_aio_pthread'),
-                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_pthread'),
-                  allow_undefined_symbols=True)
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_pthread'))
 
 bld.SAMBA3_MODULE('vfs_aio_posix',
                  subsystem='vfs',
@@ -342,8 +338,7 @@ bld.SAMBA3_MODULE('vfs_aio_posix',
                  deps='samba-util tevent',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_aio_posix'),
-                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_posix'),
-                  allow_undefined_symbols=True)
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_posix'))
 
 bld.SAMBA3_MODULE('vfs_aio_linux',
                  subsystem='vfs',
@@ -351,13 +346,11 @@ bld.SAMBA3_MODULE('vfs_aio_linux',
                  deps='samba-util aio',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_aio_linux'),
-                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_linux'),
-                  allow_undefined_symbols=True)
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_aio_linux'))
 
 bld.SAMBA3_MODULE('vfs_preopen',
                  subsystem='vfs',
                  source='vfs_preopen.c',
-                 allow_warnings=True,
                  deps='samba-util',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_preopen'),
@@ -447,7 +440,6 @@ bld.SAMBA3_MODULE('vfs_media_harmony',
 bld.SAMBA3_MODULE('vfs_unityed_media',
                  subsystem='vfs',
                  source='vfs_unityed_media.c',
-                 allow_warnings=True,
                  deps='samba-util',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_unityed_media'),
@@ -503,8 +495,7 @@ bld.SAMBA3_MODULE('vfs_glusterfs',
                   deps='samba-util gfapi',
                   init_function='',
                   internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_glusterfs'),
-                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_glusterfs'),
-                  allow_undefined_symbols=False)
+                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_glusterfs'))
 
 bld.SAMBA3_MODULE('vfs_worm',
                   subsystem='vfs',
diff --git a/source3/wscript b/source3/wscript
index 1134e31..0276684 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -320,22 +320,6 @@ int main(int argc, char **argv)
                         headers='sys/capability.h',
                         msg="Checking whether POSIX capabilities are available")
 
-    # Check for int16, uint16, int32 and uint32 in rpc/types.h included from
-    # rpc/rpc.h. This is *really* broken but some systems (DEC OSF1) do this.
-    # -- JRA.
-    if conf.CONFIG_SET("HAVE_RPC_RPC_H"):
-        conf.CHECK_TYPE('int16', headers='rpc/rpc.h',
-                        define='HAVE_INT16_FROM_RPC_RPC_H',
-                        msg="Checking for int16 typedef included by rpc/rpc.h")
-        conf.CHECK_CODE('uint16 testvar;', 'HAVE_INT16_FROM_RPC_RPC_H',
-                        headers='sys/types.h rpc/rpc.h',
-                        msg="Checking for uint16 typedef included by rpc/rpc.h")
-        conf.CHECK_CODE('int32 testvar;', 'HAVE_INT16_FROM_RPC_RPC_H',
-                        headers='sys/types.h rpc/rpc.h',
-                        msg="Checking for int32 typedef included by rpc/rpc.h")
-        conf.CHECK_CODE('uint32 testvar;', 'HAVE_INT16_FROM_RPC_RPC_H',
-                        headers='sys/types.h rpc/rpc.h',
-                        msg="Checking for uint32 typedef included by rpc/rpc.h")
     conf.CHECK_CODE('int i;', 'BROKEN_NISPLUS_INCLUDE_FILES',
                     headers='sys/types.h sys/acl.h rpcsvc/nis.h',
                     msg="Checking for broken nisplus include files")


-- 
Samba Shared Repository


More information about the samba-cvs mailing list