[SCM] Samba Shared Repository - branch master updated

2016-10-20 Thread Jeremy Allison
The branch, master has been updated
   via  ad60b8c s3: selftest: Add test for orphan 'lost-XXX' directories in 
streams_depot.
   via  b17c9fd s3: vfs: Remove files/directories after the streams are 
deleted.
   via  4e93ea2 s3: torture: vfstest. unlink cmd must be stream aware.
  from  beda6d3 torture: Fix uninitialized variables

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


- Log -
commit ad60b8cc48b1095ce97170eed3d09fca7181a3bc
Author: Jeremy Allison 
Date:   Wed Oct 19 16:33:52 2016 -0700

s3: selftest: Add test for orphan 'lost-XXX' directories in streams_depot.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12384

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Oct 21 04:48:52 CEST 2016 on sn-devel-144

commit b17c9fdc51c10313eed32d6e078ed7050a342d0f
Author: Jeremy Allison 
Date:   Wed Oct 19 11:56:49 2016 -0700

s3: vfs: Remove files/directories after the streams are deleted.

By the time we get to SMB_VFS_UNLINK/SMB_VFS_RMDIR the ACL
checks have already been done.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12384

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 

commit 4e93ea2340b7589769d55085aaa71070a2d7e416
Author: Jeremy Allison 
Date:   Thu Oct 20 13:33:09 2016 -0700

s3: torture: vfstest. unlink cmd must be stream aware.

Otherwise the following patch breaks vfstest stream-depot test.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12384

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 

---

Summary of changes:
 source3/modules/vfs_streams_depot.c   | 18 +++---
 source3/script/tests/test_smbclient_s3.sh | 41 +++
 source3/torture/cmd_vfs.c |  8 ++
 3 files changed, 63 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_depot.c 
b/source3/modules/vfs_streams_depot.c
index 83c9d97..d874514 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -725,8 +725,12 @@ static int streams_depot_unlink(vfs_handle_struct *handle,
return -1;
}
 
-   ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
-   if (ret == 0) {
+   /*
+* We know the unlink should succeed as the ACL
+* check is already done in the caller. Remove the
+* file *after* the streams.
+*/
+   {
char *dirname = stream_dir(handle, smb_fname_base,
   _fname_base->st, false);
 
@@ -749,6 +753,7 @@ static int streams_depot_unlink(vfs_handle_struct *handle,
TALLOC_FREE(dirname);
}
 
+   ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
TALLOC_FREE(smb_fname_base);
return ret;
 }
@@ -787,8 +792,12 @@ static int streams_depot_rmdir(vfs_handle_struct *handle,
return -1;
}
 
-   ret = SMB_VFS_NEXT_RMDIR(handle, smb_fname_base);
-   if (ret == 0) {
+   /*
+* We know the rmdir should succeed as the ACL
+* check is already done in the caller. Remove the
+* directory *after* the streams.
+*/
+   {
char *dirname = stream_dir(handle, smb_fname_base,
   _fname_base->st, false);
 
@@ -811,6 +820,7 @@ static int streams_depot_rmdir(vfs_handle_struct *handle,
TALLOC_FREE(dirname);
}
 
+   ret = SMB_VFS_NEXT_RMDIR(handle, smb_fname_base);
TALLOC_FREE(smb_fname_base);
return ret;
 }
diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index 5e3db5d..22849bd 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -1060,6 +1060,43 @@ EOF
 fi
 }
 
+# Test creating then deleting a stream file doesn't leave a lost-X 
directory.
+test_streams_depot_delete()
+{
+tmpfile=$PREFIX/smbclient_interactive_prompt_commands
+rm -rf "$LOCAL_PATH/lost-*"
+
+cat > $tmpfile 

autobuild[sn-devel-144]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-144) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-144/2016-10-21-0425/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-144/2016-10-21-0425/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-144/2016-10-21-0425/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0409/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0409/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0409/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0010/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0010/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-21-0010/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



[SCM] Samba Website Repository - branch master updated

2016-10-20 Thread Andreas Schneider
The branch, master has been updated
   via  a2079f4 Fix the date of Lars death
  from  ef605a8 support/switzerland.html: Update address of micro systems.

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


- Log -
commit a2079f476c5708e651499842a5521a34ca29cbaf
Author: Andreas Schneider 
Date:   Thu Oct 20 20:19:55 2016 +0200

Fix the date of Lars death

---

Summary of changes:
 index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/index.html b/index.html
index f498a4c..a999f79 100644
--- a/index.html
+++ b/index.html
@@ -14,7 +14,7 @@
  height="185"
  style="float:left; margin-right:20px; margin-bottom:10px">
 
-On October 1, 2016, the Samba team lost a member and dear friend,
+On October 2, 2016, the Samba team lost a member and dear friend,
 https://www.samba.org/~lmuelle/;> Lars Müller.  Lars was known
 for his red hair, crooked smile, stubbornness, but above all, his willingness
 to go to any length to welcome a visitor or help anyone in need.  His positive


-- 
Samba Website Repository



autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-2009/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-2009/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-2009/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1609/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1609/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1609/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



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

2016-10-20 Thread Karolin Seeger
The branch, v4-5-test has been updated
   via  f7ed6b2 s3: libsmb: Fix cut and paste error using the wrong 
structure type.
   via  152041e s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set 
"KRB5CCNAME"
   via  58f41cf s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set 
"KRB5CCNAME"
   via  e6c2921 HEIMDAL:lib/krb5: destroy a memory ccache on reinit
   via  0b7656b s3-printing: fix migrate printer code (bug 8618)
   via  c5a0fc0 dbcheck: assert uSNChanged values in release-4-5-0-pre1
   via  53f94de tests: Skip a test for reveal internals for passing Windows
   via  d209450 tests: Check that USN bumps when modifying a linked attr
   via  8107066 dbcheck: Make it clearer about temporary output
   via  a439f7c tombstone-expunge: Assert than an expunge does not bump the 
USN
   via  bd78656 tests: Assert vanishing links doesn't bump USN
   via  43db0f1 rpmd: Skip bump of USN when vanishing forward links
   via  a67aa0a rpmd: Add a TODO regarding the additional work performed
   via  e7ef79c rpmd: Remove the seq_num check for skipping additional work
   via  72396f9 rpmd: Add the ldb error string to a debug
   via  f98f264 torture: Remove unnecessary whitespace
   via  ead7488 copyright: Add the missing notices for garbage collect 
tombstones
   via  c6578c3 dsdb: refactor part of garbage_collect_tombstones into new 
function
   via  7dbb5de kcc: Fix a -Werror,-Wformat-security error
   via  b3e2bfe gc_tombstones: Typo fix
   via  a8d2f52 dsdb: Do not check isDeleted as a possible link
   via  797fb64 lib/ldb-samba: Add test for DSDB_MATCH_FOR_EXPUNGE match 
rule
   via  2c8c52a dsdb: Add comments to dsdb_garbage_collect_tombstones()
   via  608b85b samba-tool: Run samba-tool domain tombstones expunge in a 
transaction
   via  7121855 selftest: Add test for 'samba-tool tombstones expunge'
   via  4b4d71f dsdb: Use a date comparison in the search to avoid 
returning all deleted objects
   via  679700a dsdb: Expose ldb error string to 
dsdb_garbage_collect_tombstones() callers
   via  68598e4 samba-tool: Add command-line tool to trigger tombstone 
expunge
   via  1902436 python: Add binding for dsdb_garbage_collect_tombstones()
   via  bdde527 dsdb: Expand garbage_collect_tombstones to expunge links 
also
   via  8f4f4fb dsdb: move tombstone lifetime calculation out of 
dsdb_garbage_collect_tombstones()
   via  6a2ed19 dsdb: Rework more KCC service-specific details out of 
dsdb_garbage_collect_tombstones()
   via  99d0dfb dsdb: Rework kcc_deleted() into 
dsdb_garbage_collect_tombstones()
   via  c71a3c6 kcc: Move kcc/kcc_deleted.c into 
kcc/garbage_collect_tombstones.c
   via  bd3c138 ldb-samba: Add new extended match rule 
DSDB_MATCH_FOR_EXPUNGE
   via  dbe2cc7 pydsdb: Raise TypeError for type errors, rather than 
incorrectly raising an LdbError
   via  bcaf3ca selftest: Correct name of 
samba4.blackbox.dbcheck.release-4-5-0-pre1
   via  92bc396 s3: cldap: cldap_multi_netlogon_send() fails with one bad 
IPv6 address.
   via  d465cab s3-utils: Fix loading smb.conf in smbcquotas
   via  bed424f ntquotas: support "freeing" an empty quota list
   via  a54e4e7 s3/winbindd: using default domain with u...@domain.com 
format fails
   via  d6958d2 Add a blackbox tests for id & getent to test domain@realm 
type credentials
   via  fbd9451 winbind: Fix passing idmap failure from wb_sids2xids back 
to callers
   via  1cb9aeb idmap_ad: Fix retrieving credentials from clustered 
secrets.tdb
   via  b509d3a lib: Fix bug 12291
   via  cceb6e6 smbd: free talloc context if no quota records are available
   via  cbf9151 cliquota: fix param count when setting fs quota
   via  859e9c2 s3-lib: Fix %G substitution in AD member environment
   via  89e0e26 smbcquotas: fix error message listing quotas
   via  b2e42fe s3-cliquota: correctly handle no-more-entries
   via  7fd1d67 s3-sysquotas: correctly restore path when finding mount 
point
   via  50c559f torture/ioctl: test compression responses when unsupported
   via  100e780 smbd/ioctl: match WS2016 ReFS get compression behaviour
   via  8c9ac5b vfs_glusterfs: Fix a memory leak in connect path
   via  e05bae4 spoolss: Fix caching of printername->sharename
   via  152a6d8 kcc: Don't check schedule if None
   via  7b8d064 s4:samba_spnupdate: do not attempt to parse log level, use 
parsed value
   via  d6027e6 python/join: do not attempt to parse log level, use parsed 
value
   via  50087612 python/drs_utils: do not attempt to parse log level, use 
parsed value
   via  d10c377 tests/param add a test for LoadParm.log_level
   via  156136e s4:param add log_level function to retrieve log level in 
Python code
   via  103483a glusterfs: Avoid tevent_internal.h
   via  9562114 s3: events. Move events.c to util_event.c
   

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

2016-10-20 Thread Karolin Seeger
The branch, v4-3-test has been updated
   via  2017335 s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set 
"KRB5CCNAME"
   via  d4e019f s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set 
"KRB5CCNAME"
   via  532fd56 HEIMDAL:lib/krb5: destroy a memory ccache on reinit
   via  cdc53e7 autobuild: Use cp --recursive --link --archive
   via  69ea4ba s3-printing: fix migrate printer code (bug 8618)
   via  8e2589e spoolss: Fix caching of printername->sharename
   via  af851c2 glusterfs: Avoid tevent_internal.h
   via  a992329 s3: events. Move events.c to util_event.c
   via  51cad54 s3: server: s3_tevent_context_init() -> 
samba_tevent_context_init()
   via  70edf8c s3: winbind: Remove dump_event_list() calls.
   via  0d0339b s3: nmbd: Final changeover to stock tevent for nmbd.
   via  4212718 s3: nmbd: Change over to using tevent functions from direct 
poll.
   via  6b134a8 s3: nmbd: Add a talloc_stackframe().
   via  928f281 s3: nmbd: Add (currently unused) timeout and fd handlers.
   via  9236d1cf s3: nmbd: Now attrs array mirrors fd's array use it in 
preference.
   via  0918f18 s3: nmbd: Ensure attrs array mirrors fd's array for dns.
   via  447b640 s3: nmbd: Add fd, triggered elements to struct 
socket_attributes.
   via  de63f7d s3:nmbd: fix talloc_zero_array() check in nmbd_packets.c
  from  2014c08 s3-spoolss: fix winreg_printer_ver_to_qword

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test


- Log -
commit 20173352cf707dc4fab8d4ae97d2fb90253242b9
Author: Stefan Metzmacher 
Date:   Mon Oct 10 17:07:12 2016 +0200

s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set "KRB5CCNAME"

Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Günther Deschner 
Reviewed-by: Uri Simchoni 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 13 00:35:21 CEST 2016 on sn-devel-144

(cherry picked from commit a5f895a53016af71db53967062728fec5bc307ca)

Autobuild-User(v4-3-test): Karolin Seeger 
Autobuild-Date(v4-3-test): Thu Oct 20 14:06:17 CEST 2016 on sn-devel-104

commit d4e019f42fa24cb9efc2d1463b5dbcaf7e752249
Author: Stefan Metzmacher 
Date:   Mon Oct 10 17:07:12 2016 +0200

s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set "KRB5CCNAME"

Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Günther Deschner 
Reviewed-by: Uri Simchoni 
(cherry picked from commit 890b1bbdb8e965c4ff6e35214acc96ffbbff5dfd)

commit 532fd56b3f16e72ea0f088f4cdfc03d23aa43435
Author: Stefan Metzmacher 
Date:   Mon Oct 10 15:53:26 2016 +0200

HEIMDAL:lib/krb5: destroy a memory ccache on reinit

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Günther Deschner 
Reviewed-by: Uri Simchoni 
(cherry picked from commit 2abc3710a8a63327a769ba0482c553ed274b2113)

commit cdc53e774037733578df50a2663719f27dd9b41f
Author: Andrew Bartlett 
Date:   Mon Jan 4 14:20:54 2016 +1300

autobuild: Use cp --recursive --link --archive

This works on waf based builds as source files are not modified during the 
build

TODO: In order to make sure build doesn't influence each other,
we need to add something like:

 try:
 if options.rebase is not None:
 rebase_tree(options.rebase, rebase_branch=options.branch)
+run_cmd("find -type f | xargs chmod -w", show=True, 
dir=test_master)
 except Exception:

But that means we need to change the way 'make distcheck' works for the
standalone libraries.

For now this will help to reduce the (mem)disk usage of an autobuild a lot.

Signed-off-by: Andrew Bartlett 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit cce16123feedfbf0e325182c6e301377d8a60749)

commit 69ea4baefdb858b33a72c2f8226d54a2292f6dd1
Author: Björn Baumbach 
Date:   Fri Nov 18 18:54:56 2011 +0100

s3-printing: fix migrate printer code (bug 8618)

Removed path from driver files.
We only need the basenames.
(cherry picked from commit d61993043fcb7676a58658476421f5f4ff1a3fea)
(cherry picked from commit 9f07ef2249dc21eab37cd5888623e6edc84b2b59)

BUG: 

autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1205/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1205/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-1205/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144



[SCM] Socket Wrapper Repository - branch master updated

2016-10-20 Thread Michael Adam
The branch, master has been updated
   via  d8cf3b0 swrap: Handle threads that fork
   via  c989bbc cmake: Check for constructor attribute
   via  f5cddcd swrap: Make symbol loading thread-safe
   via  201811d cmake: Link pthread library headers
   via  3507e18 swrap: Fix strict-aliasing issues while loading symbols
  from  b61f5df tests: Add a test for max_sockets

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


- Log -
commit d8cf3b0ca8ce24aaf19e4692882dadffa921f763
Author: Andreas Schneider 
Date:   Thu Oct 20 10:37:18 2016 +0200

swrap: Handle threads that fork

Signed-off-by: Andreas Schneider 
Reviewed-by: Michael Adam 

commit c989bbc9f6afaad9e4b26501d57d7acb1297d1cb
Author: Andreas Schneider 
Date:   Thu Oct 20 10:35:50 2016 +0200

cmake: Check for constructor attribute

Signed-off-by: Andreas Schneider 
Reviewed-by: Michael Adam 

commit f5cddcd300b779131662519d56ae90fcebe459e1
Author: Andreas Schneider 
Date:   Thu Oct 20 10:22:40 2016 +0200

swrap: Make symbol loading thread-safe

Signed-off-by: Andreas Schneider 
Reviewed-by: Michael Adam 

commit 201811dc614a4787482c3bb2fa14f47112a05a34
Author: Michael Adam 
Date:   Sun Sep 18 20:28:06 2016 +0200

cmake: Link pthread library headers

Signed-off-by: Michael Adam 
Reviewed-by: Andreas Schneider 

commit 3507e186d08fa8170a3499c9e69a49aa60ff9dcd
Author: Andreas Schneider 
Date:   Thu Oct 20 10:56:35 2016 +0200

swrap: Fix strict-aliasing issues while loading symbols

Signed-off-by: Andreas Schneider 
Reviewed-by: Michael Adam 

---

Summary of changes:
 ConfigureChecks.cmake |  12 ++
 config.h.cmake|   1 +
 src/CMakeLists.txt|   2 +-
 src/socket_wrapper.c  | 434 +-
 tests/CMakeLists.txt  |   3 +-
 5 files changed, 306 insertions(+), 146 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 48455ef..71b34ce 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -172,6 +172,18 @@ int main(void) {
 }" HAVE_SOCKADDR_STORAGE)
 
 check_c_source_compiles("
+void test_constructor_attribute(void) __attribute__ ((constructor));
+
+void test_constructor_attribute(void)
+{
+return;
+}
+
+int main(void) {
+return 0;
+}" HAVE_CONSTRUCTOR_ATTRIBUTE)
+
+check_c_source_compiles("
 void test_destructor_attribute(void) __attribute__ ((destructor));
 
 void test_destructor_attribute(void)
diff --git a/config.h.cmake b/config.h.cmake
index a9b8ce8..6786b8a 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -58,6 +58,7 @@
 / OPTIONS /
 
 #cmakedefine HAVE_GCC_THREAD_LOCAL_STORAGE 1
+#cmakedefine HAVE_CONSTRUCTOR_ATTRIBUTE 1
 #cmakedefine HAVE_DESTRUCTOR_ATTRIBUTE 1
 #cmakedefine HAVE_ADDRESS_SANITIZER_ATTRIBUTE 1
 #cmakedefine HAVE_SOCKADDR_STORAGE 1
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4b22d77..3b4d7d0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(${CMAKE_BINARY_DIR})
 
 add_library(socket_wrapper SHARED socket_wrapper.c)
 
-target_link_libraries(socket_wrapper ${SWRAP_REQUIRED_LIBRARIES})
+target_link_libraries(socket_wrapper ${SWRAP_REQUIRED_LIBRARIES} 
${CMAKE_THREAD_LIBS_INIT})
 
 install(
   TARGETS
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 84dfc07..6679d5c 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -79,6 +79,7 @@
 #ifdef HAVE_RPC_RPC_H
 #include 
 #endif
+#include 
 
 enum swrap_dbglvl_e {
SWRAP_LOG_ERROR = 0,
@@ -94,6 +95,12 @@ enum swrap_dbglvl_e {
 #define PRINTF_ATTRIBUTE(a,b)
 #endif /* HAVE_FUNCTION_ATTRIBUTE_FORMAT */
 
+#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
+#define CONSTRUCTOR_ATTRIBUTE __attribute__ ((constructor))
+#else
+#define CONSTRUCTOR_ATTRIBUTE
+#endif /* HAVE_CONSTRUCTOR_ATTRIBUTE */
+
 #ifdef HAVE_DESTRUCTOR_ATTRIBUTE
 #define DESTRUCTOR_ATTRIBUTE __attribute__ ((destructor))
 #else
@@ -152,6 +159,22 @@ enum swrap_dbglvl_e {
 # endif
 #endif
 
+/* Macros for accessing mutexes */
+# define SWRAP_LOCK(m) do { \
+   pthread_mutex_lock(&(m ## _mutex)); \
+} while(0)
+
+# define SWRAP_UNLOCK(m) do { \
+   pthread_mutex_unlock(&(m ## _mutex)); \
+} while(0)
+
+/* Add new global locks here please */
+# define SWRAP_LOCK_ALL \
+   SWRAP_LOCK(libc_symbol_binding); \
+
+# define SWRAP_UNLOCK_ALL \
+   SWRAP_UNLOCK(libc_symbol_binding); \
+
 
 #define SWRAP_DLIST_ADD(list,item) do { \
if (!(list)) { \
@@ -305,9 +328,14 @@ static 

[SCM] Socket Wrapper Repository - branch master updated

2016-10-20 Thread Andreas Schneider
The branch, master has been updated
   via  b61f5df tests: Add a test for max_sockets
   via  f9fbda9 swrap: Introduce a freelist in the socket_info array
   via  69aee42 swrap: Replace linked list of socket_info with preallocated 
array of structures
   via  c3e5f78 swrap: Optimization in (commented out) 
check_addr_port_in_use()
   via  1e7528c swrap: Improve vfcntl to add the dup'd fd after the source 
fd
   via  d3d09e6 swrap: Improve dup2 to add the dup'd fd after the source fd
   via  ebe5f15 swrap: Improve dup to add the dup'd fd after the source fd
   via  97d2372 swrap: Add SWRAP_DLIST_ADD_AFTER macro
   via  087f9ae swrap: Untangle socket_info_fd from socket_info structure.
  from  f43d383 swrap: remove ununsed members from struct swrap.

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


- Log -
commit b61f5df9f4a7c57cb9ad313a20d7dbe316f42072
Author: Michael Adam 
Date:   Thu Sep 22 02:13:20 2016 +0200

tests: Add a test for max_sockets

Signed-off-by: Michael Adam 
Reviewed-by: Andreas Schneider 

commit f9fbda9ef0f7b279e8e618a3888ab2e50884da1b
Author: Michael Adam 
Date:   Wed Sep 14 13:24:47 2016 +0200

swrap: Introduce a freelist in the socket_info array

Signed-off-by: Michael Adam 
Reviewed-by: Andreas Schneider 

commit 69aee42f1d4a0e563b9e85e899dc8b4f18303af0
Author: Anoop C S 
Date:   Thu Aug 25 11:41:12 2016 +0530

swrap: Replace linked list of socket_info with preallocated array of 
structures

Pair-Programmed-With: Michael Adam 

Signed-off-by: Anoop C S 
Signed-off-by: Michael Adam 
Reviewed-by: Andreas Schneider 

commit c3e5f78016f4319fb22126163d0ddbcac0bdeed5
Author: Michael Adam 
Date:   Tue Aug 16 13:38:50 2016 +0200

swrap: Optimization in (commented out) check_addr_port_in_use()

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Adam 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

commit 1e7528c2b1a027538b54bd3576eba1206265ae8c
Author: Michael Adam 
Date:   Tue Aug 16 11:04:43 2016 +0200

swrap: Improve vfcntl to add the dup'd fd after the source fd

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Adam 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

commit d3d09e631aa7f9b5ffe88a786ad21e7e51aee909
Author: Michael Adam 
Date:   Tue Aug 16 11:04:12 2016 +0200

swrap: Improve dup2 to add the dup'd fd after the source fd

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Adam 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

commit ebe5f15854866c225febe73c952356873b958305
Author: Michael Adam 
Date:   Tue Aug 16 11:03:27 2016 +0200

swrap: Improve dup to add the dup'd fd after the source fd

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Adam 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

commit 97d23728cfc392fe5f2c33831f4c85aa31d083fc
Author: Michael Adam 
Date:   Tue Aug 16 11:00:50 2016 +0200

swrap: Add SWRAP_DLIST_ADD_AFTER macro

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Adam 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

commit 087f9aea821cceffd3ced15b576106cace8a2c9d
Author: Anoop C S 
Date:   Wed Aug 10 16:32:19 2016 +0530

swrap: Untangle socket_info_fd from socket_info structure.

This reverses the dependency of socket_info on socket_info_fd:
Instead of maintaining the list of socket_info structures,
and keeping a list of referencing fds (created by dup),
we now maintain the list of fds with pointers to the
corresponding socket_info structures, and count the
references in the socket_info.

This makes the treatment of the lists more obvious,
especially seen in the removing part.

This change is a preparatory step for implementing
fd-passing in socket-wrapper.

Pair-programmed-with: Michael Adam 
Signed-off-by: Anoop C S 
Signed-off-by: Michael Adam 
Reviewed-by: Andreas Schneider 


autobuild[sn-devel-104]: intermittent test failure detected

2016-10-20 Thread autobuild
The autobuild test system (on sn-devel-104) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-0808/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-0808/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-104/2016-10-20-0808/samba.stdout
  
The top commit at the time of the failure was:

commit beda6d3d48c30945bf4eac7d1d9e73967856bb51
Author: Volker Lendecke 
Date:   Wed Oct 19 10:27:14 2016 +0200

torture: Fix uninitialized variables

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 20 02:48:30 CEST 2016 on sn-devel-144