[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via 9367762 Added Ralph Boehme to team member list from 2687d6b Announce Samba 4.2.0rc1. http://gitweb.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit 93677628f2cfbc15d2c2cc1fce442a6f9fca63d7 Author: Ralph Boehme s...@samba.org Date: Mon Oct 6 15:17:47 2014 +0200 Added Ralph Boehme to team member list --- Summary of changes: team/index.html |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/team/index.html b/team/index.html index 7303c24..59861ee 100755 --- a/team/index.html +++ b/team/index.html @@ -52,6 +52,7 @@ mailing list/a and start contributing to the development of Samba./p lia href=mailto:anato...@samba.org;Anatoliy Atanasov/a/li lia href=http://samba.org/~abartlet/;Andrew Bartlett/anbsp;(a href=http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;Catalyst/a)/li lia href=mailto:k...@samba.org;Kai Blin/a/li +lia href=mailto:s...@samba.org;Ralph Bouml;hme/anbsp;(a href=http://www.sernet.de/en/;SerNet/a)/li lia href=mailto:a...@samba.org;Alexander Bokovoy/anbsp;(a href=https://www.redhat.com/;Red Hat/a)/li lia href=mailto:i...@samba.org;Ira Cooper/anbsp;(a href=https://www.redhat.com/;Red Hat/a)/li lia href=http://samba.org/~sdanneman/;Steven Danneman/a/li -- Samba Website Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ee9d075 nss_wrapper: check for nss.h from b8fce2c libcli/smb: use lib/crypto SHA512 functions, do not depend on heimdal. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ee9d075ae44ca8fdfa16afe878038711641f9a0c Author: Andreas Schneider a...@samba.org Date: Wed Oct 15 11:29:12 2014 +0200 nss_wrapper: check for nss.h Signed-off-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Wed Oct 15 14:06:11 CEST 2014 on sn-devel-104 --- Summary of changes: lib/nss_wrapper/wscript |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript index 94d23d5..b25b83d 100644 --- a/lib/nss_wrapper/wscript +++ b/lib/nss_wrapper/wscript @@ -9,6 +9,8 @@ def configure(conf): conf.DEFINE('USING_SYSTEM_NSS_WRAPPER', 1) libnss_wrapper_so_path = 'libnss_wrapper.so' else: +conf.CHECK_HEADERS('nss.h') + # check HAVE_GCC_THREAD_LOCAL_STORAGE conf.CHECK_CODE(''' __thread int tls; @@ -94,7 +96,7 @@ def configure(conf): conf.DEFINE('NSS_WRAPPER', 1) def build(bld): -if not bld.CONFIG_SET(USING_SYSTEM_NSS_WRAPPER): +if bld.CONFIG_SET(HAVE_NSS_H) and not bld.CONFIG_SET(USING_SYSTEM_NSS_WRAPPER): # We need to do it this way or the library wont work. # Using private_library=True will add symbol version which # breaks preloading! -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3121d6a test: Fix samba3.blackbox.net.registry.check from 907094c param: fix testparm to show hidden share defaults https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3121d6adea90dbeb6ae1148b93db442387ec8cfb Author: Volker Lendecke v...@samba.org Date: Thu Nov 27 22:04:58 2014 +0100 test: Fix samba3.blackbox.net.registry.check On FreeBSD, wc -l returns whitespace. Cope with that. Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Nov 28 10:24:06 CET 2014 on sn-devel-104 --- Summary of changes: source3/script/tests/test_net_registry_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/script/tests/test_net_registry_check.sh b/source3/script/tests/test_net_registry_check.sh index 1e3522d..566e63f 100755 --- a/source3/script/tests/test_net_registry_check.sh +++ b/source3/script/tests/test_net_registry_check.sh @@ -55,7 +55,7 @@ regchecknrepair() regcheck checkerr $EXPERR - test x$? = x$ERRCNT || { + test $? -eq $ERRCNT || { echo Expected $EXPERRCNT of error $EXPERR. Received $ERRCNT return 1 } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5747507 torture: Fix raw.open.chained-openx from 3121d6a test: Fix samba3.blackbox.net.registry.check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 574750777ad47d733a45a72e7da83297e3faa897 Author: Volker Lendecke v...@samba.org Date: Thu Nov 27 21:44:18 2014 +0100 torture: Fix raw.open.chained-openx sizeof(buf) is 5. On FreeBSD10/clang this overwrites ret. Not good. Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Nov 28 13:30:18 CET 2014 on sn-devel-104 --- Summary of changes: source4/torture/raw/open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 679a7c2..616ba5c 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -1386,8 +1386,8 @@ static bool test_chained(struct torture_context *tctx, struct smbcli_state *cli) io.openxreadx.in.timeout = 0; io.openxreadx.in.offset = 0; - io.openxreadx.in.mincnt = sizeof(buf); - io.openxreadx.in.maxcnt = sizeof(buf); + io.openxreadx.in.mincnt = sizeof(buf2); + io.openxreadx.in.maxcnt = sizeof(buf2); io.openxreadx.in.remaining = 0; io.openxreadx.out.data = (uint8_t *)buf2; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 93b3c15 vfs_fruit: Avoid double () via 6dedccd vfs_fruit: Avoid double initialization from 0da7295 lib/texpect: prefer bsd/libutil.h if available https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 93b3c157b7538e4610361e3d5491e5f762407b6f Author: Volker Lendecke v...@samba.org Date: Tue Dec 16 09:38:54 2014 +0100 vfs_fruit: Avoid double () Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Dec 18 19:19:04 CET 2014 on sn-devel-104 commit 6dedccd91d17e50bab8218e82331568abe18b853 Author: Volker Lendecke v...@samba.org Date: Tue Dec 16 09:38:21 2014 +0100 vfs_fruit: Avoid double initialization Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: source3/modules/vfs_fruit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a8bf7b4..ecaddfb 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -526,7 +526,7 @@ static bool ad_pack(struct adouble *ad) offset += ADEDLEN_NENTRIES; for (eid = 0, nent = 0; eid ADEID_MAX; eid++) { - if ((ad-ad_eid[eid].ade_off == 0)) { + if (ad-ad_eid[eid].ade_off == 0) { /* * ade_off is also used as indicator whether a * specific entry is used or not @@ -3389,7 +3389,6 @@ static struct vfs_fn_pointers vfs_fruit_fns = { .fstat_fn = fruit_fstat, .streaminfo_fn = fruit_streaminfo, .ntimes_fn = fruit_ntimes, - .unlink_fn = fruit_unlink, .ftruncate_fn = fruit_ftruncate, .fallocate_fn = fruit_fallocate, .create_file_fn = fruit_create_file, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 26809d1 smbd: Fix a small leak on talloc_tos() via 7dceb3a smbd: Fix an uninitialized variable read via 6c76c5e smbd: Make talloc_report of smb_filename more readable from 15511f7 vfs_unityed_media: VFS module for sharing AVID projects https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 26809d17f4a65334a40c219a9a29ed1ea1d4380b Author: Volker Lendecke v...@samba.org Date: Fri Jan 9 15:47:18 2015 +0100 smbd: Fix a small leak on talloc_tos() Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Sun Jan 11 20:34:56 CET 2015 on sn-devel-104 commit 7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9 Author: Volker Lendecke v...@samba.org Date: Fri Jan 9 15:45:41 2015 +0100 smbd: Fix an uninitialized variable read If dbwrap_fetch_locked failed, we did a TALLOC_FREE(value). Fix this with a talloc hierarchy. Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 6c76c5ef93cd51d0c19faa78cecdc49a3ff5fd03 Author: Volker Lendecke v...@samba.org Date: Fri Jan 9 15:38:19 2015 +0100 smbd: Make talloc_report of smb_filename more readable Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: source3/lib/filename_util.c | 6 ++ source3/locking/leases_db.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c index 3ebf311..316360b 100644 --- a/source3/lib/filename_util.c +++ b/source3/lib/filename_util.c @@ -199,14 +199,20 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx, if (in-base_name != NULL) { out-base_name = talloc_memdup( out, in-base_name, base_len); + talloc_set_name_const(out-base_name, + out-base_name); } if (in-stream_name != NULL) { out-stream_name = talloc_memdup( out, in-stream_name, stream_len); + talloc_set_name_const(out-stream_name, + out-stream_name); } if (in-original_lcomp != NULL) { out-original_lcomp = talloc_memdup( out, in-original_lcomp, lcomp_len); + talloc_set_name_const(out-original_lcomp, + out-original_lcomp); } out-st = in-st; return out; diff --git a/source3/locking/leases_db.c b/source3/locking/leases_db.c index 0700ba9..2ee6a26 100644 --- a/source3/locking/leases_db.c +++ b/source3/locking/leases_db.c @@ -243,7 +243,7 @@ NTSTATUS leases_db_del(const struct GUID *client_guid, goto out; } - value = talloc(talloc_tos(), struct leases_db_value); + value = talloc(rec, struct leases_db_value); if (value == NULL) { status = NT_STATUS_NO_MEMORY; goto out; @@ -283,7 +283,7 @@ NTSTATUS leases_db_del(const struct GUID *client_guid, } else { DEBUG(10, (%s: updating record\n, __func__)); ndr_err = ndr_push_struct_blob( - blob, talloc_tos(), value, + blob, rec, value, (ndr_push_flags_fn_t)ndr_push_leases_db_value); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { DEBUG(10, (%s: ndr_push_struct_blob_failed: %s\n, @@ -308,7 +308,6 @@ NTSTATUS leases_db_del(const struct GUID *client_guid, out: - TALLOC_FREE(value); TALLOC_FREE(rec); return status; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4143cba nfs4: Fix a confusing debug message from bfccf0a torture-krb5: Provide a generic handler to catch and print unexpected KRB_ERROR packets https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4143cbac8c4c45273420efeb4969bfd6ffa64c3d Author: Volker Lendecke v...@samba.org Date: Thu Feb 5 12:47:22 2015 +0100 nfs4: Fix a confusing debug message Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Mon Feb 9 12:25:06 CET 2015 on sn-devel-104 --- Summary of changes: source3/modules/nfs4_acls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 1aa819a..adc9b37 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -359,7 +359,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, struct security_ace *nt_ace_list = NULL; int good_aces = 0; - DEBUG(10, (smbacl_nfs42win entered\n)); + DEBUG(10, (%s entered\n, __func__)); aclint = get_validated_aclint(theacl); /* We do not check for theacl being NULL here -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 87b7a7d script/autobuild.py: build the samba target with --with-profiling-data via b9f9869 s3:smbprofile: profile the system and user space cpu time via 74a16a1 s3:smbprofile: Replace sysv shmem with tdb via 5fa692b s3:smbprofile: specify SMBPROFILE_STATS_SECTION_START() with name vs. display[name] from 7004ccc Implement TestCase.assertIsNotNone for python 2.7. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 87b7a7dbaa28b29dac316b8b6d953c231529e372 Author: Stefan Metzmacher me...@samba.org Date: Mon Dec 8 10:30:56 2014 +0100 script/autobuild.py: build the samba target with --with-profiling-data In future we may get also runtime tests for profiling... Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Michael Adam ob...@samba.org Autobuild-User(master): Michael Adam ob...@samba.org Autobuild-Date(master): Mon Dec 15 16:20:14 CET 2014 on sn-devel-104 (cherry picked from commit 4958fcdfa30fd9d8dc51ceafaab35721e61e72c7) commit b9f9869d1bec7cff6682d3cda774dcbb2464223b Author: Stefan Metzmacher me...@samba.org Date: Fri Nov 14 12:52:33 2014 +0100 s3:smbprofile: profile the system and user space cpu time Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 74a16a1094278d2c5c8ac800a4f7ed4553d7ac85 Author: Volker Lendecke v...@samba.org Date: Mon Sep 29 16:08:17 2014 + s3:smbprofile: Replace sysv shmem with tdb What? This patch gets rid of the central shared memory segment referenced by profile_p. Instead, every smbd gets a static profile_area where it collects profiling data. Once a second, every smbd writes this profiling data into a record of its own in a smbprofile.tdb. smbstatus -P does a tdb_traverse on this database and sums up what it finds. Why? At least in my perception sysv IPC has not the best reputation on earth. The code before this patch uses shmat(). Samba ages ago has developed a good abstraction of shared memory: It's called tdb. The main reason why I started this is that I have a request to become more flexible with profiling data. Samba should be able to collect data per share or per user, something which is almost impossible to do with a fixed structure. My idea is to for example install a profile area per share and every second marshall this into one tdb record indexed by share name. smbstatus -P would then also collect the data and either aggregate them or put them into individual per-share statistics. This flexibility in the data model is not really possible with one fixed structure. But isn't it slow? Well, I don't think so. I can't really prove it, but I do believe that on large boxes atomically incrementing a shared memory value for every SMB does show up due to NUMA effects. With this patch the hot code path is completely process-local. Once a second every smbd writes into a central tdb, this of course does atomic operations. But it's once a second, not on every SMB2 read. There's two places where I would like to improve things: With the current code all smbds wake up once a second. With 10,000 potentially idle smbds this will become noticable. That's why the current only starts the timer when something has changed. The second place is the tdb traverse: Right now traverse is blocking in the sense that when it has to switch hash chains it will block. With mutexes, this means a syscall. I have a traverse light in mind that works as follows: It assumes a locked hash chain and then walks the complete chain in one run without unlocking in between. This way the caller can do nonblocking locks in the first round and only do blocking locks in a second round. Also, a lot of syscall overhead will vanish. This way smbstatus -P will have almost zero impact on normal operations. Pair-Programmed-With: Stefan Metzmacher me...@samba.org Signed-off-by: Volker Lendecke v...@samba.org Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 5fa692b4aa36f66a14ae9b1512f881ecef23dca3 Author: Stefan Metzmacher me...@samba.org Date: Fri Nov 28 09:33:13 2014 +0100 s3:smbprofile: specify SMBPROFILE_STATS_SECTION_START() with name vs. display[name] Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: script/autobuild.py| 2 +- source3/include/smbprofile.h | 138 +++--- source3/profile/profile.c | 401
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4cc51f9 vfs_fruit: enhance handling of malformed AppleDouble files from 05b61ea lib: tdb: Use sigaction when testing for robust mutexes. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4cc51f905cb5cd80d2e289a124c0fe1630d945b5 Author: Ralph Boehme s...@samba.org Date: Mon Mar 2 18:15:06 2015 +0100 vfs_fruit: enhance handling of malformed AppleDouble files Trying for fixup a broken AppleDouble file with a resourcefork entry offset + length filesystem resulted in a crashing memmove() in ad_convert(). Add a specific safety check that stats the ._ file and limits the resource fork length to the filesize. While we're at it, now that we know the filesize in ad_unpack(), add additional checks that verify this. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11125 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Volker Lendecke v...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Mar 26 12:39:01 CET 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_fruit.c | 79 + 1 file changed, 73 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index fbee321..74ea8f8 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -569,7 +569,7 @@ static bool ad_pack(struct adouble *ad) /** * Unpack an AppleDouble blob into a struct adoble **/ -static bool ad_unpack(struct adouble *ad, const int nentries) +static bool ad_unpack(struct adouble *ad, const int nentries, size_t filesize) { size_t bufsize = talloc_get_size(ad-ad_data); int adentries, i; @@ -612,11 +612,26 @@ static bool ad_unpack(struct adouble *ad, const int nentries) return false; } + /* +* All entries other than the resource fork are +* expected to be read into the ad_data buffer, so +* ensure the specified offset is within that bound +*/ if ((off bufsize) (eid != ADEID_RFORK)) { DEBUG(1, (bogus eid %d: off: % PRIu32 , len: % PRIu32 \n, eid, off, len)); return false; } + + /* +* All entries besides FinderInfo and resource fork +* must fit into the buffer. FinderInfo is special as +* it may be larger then the default 32 bytes (if it +* contains marshalled xattrs), but we will fixup that +* in ad_convert(). And the resource fork is never +* accessed directly by the ad_data buf (also see +* comment above) anyway. +*/ if ((eid != ADEID_RFORK) (eid != ADEID_FINDERI) ((off + len) bufsize)) { @@ -625,6 +640,48 @@ static bool ad_unpack(struct adouble *ad, const int nentries) return false; } + /* +* That would be obviously broken +*/ + if (off filesize) { + DEBUG(1, (bogus eid %d: off: % PRIu32 , len: % PRIu32 \n, + eid, off, len)); + return false; + } + + /* +* Check for any entry that has its end beyond the +* filesize. +*/ + if (off + len off) { + DEBUG(1, (offset wrap in eid %d: off: % PRIu32 + , len: % PRIu32 \n, + eid, off, len)); + return false; + + } + if (off + len filesize) { + /* +* If this is the resource fork entry, we fix +* up the length, for any other entry we bail +* out. +*/ + if (eid != ADEID_RFORK) { + DEBUG(1, (bogus eid %d: off: % PRIu32 + , len: % PRIu32 \n, + eid, off, len)); + return false; + } + + /* +* Fixup the resource fork entry by limiting +* the size to entryoffset - filesize. +*/ + len = filesize - off; + DEBUG(1, (Limiting ADEID_RFORK: off: % PRIu32
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6b89848 pam: Fix CID 1034871 Resource leak via ad3e38f pam: Fix CID 1034870 Resource leak via de1bf29 lib: Fix CID 1273073 Assign instead of compare via 78fb663 smbd: Fix CID 1273088 Resource leak via ddb84ef aio_fork: Fix CID 1273291 Uninitialized scalar variable from 7be3a5f tevent: Ignore unexpected signal events in the same way the epoll backend does. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6b898481afc7f2d20ca679632b516359e7afaf6a Author: Volker Lendecke v...@samba.org Date: Tue Mar 3 16:12:03 2015 +0100 pam: Fix CID 1034871 Resource leak Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Mar 3 20:03:25 CET 2015 on sn-devel-104 commit ad3e38f6bb65fdf16cc792b97333a74d49f345bf Author: Volker Lendecke v...@samba.org Date: Tue Mar 3 16:11:26 2015 +0100 pam: Fix CID 1034870 Resource leak Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit de1bf29d250849ebea1a3badd3e881035c1897b0 Author: Volker Lendecke v...@samba.org Date: Tue Mar 3 15:57:02 2015 +0100 lib: Fix CID 1273073 Assign instead of compare This is a brown paper bag thingy, right? Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 78fb663d4c29f9a226c26001492cbc7a9a701668 Author: Volker Lendecke v...@samba.org Date: Tue Mar 3 15:53:34 2015 +0100 smbd: Fix CID 1273088 Resource leak Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit ddb84ef2d39524149ffe74d752993ca93547b9be Author: Volker Lendecke v...@samba.org Date: Tue Mar 3 15:48:46 2015 +0100 aio_fork: Fix CID 1273291 Uninitialized scalar variable The previous code left msg.msg_flags uninitialized Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: lib/util/close_low_fd.c| 2 +- nsswitch/pam_winbind.c | 6 +- source3/modules/vfs_aio_fork.c | 4 +--- source3/smbd/smb2_setinfo.c| 1 + 4 files changed, 8 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/close_low_fd.c b/lib/util/close_low_fd.c index b11d25f..5e74918 100644 --- a/lib/util/close_low_fd.c +++ b/lib/util/close_low_fd.c @@ -28,7 +28,7 @@ _PUBLIC_ int close_low_fd(int fd) dev_null = open(/dev/null, O_RDWR, 0); - if ((dev_null == -1) (errno = ENFILE)) { + if ((dev_null == -1) (errno == ENFILE)) { /* * Try to free up an fd */ diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index f1b88cb..1e16741 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -2436,6 +2436,7 @@ static char* winbind_upn_to_username(struct pwb_context *ctx, char *domain = NULL; char *name; char *p; + char *result; /* This cannot work when the winbind separator = @ */ @@ -2467,7 +2468,10 @@ static char* winbind_upn_to_username(struct pwb_context *ctx, return NULL; } - return talloc_asprintf(ctx, %s%c%s, domain, sep, name); + result = talloc_asprintf(ctx, %s%c%s, domain, sep, name); + wbcFreeMemory(domain); + wbcFreeMemory(name); + return result; } static int _pam_delete_cred(pam_handle_t *pamh, int flags, diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index bf29dd1..06f38c2 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -203,15 +203,13 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd) static ssize_t write_fd(int fd, void *ptr, size_t nbytes, int sendfd) { - struct msghdr msg; + struct msghdr msg = {0}; size_t bufsize = msghdr_prep_fds(NULL, NULL, 0, sendfd, 1); uint8_t buf[bufsize]; struct iovec iov; ssize_t sent; msghdr_prep_fds(msg, buf, bufsize, sendfd, 1); - msg.msg_name = NULL; - msg.msg_namelen = 0; iov.iov_base = (void *)ptr; iov.iov_len = nbytes; diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index e6981d1..3f7bbec 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -474,6 +474,7 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx, lck = get_existing_share_mode_lock(mem_ctx, fsp-file_id); if (lck == NULL) { + SAFE_FREE(data
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ec085fe Revert wafsamba: flags from enviroment are put before our own internal versions from 4903064 s4: rpc: Refactor dcesrv_alter() function into setup and send steps. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ec085fe8b3d4f54294194f87a2875d75c4d92c20 Author: Ralph Boehme s...@samba.org Date: Sat Apr 25 03:38:48 2015 +0200 Revert wafsamba: flags from enviroment are put before our own internal versions This reverts commit b2bb6aeb8057ac725f6ad12378344b201c3a3ba2. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Jelmer Vernooij jel...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Sun Apr 26 18:40:39 CEST 2015 on sn-devel-104 --- Summary of changes: buildtools/wafsamba/samba_optimisation.py | 42 --- 1 file changed, 42 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py index 5def580..51d514e 100644 --- a/buildtools/wafsamba/samba_optimisation.py +++ b/buildtools/wafsamba/samba_optimisation.py @@ -287,45 +287,3 @@ def samba_before_apply_obj_vars(self): for i in v['LIBPATH']: if is_standard_libpath(v, i): v['LIBPATH'].remove(i) - -@feature('cc') -@before('apply_incpaths', 'apply_obj_vars_cc') -def samba_stash_cppflags(self): -Fix broken waf ordering of CPPFLAGS - -self.env.SAVED_CPPFLAGS = self.env.CPPFLAGS -self.env.CPPFLAGS = [] - -@feature('cc') -@after('apply_incpaths', 'apply_obj_vars_cc') -def samba_pop_cppflags(self): -append stashed user CPPFLAGS after our internally computed flags - -# -# Note that we don't restore the values to 'CPPFLAGS', -# but to _CCINCFLAGS instead. -# -# buildtools/wafadmin/Tools/cc.py defines the 'cc' task generator as -# '${CC} ${CCFLAGS} ${CPPFLAGS} ${_CCINCFLAGS} ${_CCDEFFLAGS} ${CC_SRC_F}${SRC} ${CC_TGT_F}${TGT}' -# -# Our goal is to effectively invert the order of ${CPPFLAGS} and -# ${_CCINCFLAGS}. -self.env.append_value('_CCINCFLAGS', self.env.SAVED_CPPFLAGS) -self.env.SAVED_CPPFLAGS = [] - -@feature('cprogram', 'cshlib', 'cstaticlib') -@before('apply_obj_vars', 'add_extra_flags') -def samba_stash_linkflags(self): -stash away LINKFLAGS in order to fix waf's broken ordering wrt or -user LDFLAGS - -self.env.SAVE_LINKFLAGS = self.env.LINKFLAGS -self.env.LINKFLAGS = [] - -@feature('cprogram', 'cshlib', 'cstaticlib') -@after('apply_obj_vars', 'add_extra_flags') -def samba_pop_linkflags(self): -after apply_obj_vars append saved LDFLAGS - -self.env.append_value('LINKFLAGS', self.env.SAVE_LINKFLAGS) -self.env.SAVE_LINKFLAGS = [] -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5e65ae1 vfp_gpfs: ensure END_PROFILE is always called from 316ace6 s3-rpc_server: fix rpc_create_tcpip_sockets() processing of interfaces. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058 Author: Ralph Boehme s...@samba.org Date: Wed Apr 29 20:48:08 2015 +0200 vfp_gpfs: ensure END_PROFILE is always called Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Christof Schmitt c...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Apr 30 19:34:41 CEST 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_gpfs.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 6ab17d5..a1912df 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -125,8 +125,6 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data *config; int ret = 0; - START_PROFILE(syscall_kernel_flock); - SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, return -1); @@ -145,6 +143,8 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, return 0; } + START_PROFILE(syscall_kernel_flock); + kernel_flock(fsp-fh-fd, share_mode, access_mask); if (!set_gpfs_sharemode(fsp, access_mask, fsp-share_access)) { @@ -198,14 +198,16 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data *config; int ret=0; - START_PROFILE(syscall_linux_setlease); - SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, return -1); - if (linux_set_lease_sighandler(fsp-fh-fd) == -1) - return -1; + START_PROFILE(syscall_linux_setlease); + + if (linux_set_lease_sighandler(fsp-fh-fd) == -1) { + ret = -1; + goto failure; + } if (config-leases) { /* @@ -219,6 +221,7 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, END_PROFILE(syscall_linux_setlease); +failure: return ret; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9928d98 s3: torture: Add regression test for bug #11249. via 0f23bf2 s3: smbd: VFS: fake_acl module called get_full_smb_filename() with a stream path, then used the result to call XATTR functions directly. via ccb4f79 s3: smbd: VFS: For all EA and ACL calls use synthetic_smb_fname(), not synthetic_smb_fname_split(). via 6fd2b74 s3: smbd: VFS: Remove vfs_stat_smb_fname() and vfs_lstat_smb_fname(). via 14f4e25 s3: smbd: VFS: All the places that are currently calling vfs_stat_smb_fname() and vfs_lstat_smb_fname() should be calling vfs_stat_smb_basename(). via 044dabf s3: smbd: VFS: Add vfs_stat_smb_basename() - to be called when we *know* stream name parsing has already been done. from 38beef2 libads: Fix deadlock when re-joining a domain and updating keytab https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9928d9832cccb11c4a605c5ce31be3af961c141f Author: Jeremy Allison j...@samba.org Date: Fri May 1 21:08:21 2015 -0700 s3: torture: Add regression test for bug #11249. Bug 11249 - Mangled names do not work with acl_xattr BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue May 5 16:37:18 CEST 2015 on sn-devel-104 commit 0f23bf228ceb38b024a77fcf2916971ad4f6aa4d Author: Jeremy Allison j...@samba.org Date: Mon May 4 19:56:39 2015 -0700 s3: smbd: VFS: fake_acl module called get_full_smb_filename() with a stream path, then used the result to call XATTR functions directly. Ensure when pulling XATTR values, we don't allow a stream filename. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit ccb4f791fd19d9b3af79a205a15c0219ed7240ea Author: Jeremy Allison j...@samba.org Date: Fri May 1 21:06:20 2015 -0700 s3: smbd: VFS: For all EA and ACL calls use synthetic_smb_fname(), not synthetic_smb_fname_split(). EA's and ACL paths are all post-stream name checks (and shouldn't get stream names). This one took a *long* time to find. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 6fd2b74580b8395309d91ccad859a613598fc7de Author: Jeremy Allison j...@samba.org Date: Fri May 1 13:13:00 2015 -0700 s3: smbd: VFS: Remove vfs_stat_smb_fname() and vfs_lstat_smb_fname(). No longer used or needed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 14f4e254bb8d1f456ebb8da728f2fb812a9b3034 Author: Jeremy Allison j...@samba.org Date: Fri May 1 13:09:36 2015 -0700 s3: smbd: VFS: All the places that are currently calling vfs_stat_smb_fname() and vfs_lstat_smb_fname() should be calling vfs_stat_smb_basename(). They are all post-stream name processing. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 044dabfd92d09de4f168a36a07ac3232f5647a1d Author: Jeremy Allison j...@samba.org Date: Fri May 1 12:50:51 2015 -0700 s3: smbd: VFS: Add vfs_stat_smb_basename() - to be called when we *know* stream name parsing has already been done. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249 Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: selftest/target/Samba3.pm | 13 + source3/modules/nfs4_acls.c | 4 +-- source3/modules/non_posix_acls.c | 2 +- source3/modules/vfs_acl_common.c | 19 - source3/modules/vfs_acl_tdb.c | 16 ++- source3/modules/vfs_fake_acls.c | 22 +-- source3/modules/vfs_recycle.c | 2 +- source3/modules/vfs_solarisacl.c | 2 +- source3/modules/vfs_xattr_tdb.c | 4 +-- source3/script/tests/test_smbclient_s3.sh | 38 + source3/smbd/posix_acls.c | 2 +- source3/smbd/proto.h | 4 +-- source3/smbd/vfs.c| 47 ++- 13 files changed, 109
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3876e59 vfs_gpfs: move failure label before END_PROFILE from c7fcab7 s3:smbXsrv: refactor duplicate code into smbXsrv_session_clear_and_logoff() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3876e59826ad17466975ae9e9a65879c76737b2b Author: Ralph Boehme s...@samba.org Date: Thu Apr 30 12:29:57 2015 +0200 vfs_gpfs: move failure label before END_PROFILE The label was added in 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058 as part of fix for bug 11244, but was wrongly placed behind END_PROFILE. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244 Signed-off-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu May 7 19:22:00 CEST 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_gpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 4f2da20..9ad8fbc 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -219,9 +219,9 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, unbecome_root(); } +failure: END_PROFILE(syscall_linux_setlease); -failure: return ret; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b1e718f nsswitch: Simplify winbind_named_pipe_sock() from a84e982 ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b1e718f101fe6788b64b2deab09d2001bf8e0b2f Author: Volker Lendecke v...@samba.org Date: Sun Mar 1 11:43:01 2015 + nsswitch: Simplify winbind_named_pipe_sock() Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Mon Jun 8 19:48:18 CEST 2015 on sn-devel-104 --- Summary of changes: nsswitch/wb_common.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index 036557a..3194df1 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -220,10 +220,10 @@ static int winbind_named_pipe_sock(const char *dir) { struct sockaddr_un sunaddr; struct stat st; - char *path = NULL; int fd; int wait_time; int slept; + int ret; /* Check permissions on unix socket directory */ @@ -244,25 +244,24 @@ static int winbind_named_pipe_sock(const char *dir) /* Connect to socket */ - if (asprintf(path, %s/%s, dir, WINBINDD_SOCKET_NAME) 0) { + sunaddr = (struct sockaddr_un) { .sun_family = AF_UNIX }; + + ret = snprintf(sunaddr.sun_path, sizeof(sunaddr.sun_path), + %s/%s, dir, WINBINDD_SOCKET_NAME); + if ((ret == -1) || (ret = sizeof(sunaddr.sun_path))) { + errno = ENAMETOOLONG; return -1; } - ZERO_STRUCT(sunaddr); - sunaddr.sun_family = AF_UNIX; - strncpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path) - 1); - /* If socket file doesn't exist, don't bother trying to connect with retry. This is an attempt to make the system usable when the winbindd daemon is not running. */ - if (lstat(path, st) == -1) { + if (lstat(sunaddr.sun_path, st) == -1) { errno = ENOENT; - SAFE_FREE(path); return -1; } - SAFE_FREE(path); /* Check permissions on unix socket file */ /* @@ -290,7 +289,6 @@ static int winbind_named_pipe_sock(const char *dir) for (wait_time = 0; connect(fd, (struct sockaddr *)sunaddr, sizeof(sunaddr)) == -1; wait_time += slept) { struct pollfd pfd; - int ret; int connect_errno = 0; socklen_t errnosize; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b26a144 vfs_fruit: add option veto_appledouble from af7cc9d s3:param/loadparm fix testparm --show-all-parameters https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b26a1449a0e6d01d5ddca89547df739732c8a230 Author: Ralph Boehme s...@samba.org Date: Sat May 9 08:31:24 2015 +0200 vfs_fruit: add option veto_appledouble vfs_fruit adds a wildcard path ._* to the vetolist in order to prevent client access to ._ AppleDouble files created internally by vfs_fruit for storing the Mac resource fork stream. Unfortunately there are legitimite use cases where an OS X client may want to use such filenames, extracting ZIP archives (where the archive contains ._ files) being one of them. A possible simple solution to this problem would be to not veto ._ files in the first place, even though that exposes internally created ._ files which the client shouldn't be able to access. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11305 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Jun 9 14:48:14 CEST 2015 on sn-devel-104 --- Summary of changes: docs-xml/manpages/vfs_fruit.8.xml | 17 ++ source3/modules/vfs_fruit.c | 48 +++ 2 files changed, 45 insertions(+), 20 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index 4e296a4..e407b54 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -197,6 +197,23 @@ /listitem /varlistentry + varlistentry + termfruit:veto_appledouble = yes | no/term + listitem + paraWhether ._ AppleDouble files are vetoed which + prevents the client from seing and accessing internal + AppleDouble files created by vfs_fruit itself for the + purpose of storing a Mac resource fork./para + paraVetoing ._ files may break some applications, eg + extracting Mac ZIP archives from Mac clients failes, + because they contain ._ files. Setting this option to + false will fix this, but the abstraction leak of + exposing the internally created ._ files may have other + unknown side effects./para + paraThe default is emphasisyes/emphasis./para + /listitem + /varlistentry + /variablelist /refsect1 diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 8f582c6..2547838 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -126,6 +126,7 @@ struct fruit_config_data { bool use_aapl; bool readdir_attr_enabled; bool unix_info_enabled; + bool veto_appledouble; /* * Additional options, all enabled by default, @@ -1334,6 +1335,11 @@ static int init_fruit_config(vfs_handle_struct *handle) } config-encoding = (enum fruit_encoding)enumval; + if (lp_parm_bool(SNUM(handle-conn), +FRUIT_PARAM_TYPE_NAME, veto_appledouble, true)) { + config-veto_appledouble = true; + } + if (lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, aapl, true)) { config-use_aapl = true; } @@ -2014,26 +2020,6 @@ static int fruit_connect(vfs_handle_struct *handle, return rc; } - list = lp_veto_files(talloc_tos(), SNUM(handle-conn)); - - if (list) { - if (strstr(list, / ADOUBLE_NAME_PREFIX */) == NULL) { - newlist = talloc_asprintf( - list, - %s/ ADOUBLE_NAME_PREFIX */, - list); - lp_do_parameter(SNUM(handle-conn), - veto files, - newlist); - } - } else { - lp_do_parameter(SNUM(handle-conn), - veto files, - / ADOUBLE_NAME_PREFIX */); - } - - TALLOC_FREE(list); - rc = init_fruit_config(handle); if (rc != 0) { return rc; @@ -2042,6 +2028,28 @@ static int fruit_connect(vfs_handle_struct *handle, SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data, return -1); + if (config-veto_appledouble) { + list = lp_veto_files(talloc_tos(), SNUM(handle-conn)); + + if (list) { + if (strstr(list
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 408c965 s4:torture:vfs_fruit: copyfile via 6fd351f vfs:fruit: implement copyfile style copy_chunk via de4304d smb2:ioctl: support for OS X AAPL copyfile style copy_chunk via edf3b61 s3:util: use pread/pwrite in transfer_file via 8357dcb smbd/smb2_ioctl: fix error handling via f0d6e4e vfs_fruit: simplify lp_parm_bool check from e50bf6d replace: Replace BSD strtoll by wrapping strtoll instead of strtoq https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 408c965aab02484987a9446dcdae447cf6514164 Author: Ralph Boehme s...@samba.org Date: Wed Jun 10 15:30:04 2015 +0200 s4:torture:vfs_fruit: copyfile Bug: https://bugzilla.samba.org/show_bug.cgi?id=11317 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Jun 23 14:37:05 CEST 2015 on sn-devel-104 commit 6fd351f23bcbb20019dd967cb40220d195ce726f Author: Ralph Boehme s...@samba.org Date: Wed Apr 22 22:29:16 2015 +0200 vfs:fruit: implement copyfile style copy_chunk Implement Apple's special copy_chunk ioctl that requests a copy of the whole file along with all attached metadata. These copy_chunk requests have a chunk count of 0 that we translate to a copy_chunk_send VFS call overloading the parameters src_off = dest_off = num = 0. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11317 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit de4304d22b7d134c0d75924e37f8289a74c7ed7d Author: Ralph Boehme s...@samba.org Date: Wed Apr 22 22:29:16 2015 +0200 smb2:ioctl: support for OS X AAPL copyfile style copy_chunk Apple's special copy_chunk ioctl that requests a copy of the whole file along with all attached metadata. These copy_chunk requests have a chunk count of 0 that we translate to a copy_chunk_send VFS call overloading the parameters src_off = dest_off = num = 0. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11317 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit edf3b6146531bb3f15442bbb0cdad7b03be9650b Author: Ralph Boehme s...@samba.org Date: Mon Apr 27 12:16:16 2015 +0200 s3:util: use pread/pwrite in transfer_file read/write aren't overloaded in the streams VFS modules, using pread/pwrite instead this makes it possible to use transfer_file() with named streams. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11317 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 8357dcb4697fba30591968e60a7fdb51aa29a4bf Author: Ralph Boehme s...@samba.org Date: Tue Jun 9 17:47:31 2015 +0200 smbd/smb2_ioctl: fix error handling tevent_req_nterror must be called directly as the last step before returning with tevent_req_post. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit f0d6e4e3c3e9874f78439347ad7a68a3bbe9285a Author: Ralph Boehme s...@samba.org Date: Mon Jun 15 18:31:23 2015 +0200 vfs_fruit: simplify lp_parm_bool check Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org --- Summary of changes: docs-xml/manpages/vfs_fruit.8.xml| 12 + selftest/target/Samba3.pm| 3 + selftest/target/Samba4.pm| 3 + source3/include/transfer_file.h | 4 +- source3/include/vfs.h| 2 + source3/lib/util_transfer_file.c | 23 +- source3/modules/vfs_fruit.c | 253 ++-- source3/smbd/smb2_ioctl_network_fs.c | 42 +++- source3/smbd/vfs.c | 10 +- source4/torture/vfs/fruit.c | 450 ++- 10 files changed, 760 insertions(+), 42 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index e407b54..9f77d9b 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -214,6 +214,18 @@ /listitem /varlistentry + varlistentry + termfruit:copyfile = yes | no/term + listitem + paraWhether to enable OS X specific copychunk ioctl + that requests a copy of a whole file along with all + attached metadata./para + paraWARNING: the copyfile request is blocking the + client while the server does the copy./para. + paraThe default is emphasisno/emphasis./para + /listitem + /varlistentry
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2ffa939 s4:torture:smb2:compound: compound read and padding via dfa64b9 s3:smb2: add padding to last command in compound requests from a4cc7d4 messages_ctdb: Use message_hdr_[get/put] https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2ffa939bbe2c02509e1790c8b3f6f9b6910e3cf6 Author: Ralph Boehme s...@samba.org Date: Thu May 14 04:27:54 2015 +0200 s4:torture:smb2:compound: compound read and padding Add test to check that compound read responses are padded to an 8 byte boundary. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11277 Pair-Programmed-With: Stefan Metzmacher me...@samba.org Signed-off-by: Ralph Boehme s...@samba.org Signed-off-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu May 28 16:50:39 CEST 2015 on sn-devel-104 commit dfa64b958b201931e0dbe11f153f606f20217594 Author: Ralph Boehme s...@samba.org Date: Thu May 28 09:02:17 2015 +0200 s3:smb2: add padding to last command in compound requests Following Windows behaviour, the last command in a compound request should be padded to an 8 byte boundary and OS X clients crash badly if we don't pad. [MS-SMB2] 3.3.4.1.3, Sending Compounded Responses, doesn't make it clear whether the padding requirement governs the last command in a compound response, a future MS-SMB2 update will document Windwows product behaviour in a footnote. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11277 Pair-Programmed-With: Stefan Metzmacher me...@samba.org Signed-off-by: Ralph Boehme s...@samba.org Signed-off-by: Stefan Metzmacher me...@samba.org --- Summary of changes: source3/smbd/smb2_server.c | 16 ++- source4/torture/smb2/compound.c | 239 2 files changed, 251 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 9e5eff7..38590a9 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -2654,8 +2654,13 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req, outdyn_v-iov_len = 0; } - /* see if we need to recalculate the offset to the next response */ - if (next_command_ofs 0) { + /* +* See if we need to recalculate the offset to the next response +* +* Note that all responses may require padding (including the very last +* one). +*/ + if (req-out.vector_count = (2 * SMBD_SMB2_NUM_IOV_PER_REQ)) { next_command_ofs = SMB2_HDR_BODY; next_command_ofs += SMBD_SMB2_OUT_BODY_LEN(req); next_command_ofs += SMBD_SMB2_OUT_DYN_LEN(req); @@ -2709,8 +2714,11 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req, next_command_ofs += pad_size; } - SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND, next_command_ofs); - + if ((req-current_idx + SMBD_SMB2_NUM_IOV_PER_REQ) = req-out.vector_count) { + SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND, 0); + } else { + SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND, next_command_ofs); + } return smbd_smb2_request_reply(req); } diff --git a/source4/torture/smb2/compound.c b/source4/torture/smb2/compound.c index 9b3cacc..a502103 100644 --- a/source4/torture/smb2/compound.c +++ b/source4/torture/smb2/compound.c @@ -34,6 +34,14 @@ goto done; \ }} while (0) +#define CHECK_VALUE(v, correct) do { \ + if ((v) != (correct)) { \ + torture_result(tctx, TORTURE_FAIL, \ + (%s) Incorrect value %s=%d - should be %d\n, \ + __location__, #v, (int)v, (int)correct); \ + ret = false; \ + }} while (0) + static struct { struct smb2_handle handle; uint8_t level; @@ -433,6 +441,236 @@ done: return ret; } +static bool test_compound_padding(struct torture_context *tctx, + struct smb2_tree *tree) +{ + struct smb2_handle h; + struct smb2_create cr; + struct smb2_read r; + const char *fname = compound_read.dat; + const char *sname = compound_read.dat:foo; + struct smb2_request *req[3]; + NTSTATUS status; + bool ret = false; + + smb2_util_unlink(tree, fname); + + /* Write file */ + ZERO_STRUCT(cr); + cr.in.desired_access = SEC_FILE_WRITE_DATA; + cr.in.file_attributes = FILE_ATTRIBUTE_NORMAL; + cr.in.create_disposition = NTCREATEX_DISP_CREATE; + cr.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS; + cr.in.fname = fname
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 589de04 docs: Document smbclient notify command from 9ebf380 lib/util:charset/tests: improve strlen_m[_term[_null]]() testing https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 589de041785366722745fd731f478e4b0512e1ea Author: Volker Lendecke v...@samba.org Date: Fri Jul 3 15:10:17 2015 +0200 docs: Document smbclient notify command Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Jul 3 18:30:21 CEST 2015 on sn-devel-104 --- Summary of changes: docs-xml/manpages/smbclient.1.xml | 14 ++ 1 file changed, 14 insertions(+) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/smbclient.1.xml b/docs-xml/manpages/smbclient.1.xml index 7438aed..8b166d1 100644 --- a/docs-xml/manpages/smbclient.1.xml +++ b/docs-xml/manpages/smbclient.1.xml @@ -857,6 +857,20 @@ /varlistentry varlistentry + termnotify lt;dir namegt;/term + listitemparaQuery a directory for change + notifications. This command issues a recursive + filechangenotify call for all possible changes. As + changes come in will print one line per change. See + ulink url=https://msdn.microsoft.com/en-us/library/dn392331.aspx;https://msdn.microsoft.com/en-us/library/dn392331.aspx/ulink + for a description of the action numbers that this + command prints./para + paraThis command never ends, it waits for event + indefinitely. + /para/listitem + /varlistentry + + varlistentry termposix/term listitemparaQuery the remote server to see if it supports the CIFS UNIX extensions and prints out the list of capabilities supported. If so, turn -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c6e044e s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream via 25f302a vfs_fruit: check offset and length for AFP_AfpInfo read requests from f87e70a s3:libads: improve debug levels/messages in ads_find_dc() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c6e044ea33d1f16809196833e9e96a10e65b092e Author: Ralph Boehme s...@samba.org Date: Thu Jun 25 16:25:05 2015 +0200 s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Volker Lendecke v...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Jul 3 01:47:29 CEST 2015 on sn-devel-104 commit 25f302a47c3119d454531dc992183552b9a42b13 Author: Ralph Boehme s...@samba.org Date: Thu Jun 25 15:42:04 2015 +0200 vfs_fruit: check offset and length for AFP_AfpInfo read requests fruit_pread doesn't check the offset and length parameters and instead always writes 60 bytes, the size of the AFP_AfpInfo blob, to the the passed buffer. If the passed in buffer is smaller, we overwrite something somewhere. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Volker Lendecke v...@samba.org --- Summary of changes: source3/modules/vfs_fruit.c | 16 +++- source4/torture/vfs/fruit.c | 92 + 2 files changed, 107 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index a4272f5..d05d786 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2621,6 +2621,17 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, } if (ad-ad_type == ADOUBLE_META) { + char afpinfo_buf[AFP_INFO_SIZE]; + size_t to_return; + + if ((offset 0) || (offset AFP_INFO_SIZE)) { + len = 0; + rc = 0; + goto exit; + } + + to_return = AFP_INFO_SIZE - offset; + ai = afpinfo_new(talloc_tos()); if (ai == NULL) { rc = -1; @@ -2636,11 +2647,14 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, memcpy(ai-afpi_FinderInfo[0], ad_entry(ad, ADEID_FINDERI), ADEDLEN_FINDERI); - len = afpinfo_pack(ai, data); + len = afpinfo_pack(ai, afpinfo_buf); if (len != AFP_INFO_SIZE) { rc = -1; goto exit; } + + memcpy(data, afpinfo_buf + offset, to_return); + len = to_return; } else { len = SMB_VFS_NEXT_PREAD( handle, fsp, data, n, diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index c65ba74..4de21b2 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -49,6 +49,15 @@ goto done; \ }} while (0) +#define CHECK_VALUE(v, correct) do { \ + if ((v) != (correct)) { \ + torture_result(tctx, TORTURE_FAIL, \ + (%s) Incorrect value %s=%u - should be %u\n, \ + __location__, #v, (unsigned)v, (unsigned)correct); \ + ret = false; \ + goto done; \ + }} while (0) + /* * REVIEW: * This is hokey, but what else can we do? @@ -932,6 +941,67 @@ static bool check_stream(struct smb2_tree *tree, * Read 'count' bytes at 'offset' from stream 'fname:sname' and * compare against buffer 'value' **/ +static ssize_t read_stream(struct smb2_tree *tree, + const char *location, + struct torture_context *tctx, + TALLOC_CTX *mem_ctx, + const char *fname, + const char *sname, + off_t read_offset, + size_t read_count) +{ + struct smb2_handle handle; + struct smb2_create create; + struct smb2_read r; + NTSTATUS status; + const char *full_name; + bool ret = true; + + full_name = talloc_asprintf(mem_ctx, %s%s, fname, sname); + if (full_name == NULL) { + torture_comment(tctx, talloc_asprintf error\n); + return -1; + } + ZERO_STRUCT(create); + create.in.desired_access = SEC_FILE_READ_DATA; + create.in.file_attributes = FILE_ATTRIBUTE_NORMAL
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0afea2c WHATSNEW: Spotlight via e0edda7 s3-mdssvc: add documentation for mdssvc and mdssd via 480cc51 s3-mdssvc: add mdssd RPC service daemon for mdssvc via 4b0ee5d s3-mdssvc: lexer and parser for Spotlight queries via c2c5621 s3-mdssvc: main Spotlight code via 0de03ce s3-mdssvc: Spotlight attribute mappings via 5d4ecea s3-mdssvc: (un)marshalling Spotlight RPC blob via 222e863 s3-mdssvc: dalloc: dynamic object store based on talloc via 25f56f5 s3-mdssvc: add new option 'spotlight' via 63dd793 s3-mdssvc: add Spotlight RPC stubs via 5c6e2b2 mdssvc: IDL file for new RPC service via 6e332ab s3-mdssvc: add configure option --enable-spotlight from 66736fe s4:torture/rpc: use dcerpc_secondary_auth_connection with creds https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0afea2c364234a28f0b18e97fa08a2c7fe2ae4ae Author: Ralph Boehme s...@samba.org Date: Fri Mar 27 17:39:43 2015 +0100 WHATSNEW: Spotlight Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Jul 7 20:35:07 CEST 2015 on sn-devel-104 commit e0edda73115e8671da11cdb18bd88b6461a02210 Author: Ralph Boehme r...@sernet.de Date: Mon Aug 11 22:30:53 2014 +0200 s3-mdssvc: add documentation for mdssvc and mdssd Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 480cc511ff350fd6c6952e8fa991571784b3aa23 Author: Ralph Boehme r...@sernet.de Date: Mon Aug 11 22:29:09 2014 +0200 s3-mdssvc: add mdssd RPC service daemon for mdssvc Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 4b0ee5d209778694d7ee8514bfa9d38f07e39901 Author: Ralph Boehme r...@sernet.de Date: Thu Jul 31 18:01:34 2014 +0200 s3-mdssvc: lexer and parser for Spotlight queries Add a lexer and parser for translating Spotlight query strings to SPARQL. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit c2c5621380ce59e034bddc12e7dc4feebc7daa9f Author: Ralph Boehme s...@samba.org Date: Thu Mar 26 22:39:21 2015 +0100 s3-mdssvc: main Spotlight code Implement all Spotlight RPC commands with the Tracker SPARQL async query API. Tracker uses glib for implemeting async tasks, we thus have to use a glib mainloop for processing sheduled tasks in threads. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 0de03ce4a451ac6887a84b4f9786b1b5bd12cbbb Author: Ralph Boehme r...@sernet.de Date: Thu Jul 31 17:56:44 2014 +0200 s3-mdssvc: Spotlight attribute mappings Add mappings for metadata attribute between Spotlight and NEPOMUK for use with Tracker. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 5d4eceae1579de341e69a090a3983e323591ce8e Author: Ralph Boehme r...@sernet.de Date: Thu Jul 31 17:07:28 2014 +0200 s3-mdssvc: (un)marshalling Spotlight RPC blob Add code for marshalling and unmarshalling Spotlight RPC blobs from/into a dalloc object store. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 222e863d4e31f0a30c83eef39e5b4d8475f066d1 Author: Ralph Boehme r...@sernet.de Date: Thu Jul 31 16:27:36 2014 +0200 s3-mdssvc: dalloc: dynamic object store based on talloc dalloc is a hack with a bizarre API, but it does its job: it's a simple object store that allows for storing simple and complex data types. We'll use it for storing Spotlight query data. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 25f56f5f4060c912f4fb6a9ef7179829233369bd Author: Ralph Boehme r...@sernet.de Date: Thu Jul 31 13:49:49 2014 +0200 s3-mdssvc: add new option 'spotlight' Per share option: it reflects whether a share is indexed by Tracker or not. The global switch that controls whether Spotlight is enabled or not, are the mdsvc RPC switches. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 63dd793cde70a3d3a5bf4144c316b764d687546b Author: Ralph Boehme r...@sernet.de Date: Wed Jul 23 09:58:45 2014 +0200 s3-mdssvc: add Spotlight RPC stubs 'mdssvc' aka 'Metadata Search Service' is an RPC service used by Apple for passing marshalled Spotlight search queries and results between client to server. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ba4c9bd script/autobuild.py: make sure --nonshared-binary=smbtorture,smbd/smbd keeps working via 86fa1d9 script/autobuild.py: test some --with-{static,shared}-modules combinations via 3b1aa7a script/autobuild.py: use -Wmissing-prototypes and --picky-developer for samba-libs* via 3030325 script/autobuild.py: split out a samba_libs_configure variable via 43d1c92 s3:wscript: make --with-{static,shared}-modules options more flexible via d830cec s3:wscript: simplify ABI matching for pdb_*_init() via bbd82b0 s3:winbindd/idmap_*: make function prototypes available via static_decl_idmap; via 7b2ff4c s3:modules/perfcount_*: make function prototypes available via static_decl_perfcount; via 37b2677 s3:modules/vfs_*: make function prototypes available via static_decl_vfs; via fd6eb8b examples/VFS: make function prototypes available via static_decl_vfs; via 4451d0a examples/pdb: fix and validate pdb_test_init() prototype via static_decl_pdb; via f8fca7d s4:ntvfs/posix: fix forward declaration of struct pvfs_state via 72e0885 s3:wscript: remove leftover from vfs_notify_fam via a184951 s3:idmap: we need to allow undefined symbols in idmap_tdb via 5134d29 s3:wscript: fix the build without any idmap module from 345ef6b smbd: Remove an unnecessary else branch https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ba4c9bd08c09e77df5f653dc7c39be9e2908cfc0 Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 10:32:46 2015 +0200 script/autobuild.py: make sure --nonshared-binary=smbtorture,smbd/smbd keeps working - It's very useful to have a static smbtorture binary that can be copied arround. - It's sometimes also useful to have a static smbd binary in order avoid runtime overhead via do_lookup_x() (in ld*.so), note that Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Aug 20 19:10:19 CEST 2015 on sn-devel-104 commit 86fa1d9059f90bc62c64adeb25b9534517b9a960 Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 17:38:43 2015 +0200 script/autobuild.py: test some --with-{static,shared}-modules combinations Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 3b1aa7a665215f6a95a2ee7c5caf361a4063e9c1 Author: Stefan Metzmacher me...@samba.org Date: Fri Aug 14 08:40:37 2015 +0200 script/autobuild.py: use -Wmissing-prototypes and --picky-developer for samba-libs* Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 303032559d7b68d125642ea25a1ad68df3de8d6d Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 17:34:42 2015 +0200 script/autobuild.py: split out a samba_libs_configure variable The avoids too long lines. Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 43d1c92e6202b27db7f8b8820c55bffb2c486d4b Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 14:22:45 2015 +0200 s3:wscript: make --with-{static,shared}-modules options more flexible '!module' disables a non-required module for a static/shared build. '!DEFAULT' disables all modules defaulting to a static/shared build. '!FORCED' disables all (non-required) modules forced to a static/shared build. 'ALL' switches the default for all non forced modules from static to shared or from shared to static. The most specific specification wins e.g. --with-static-modules='!FORCED,!DEFAULT' --with-shared-modules='!FORCED,!DEFAULT' will only build modules which are required for the compilation. Might be useful if someone only wants to use client utils. --with-static-modules=ALL will build all modules statically linked. --with-static-modules='!DEFAULT,ALL' --with-shared-modules='!DEFAULT,ALL' might be useful for testing, it reverses the default build for all modules which can be build shared or static. Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit d830cecd03697c68bdcc5f8eaf325abb7f0c425e Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 18:57:19 2015 +0200 s3:wscript: simplify ABI matching for pdb_*_init() The init functions of all static modules should be ignored. Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit bbd82b0fee4cc4b8491ce30550b9ae8539116e3c Author: Stefan Metzmacher me...@samba.org Date: Thu Aug 13 18:16:20 2015 +0200 s3:winbindd/idmap_*: make function prototypes available via
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 62d08ea replace: Fix bug 11455 via 9638742 ctdb: Fix some clang uninitialized errors via 1d79f6c ctdb: Fix the build on FreeBSD 10.1 from e8c602d s4:torture/rpc: fix ndr_security.h include in fsrvp.c https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 62d08ea715d1664a7600250abbd1dc83f3a33a4c Author: Volker Lendecke v...@samba.org Date: Tue Aug 18 20:57:27 2015 +0200 replace: Fix bug 11455 Don't call rep_strtoull recursively Bug: https://bugzilla.samba.org/show_bug.cgi?id=11455 Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Wed Aug 19 11:22:38 CEST 2015 on sn-devel-104 commit 963874279997b98c8b29bee6d2417f81a0e8b0d2 Author: Volker Lendecke v...@samba.org Date: Wed Aug 19 07:35:32 2015 +0200 ctdb: Fix some clang uninitialized errors Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 1d79f6c9e5423202d5275727e1ddc60acce65b4c Author: Volker Lendecke v...@samba.org Date: Wed Aug 19 07:33:48 2015 +0200 ctdb: Fix the build on FreeBSD 10.1 We get sockaddr_in directly in parse_ipv4 Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: ctdb/common/system_util.c | 2 +- ctdb/tools/ctdb.c | 8 lib/replace/replace.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c index 1ae0bae..663df6e 100644 --- a/ctdb/common/system_util.c +++ b/ctdb/common/system_util.c @@ -157,7 +157,7 @@ bool parse_ipv4(const char *s, unsigned port, struct sockaddr_in *sin) } #ifdef HAVE_SOCK_SIN_LEN - sin-ip.sin_len = sizeof(*sin); + sin-sin_len = sizeof(*sin); #endif return true; } diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index c6da621..1081eec 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4914,7 +4914,7 @@ static int control_getreclock(struct ctdb_context *ctdb, int argc, const char ** static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **argv) { int ret; - const char *reclock; + const char *reclock = NULL; if (argc == 0) { reclock = NULL; @@ -4938,7 +4938,7 @@ static int control_setreclock(struct ctdb_context *ctdb, int argc, const char ** static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char **argv) { int ret; - uint32_t natgwstate; + uint32_t natgwstate = 0; if (argc == 0) { usage(); @@ -4967,7 +4967,7 @@ static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const char **argv) { int ret; - uint32_t lmasterrole; + uint32_t lmasterrole = 0; if (argc == 0) { usage(); @@ -4996,7 +4996,7 @@ static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const cha static int control_setrecmasterrole(struct ctdb_context *ctdb, int argc, const char **argv) { int ret; - uint32_t recmasterrole; + uint32_t recmasterrole = 0; if (argc == 0) { usage(); diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 0806ce3..798990a 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -538,6 +538,7 @@ long long int rep_strtoll(const char *str, char **endptr, int base) } #else #ifdef HAVE_BSD_STRTOLL +#undef strtoll long long int rep_strtoll(const char *str, char **endptr, int base) { long long int nb = strtoll(str, endptr, base); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e8c602d s4:torture/rpc: fix ndr_security.h include in fsrvp.c via b2986dc release-scripts/build-manpages-nogit: run make realdistclean at the end via bd0ec51 s3:smb2_negprot: prefer AES128_CCM if the client supports it via 05dbd3b libcli/smb: prefer AES128_CCM via dc2d5cc Revert ldb-samba: Implement transitive extended matching via 8cacd5b Revert dsdb: Only parse SAMBA_LDAP_MATCH_RULE_TRANSITIVE_EVAL as a DN via ce3c77f s3:lib: fix some corner cases of open_socket_out_cleanup() from c93e2cd waf: Check for Linux has 32-bit credential calls https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e8c602dfa2f08a9ea43c84a7e7ae9fe17e007d60 Author: Stefan Metzmacher me...@samba.org Date: Wed Aug 12 09:24:42 2015 +0200 s4:torture/rpc: fix ndr_security.h include in fsrvp.c We should not include ndr_security.c This allows ./configure --nonshared-binary=smbtorture again. Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Mon Aug 17 20:53:10 CEST 2015 on sn-devel-104 commit b2986dcb1dca6b3c46beb8c003aede18874c813c Author: Stefan Metzmacher me...@samba.org Date: Sat Aug 15 10:59:45 2015 +0200 release-scripts/build-manpages-nogit: run make realdistclean at the end Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit bd0ec51cfca2b3baed60d304125079c74815073a Author: Stefan Metzmacher me...@samba.org Date: Mon Aug 17 08:56:43 2015 +0200 s3:smb2_negprot: prefer AES128_CCM if the client supports it Callgrind showed that we use 28,165,720,719 cpu cycles to send a 100MB file to a client using aes-ccm. With aes-gcm this is raises up to 723,094,413,831 cpu cycles. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11451 Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 05dbd3b47a728acada971b545df458ae0e082ec5 Author: Stefan Metzmacher me...@samba.org Date: Mon Aug 17 08:56:43 2015 +0200 libcli/smb: prefer AES128_CCM Callgrind showed that we use 28,165,720,719 cpu cycles to send a 100MB file to a client using aes-ccm. With aes-gcm this is raises up to 723,094,413,831 cpu cycles. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11451 Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit dc2d5ccd56ff8c59f3686a652ec3082069914bb4 Author: Andrew Bartlett abart...@samba.org Date: Mon Aug 17 16:03:10 2015 +1200 Revert ldb-samba: Implement transitive extended matching This reverts commit 2a22ba34cd6f28950246b54c6577c922c61f4fdb. selftest/knownfail entries are added to ensure 'make test' continues to pass BUG: https://bugzilla.samba.org/show_bug.cgi?id=10493 Signed-off-by: Andrew Bartlett abart...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 8cacd5b8113fa30fb4ccaaf3193839660feb285f Author: Andrew Bartlett abart...@samba.org Date: Mon Aug 17 16:09:35 2015 +1200 Revert dsdb: Only parse SAMBA_LDAP_MATCH_RULE_TRANSITIVE_EVAL as a DN This reverts commit 1a012d591bca727b5cabacf6455d2009afb16bd7. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10493 Signed-off-by: Andrew Bartlett abart...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit ce3c77fb45ccf4d45a0fa655325e30e748d89245 Author: Stefan Metzmacher me...@samba.org Date: Fri Aug 14 12:54:00 2015 +0200 s3:lib: fix some corner cases of open_socket_out_cleanup() In case of timeouts we retry the async_connect_send() and forgot to remember it, this results in an abort() in async_connect_cleanup() as the fd is already closed when calling fcntl(F_SETFL). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher me...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Volker Lendecke v...@samba.org --- Summary of changes: lib/ldb-samba/ldb_matching_rules.c | 338 lib/ldb-samba/ldb_matching_rules.h | 28 -- lib/ldb-samba/ldif_handlers.c | 6 - lib/ldb-samba/wscript_build | 2 +- libcli/smb/smbXcli_base.c | 8 +- release-scripts/build-manpages-nogit| 4 + selftest/knownfail | 13 + source3/lib/util_sock.c | 3 + source3/smbd/smb2_negprot.c | 18 +- source4/dsdb/samdb/ldb_modules/extended_dn_in.c | 4 +- source4
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 95eb6db s3-net: use talloc array in share allowedusers from 9c48dbd dns_server: Fix CNAME handling https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 95eb6db580678a29b1f5f30a9567ea449a43d75a Author: Ralph Boehme s...@samba.org Date: Tue Aug 4 11:18:34 2015 +0200 s3-net: use talloc array in share allowedusers Bug: https://bugzilla.samba.org/show_bug.cgi?id=11426 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Aug 4 16:48:36 CEST 2015 on sn-devel-104 --- Summary of changes: source3/utils/net_rpc.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 6eb27c9..1de08c4 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -4522,10 +4522,25 @@ static struct full_alias *server_aliases; /* * Add an alias to the static list. */ -static void push_alias(TALLOC_CTX *mem_ctx, struct full_alias *alias) +static void push_alias(struct full_alias *alias) { - if (server_aliases == NULL) - server_aliases = SMB_MALLOC_ARRAY(struct full_alias, 100); + size_t array_size; + + if (server_aliases == NULL) { + server_aliases = talloc_array(NULL, struct full_alias, 100); + if (server_aliases == NULL) { + smb_panic(talloc_array failed); + } + } + + array_size = talloc_array_length(server_aliases); + if (array_size == num_server_aliases) { + server_aliases = talloc_realloc(NULL, server_aliases, + struct full_alias, array_size + 100); + if (server_aliases == NULL) { + smb_panic(talloc_realloc failed); + } + } server_aliases[num_server_aliases] = *alias; num_server_aliases += 1; @@ -4634,7 +4649,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd, sid_compose(alias.sid, domain_sid, groups-entries[i].idx); - push_alias(mem_ctx, alias); + push_alias(alias); } } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); @@ -5264,6 +5279,7 @@ static NTSTATUS rpc_share_allowedusers_internals(struct net_context *c, free_user_token(tokens[i].token); } SAFE_FREE(tokens); + TALLOC_FREE(server_aliases); return nt_status; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1fcad53 dns_server: Fix a small memleak via 9386368 dns_server: Don't call tevent_req_finish twice via 7258061 s4:torture:vfs_fruit: add a test for stream names via fe4909f s4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr() via 1db1199 vfs_catia: run translation on stream names via fb9a64e vfs_streams_xattr: stream names may contain colons from eba1212 ctdb-tests: Add a policy routing test with misconfiguration https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1fcad53d7ca1be619bbc9572100b38886114dee7 Author: Volker Lendecke v...@samba.org Date: Fri Aug 7 08:29:17 2015 +0200 dns_server: Fix a small memleak Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Aug 7 12:57:02 CEST 2015 on sn-devel-104 commit 938636886c0bb2c0cc66976c4c6dc763d589335c Author: Volker Lendecke v...@samba.org Date: Fri Aug 7 07:58:20 2015 +0200 dns_server: Don't call tevent_req_finish twice Both tevent_req_werror and tevent_req_done call tevent_req_finish on a request. This should not be done. We should only call either of both. Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 7258061e5e9cd4b68f1c010c3667c3fd2b0663cc Author: Ralph Boehme s...@samba.org Date: Sun May 10 11:58:32 2015 +0200 s4:torture:vfs_fruit: add a test for stream names Bug: https://bugzilla.samba.org/show_bug.cgi?id=11278 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit fe4909f1cab72f80715a996a63290462102aabc6 Author: Ralph Boehme s...@samba.org Date: Thu Aug 6 13:48:54 2015 +0200 s4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr() Bug: https://bugzilla.samba.org/show_bug.cgi?id=11278 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit 1db11998bf1b0eef5f543377700b03ab8739338d Author: Ralph Boehme s...@samba.org Date: Sat May 9 15:12:41 2015 +0200 vfs_catia: run translation on stream names With vfs_fruit option fruit:encoding = native we're already converting stream names that contain illegal NTFS characters from their on-the-wire Unicode Private Range encoding to their native ASCII representation. Unfortunately the reverse mapping for stream names was not perfomed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11278 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org commit fb9a64ea37dd4b0cd754fe6d421417a4c8ccbc57 Author: Ralph Boehme s...@samba.org Date: Sat May 9 15:02:03 2015 +0200 vfs_streams_xattr: stream names may contain colons With vfs_fruit option fruit:encoding = native we're already converting stream names that contain illegal NTFS characters from their on-the-wire Unicode Private Range encoding to their native ASCII representation. As as result the name of xattrs storing the streams (via vfs_streams_xattr) may contain a colon, so we have to use strrchr_m() instead of strchr_m() for matching the stream type suffix. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11278 Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org --- Summary of changes: selftest/target/Samba3.pm | 3 +- selftest/target/Samba4.pm | 3 +- source3/modules/vfs_catia.c | 58 ++- source3/modules/vfs_streams_xattr.c | 16 +++- source4/dns_server/dns_query.c | 11 ++- source4/torture/vfs/fruit.c | 143 +++- 6 files changed, 223 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 7ceb4fa..4638b16 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1466,7 +1466,8 @@ sub provision() [vfs_fruit] path = $shrdir - vfs objects = catia fruit streams_xattr + vfs objects = catia fruit streams_xattr acl_xattr + ea support = yes fruit:ressource = file fruit:metadata = netatalk fruit:locking = netatalk diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 8e7ac94..16d4b28 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1070,7 +1070,8 @@ sub provision($$) [vfs_fruit] path = $ctx-{share} - vfs objects = catia fruit streams_xattr + vfs objects = catia fruit streams_xattr acl_xattr + ea support
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5f8bad2 tdb_wrap: Use a struct initializer via 28e4616 tdb_wrap: Use talloc_pooled_object from 00ec3c4 ctdb-daemon: Correctly process the exit code from failed eventscripts https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5f8bad2fe7bf2887ef04a73f109b59b6aa0ddb53 Author: Volker Lendecke v...@samba.org Date: Sun Jul 12 12:45:33 2015 +0200 tdb_wrap: Use a struct initializer ... this saves 3 lines a few bytes .text :-) Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Jul 23 14:39:18 CEST 2015 on sn-devel-104 commit 28e4616e2094e9f3866547481b68e198892a409b Author: Volker Lendecke v...@samba.org Date: Sun Jul 12 12:37:43 2015 +0200 tdb_wrap: Use talloc_pooled_object One malloc() less Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: lib/tdb_wrap/tdb_wrap.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb_wrap/tdb_wrap.c b/lib/tdb_wrap/tdb_wrap.c index a1bddf3..864656f 100644 --- a/lib/tdb_wrap/tdb_wrap.c +++ b/lib/tdb_wrap/tdb_wrap.c @@ -90,19 +90,15 @@ static struct tdb_wrap_private *tdb_wrap_private_open(TALLOC_CTX *mem_ctx, mode_t mode) { struct tdb_wrap_private *result; - struct tdb_logging_context lctx; + struct tdb_logging_context lctx = { .log_fn = tdb_wrap_log }; - result = talloc(mem_ctx, struct tdb_wrap_private); + result = talloc_pooled_object(mem_ctx, struct tdb_wrap_private, + 1, strlen(name)+1); if (result == NULL) { return NULL; } + /* Doesn't fail, see talloc_pooled_object */ result-name = talloc_strdup(result, name); - if (result-name == NULL) { - goto fail; - } - - lctx.log_fn = tdb_wrap_log; - lctx.log_private = NULL; result-tdb = tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, lctx, NULL); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5147ff5 s3: tests: Add blackbox test for scopy. via eeddeba docs: Document new scopy command. via cebcf0e s3:client: Add scopy cmd to perform Server Side copy using smbclient. from 1023db2 ctdb-daemon: Return correct sequence number for CONTROL_GET_DB_SEQNUM https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5147ff54e3c5f9e35ae32bf880b01b1e9cc8e08d Author: Jeremy Allison j...@samba.org Date: Mon Jul 13 14:15:45 2015 -0700 s3: tests: Add blackbox test for scopy. Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Jul 14 16:10:44 CEST 2015 on sn-devel-104 commit eeddeba8b5201b837ddf5005f693cd7f9fb962f2 Author: Jeremy Allison j...@samba.org Date: Fri Jul 10 10:29:01 2015 -0700 docs: Document new scopy command. Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit cebcf0e4dad42b5ede11681f57c19e2384655218 Author: Anubhav Rakshit anubhav.raks...@gmail.com Date: Thu Jun 25 11:37:18 2015 +0530 s3:client: Add scopy cmd to perform Server Side copy using smbclient. Signed-off-by: Anubhav Rakshit anubhav.raks...@gmail.com Reviewed-by: Jeremy Allison j...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: docs-xml/manpages/smbclient.1.xml | 8 ++ source3/client/client.c | 134 ++ source3/script/tests/test_smbclient_s3.sh | 79 ++ 3 files changed, 221 insertions(+) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/smbclient.1.xml b/docs-xml/manpages/smbclient.1.xml index 8b166d1..e1d805a 100644 --- a/docs-xml/manpages/smbclient.1.xml +++ b/docs-xml/manpages/smbclient.1.xml @@ -1011,6 +1011,14 @@ /varlistentry varlistentry + termscopy lt;source filenamegt; lt;destination filenamegt;/term + listitemparaAttempt to copy a file on the server using the + most efficient server-side copy calls. Falls back to using + read then write if server doesn't support server-side copy. + /para/listitem + /varlistentry + + varlistentry termsetmode lt;filenamegt; lt;perm=[+|\-]rshagt;/term listitemparaA version of the DOS attrib command to set file permissions. For example: /para diff --git a/source3/client/client.c b/source3/client/client.c index fde5b49..f49f3ff 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3806,6 +3806,139 @@ static int cmd_rename(void) return 0; } +struct scopy_timing { + struct timespec tp_start; +}; + +static int scopy_status(off_t written, void *priv) +{ + struct timespec tp_end; + unsigned int scopy_total_time_ms; + struct scopy_timing *st = priv; + + clock_gettime_mono(tp_end); + scopy_total_time_ms = nsec_time_diff(tp_end,st-tp_start)/100; + + DEBUG(5,(Copied %jd bytes at an average %3.1f kb/s\n, +(intmax_t)written, written / (1.024*scopy_total_time_ms))); + + return true; +} + +/ + Server-Side copy some file. +/ + +static int cmd_scopy(void) +{ + TALLOC_CTX *ctx = talloc_tos(); + char *src, *dest; + char *buf, *buf2; + struct cli_state *targetcli; + char *targetsrc; + char *targetdest; + uint32_t DesiredAccess, ShareAccess, CreateDisposition, CreateOptions; + struct smb_create_returns cr; + uint16_t destfnum = (uint16_t)-1; + uint16_t srcfnum = (uint16_t)-1; + off_t written = 0; + struct scopy_timing st; + int rc = 0; + NTSTATUS status; + + if (!next_token_talloc(ctx, cmd_ptr,buf,NULL) || + !next_token_talloc(ctx, cmd_ptr,buf2,NULL)) { + d_printf(scopy src dest\n); + return 1; + } + + src = talloc_asprintf(ctx, + %s%s, + client_get_cur_dir(), + buf); + if (!src) { + return 1; + } + + dest = talloc_asprintf(ctx, + %s%s, + client_get_cur_dir(), + buf2); + if (!dest) { + return 1; + } + + status = cli_resolve_path(ctx, , auth_info, cli, src, targetcli, + targetsrc); + if (!NT_STATUS_IS_OK(status)) { + d_printf(scopy %s: %s\n, src
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f58ecfd s3:smbd: change a loglevel from 0 to 1 when SMB_VFS_CONNECT fails via 5b3ed90 vfs_shadow_copy2: change log level from 0 to 1 and log share path from 2c1c567 winbindd: shorten client list scan https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f58ecfdbfc70ea76ca330e9fc551df0d22b6baa4 Author: Ralph Boehme s...@samba.org Date: Thu Jun 25 18:44:44 2015 +0200 s3:smbd: change a loglevel from 0 to 1 when SMB_VFS_CONNECT fails Logging at level 0 may result in log flooding. Additionally log the share name that failed in SMB_VFS_CONNECT. Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Volker Lendecke v...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Thu Jul 16 20:24:47 CEST 2015 on sn-devel-104 commit 5b3ed904ca6689801dacc79ba6983ef3a41a14f6 Author: Ralph Boehme s...@samba.org Date: Thu Jun 25 18:43:50 2015 +0200 vfs_shadow_copy2: change log level from 0 to 1 and log share path Signed-off-by: Ralph Boehme s...@samba.org Reviewed-by: Volker Lendecke v...@samba.org --- Summary of changes: source3/modules/vfs_shadow_copy2.c | 5 +++-- source3/smbd/service.c | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index e522686..4d2ec54 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1875,8 +1875,9 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle, config-mount_point = shadow_copy2_find_mount_point(config, handle); if (config-mount_point == NULL) { - DEBUG(0, (__location__ : shadow_copy2_find_mount_point - failed: %s\n, strerror(errno))); + DBG_WARNING(shadow_copy2_find_mount_point + of the share root '%s' failed: %s\n, + handle-conn-connectpath, strerror(errno)); return -1; } } diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 0544967..ba8946d 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -669,7 +669,9 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, if (SMB_VFS_CONNECT(conn, lp_servicename(talloc_tos(), snum), conn-session_info-unix_info-unix_name) 0) { - DEBUG(0,(make_connection: VFS make connection failed!\n)); + DBG_WARNING(SMB_VFS_CONNECT for service '%s' at '%s' failed: %s\n, + lp_servicename(talloc_tos(), snum), conn-connectpath, + strerror(errno)); status = NT_STATUS_UNSUCCESSFUL; goto err_root_exit; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 64a88f7 dbwrap_rbt: Make key and value aligned to 16 byte from d878772 doc: Fix documentation for ctdb timeout parameter https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 64a88f74ca5309dce1d3ec0755ceba4af5144dbd Author: Volker Lendecke v...@samba.org Date: Sat Jul 18 21:50:55 2015 +0200 dbwrap_rbt: Make key and value aligned to 16 byte Reported by Uri Simchoni urisimch...@gmail.com. Thanks! Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Mon Jul 20 23:18:23 CEST 2015 on sn-devel-104 --- Summary of changes: lib/dbwrap/dbwrap_rbt.c | 51 + 1 file changed, 39 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c index 3f97086..03f2f57 100644 --- a/lib/dbwrap/dbwrap_rbt.c +++ b/lib/dbwrap/dbwrap_rbt.c @@ -38,13 +38,6 @@ struct db_rbt_rec { struct db_rbt_node { struct rb_node rb_node; size_t keysize, valuesize; - - /* -* key and value are appended implicitly, data is only here as a -* target for offsetof() -*/ - - char data[1]; }; /* @@ -83,12 +76,43 @@ static int db_rbt_compare(TDB_DATA a, TDB_DATA b) static void db_rbt_parse_node(struct db_rbt_node *node, TDB_DATA *key, TDB_DATA *value) { - key-dptr = ((uint8_t *)node) + offsetof(struct db_rbt_node, data); + size_t key_offset, value_offset; + + key_offset = DBWRAP_RBT_ALIGN(sizeof(struct db_rbt_node)); + key-dptr = ((uint8_t *)node) + key_offset; key-dsize = node-keysize; - value-dptr = key-dptr + node-keysize; + + value_offset = DBWRAP_RBT_ALIGN(node-keysize); + value-dptr = key-dptr + value_offset; value-dsize = node-valuesize; } +static ssize_t db_rbt_reclen(size_t keylen, size_t valuelen) +{ + size_t len, tmp; + + len = DBWRAP_RBT_ALIGN(sizeof(struct db_rbt_node)); + + tmp = DBWRAP_RBT_ALIGN(keylen); + if (tmp keylen) { + goto overflow; + } + + len += tmp; + if (len tmp) { + goto overflow; + } + + len += valuelen; + if (len valuelen) { + goto overflow; + } + + return len; +overflow: + return -1; +} + static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag) { struct db_rbt_ctx *db_ctx = talloc_get_type_abort( @@ -99,6 +123,7 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag) struct rb_node ** p; struct rb_node * parent; + ssize_t reclen; TDB_DATA this_key, this_val; if (rec_priv-node != NULL) { @@ -123,10 +148,12 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag) } } - node = (struct db_rbt_node *)talloc_size(db_ctx, - offsetof(struct db_rbt_node, data) + rec-key.dsize - + data.dsize); + reclen = db_rbt_reclen(rec-key.dsize, data.dsize); + if (reclen == -1) { + return NT_STATUS_INSUFFICIENT_RESOURCES; + } + node = talloc_size(db_ctx, reclen); if (node == NULL) { return NT_STATUS_NO_MEMORY; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7cf4553 selftest: Fix memset parameters in test for async_connect_send() from f99d0b9 script/release.sh: make it possible to create stable .x releases (x >= 1) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7cf45539da9cba25130457941814da12d0a828c3 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Oct 21 10:37:25 2015 +1300 selftest: Fix memset parameters in test for async_connect_send() This fixes: ../lib/async_req/async_connect_send_test.c: In function ‘main’: ../lib/async_req/async_connect_send_test.c:88:3: error: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Werror=memset-transposed-args] memset(, sizeof(addr), 0); ^ Bug: https://bugzilla.samba.org/show_bug.cgi?id=11564 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Oct 21 17:31:00 CEST 2015 on sn-devel-104 --- Summary of changes: lib/async_req/async_connect_send_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/async_connect_send_test.c b/lib/async_req/async_connect_send_test.c index e612056..34ea6b7 100644 --- a/lib/async_req/async_connect_send_test.c +++ b/lib/async_req/async_connect_send_test.c @@ -85,7 +85,7 @@ int main(int argc, const char *argv[]) return 1; } - memset(, sizeof(addr), 0); + memset(, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr("127.0.0.1"); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c466ad4 texpect: undefined symbol rep_fprintf from d4059e1 auth: gensec: Parameters out_mem_ctx and ev are passed in the wrong order to gensec_spnego_server_try_fallback(). https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c466ad47d53b1f3fbfc582a89f4b90a2c5dee2e9 Author: Tom Schulz <sch...@adi.com> Date: Thu Oct 22 11:12:01 2015 +0200 texpect: undefined symbol rep_fprintf Add libreplace dependency to texpect, fixes a linking error on Solaris. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11511 Signed-off-by: Tom Schulz <sch...@adi.com> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Oct 22 14:28:17 CEST 2015 on sn-devel-104 --- Summary of changes: lib/texpect/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/texpect/wscript b/lib/texpect/wscript index 62a1d4d..e14c048 100644 --- a/lib/texpect/wscript +++ b/lib/texpect/wscript @@ -4,4 +4,4 @@ def configure(conf): conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h') def build(bld): -bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util', install=False) +bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util replace', install=False) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8807ad1 dynconfig: Fix deps, no talloc required via b5cf80a talloc: Fix the O3 developer build from 2f7bee4 wbinfo: make --verbose --pam-logon print sids https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8807ad18c2cc1a0cdc4f47c294d44123d2a53ec8 Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 12 12:17:56 2015 +0200 dynconfig: Fix deps, no talloc required Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Oct 12 17:06:04 CEST 2015 on sn-devel-104 commit b5cf80a7b58095fd711968ef03f84740d0119553 Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 12 12:06:50 2015 +0200 talloc: Fix the O3 developer build Compilers can't see that the child exits. Thus "exit_status" is used uninitialized in the child. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: dynconfig/wscript | 2 +- lib/talloc/testsuite.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/dynconfig/wscript b/dynconfig/wscript index 6410c38..606fbad 100755 --- a/dynconfig/wscript +++ b/dynconfig/wscript @@ -412,7 +412,7 @@ def build(bld): version_header = 'version.h' bld.SAMBA_SUBSYSTEM('DYNCONFIG', 'dynconfig.c', -deps='replace talloc', +deps='replace', public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir), header_path='samba', cflags=cflags) diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c index 9f83039..34410b8 100644 --- a/lib/talloc/testsuite.c +++ b/lib/talloc/testsuite.c @@ -1895,10 +1895,13 @@ static bool test_magic_protection(void) /* Then the attack takes effect when the memory's freed. */ talloc_free(pool); - } else { - while (wait(_status) != pid); + + /* Never reached. Make compilers happy */ + return true; } + while (wait(_status) != pid); + if (!WIFEXITED(exit_status)) { printf("Child exited through unexpected abnormal means\n"); return false; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8fec359 vfs_fruit: Fix CID 1311244 Out-of-bounds read from bba1771 Treat uid_t, git_t as 64 bit in Pidl Python bindings https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8fec35994c8b880c681f14291194763759e1c24d Author: Volker Lendecke v...@samba.org Date: Tue Jul 7 09:04:22 2015 +0200 vfs_fruit: Fix CID 1311244 Out-of-bounds read We should not call memcpy if the offset is exactly AFP_INFO_SIZE Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Tue Jul 7 14:04:39 CEST 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_fruit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index d05d786..e29440b 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2624,7 +2624,7 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, char afpinfo_buf[AFP_INFO_SIZE]; size_t to_return; - if ((offset 0) || (offset AFP_INFO_SIZE)) { + if ((offset 0) || (offset = AFP_INFO_SIZE)) { len = 0; rc = 0; goto exit; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fdea2fe rpc_server: Fix CID 1311342 Null pointer dereferences (REVERSE_INULL) via fc37211 rpc_server: Fix CID 1311341 Integer handling issues (OVERFLOW_BEFORE_WIDEN) via 3387969 rpc_server: Fix CID 1311340 Null pointer dereferences (NULL_RETURNS) via a7c2155 rpc_server: Fix CID 1311339 Error handling issues (CHECKED_RETURN) via 94288f1 smbd: Fix CID 1311338 Error handling issues (CHECKED_RETURN) via 080e654 smbd: Fix CID 1311337 Error handling issues (CHECKED_RETURN) via ea55b13 dalloc: Fix CID 1097369 API usage errors (VARARGS) via 784b6a7 dalloc: Fix a typo from 540899a dosmode: Change message of result to informational https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fdea2febeea41aec74c32b94b4ff4cbb8f868751 Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:30:07 2015 +0200 rpc_server: Fix CID 1311342 Null pointer dereferences (REVERSE_INULL) elem was dereferenced already a few lines above Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org Autobuild-User(master): Ralph Böhme s...@samba.org Autobuild-Date(master): Fri Jul 10 01:01:36 CEST 2015 on sn-devel-104 commit fc372110c20c7a3e64684432a342c519aa92e0fc Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:27:41 2015 +0200 rpc_server: Fix CID 1311341 Integer handling issues (OVERFLOW_BEFORE_WIDEN) Quoting the full message: Potentially overflowing expression total_octets * 8U with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type uint64_t (64 bits, unsigned). Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 3387969a1f0a7411b6c490f330a171c09cb8e179 Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:24:18 2015 +0200 rpc_server: Fix CID 1311340 Null pointer dereferences (NULL_RETURNS) In practice this might not be relevant, but better be safe. Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit a7c215548ae55f8b37b6181bb1271a837a4078ce Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:22:59 2015 +0200 rpc_server: Fix CID 1311339 Error handling issues (CHECKED_RETURN) Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 94288f153d4ae5b0f8f8a2d0d2d2870ffed9 Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:20:46 2015 +0200 smbd: Fix CID 1311338 Error handling issues (CHECKED_RETURN) Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 080e654ca59feafaa65c4c66c15a99a5f2b16556 Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:17:54 2015 +0200 smbd: Fix CID 1311337 Error handling issues (CHECKED_RETURN) Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit ea55b1350b9268e6a3a3569d65e75fb9c79d739a Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:16:00 2015 +0200 dalloc: Fix CID 1097369 API usage errors (VARARGS) Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org commit 784b6a79b870296b9ded882afe74e92a01687318 Author: Volker Lendecke v...@samba.org Date: Thu Jul 9 19:12:09 2015 +0200 dalloc: Fix a typo Signed-off-by: Volker Lendecke v...@samba.org Reviewed-by: Ralph Boehme s...@samba.org --- Summary of changes: source3/rpc_server/mdssvc/dalloc.c | 4 +++- source3/rpc_server/mdssvc/dalloc.h | 2 +- source3/rpc_server/mdssvc/marshalling.c | 4 ++-- source3/rpc_server/mdssvc/mdssvc.c | 12 source3/smbd/scavenger.c| 7 ++- source3/smbd/server.c | 3 +-- 6 files changed, 21 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/mdssvc/dalloc.c b/source3/rpc_server/mdssvc/dalloc.c index 7a4a86c..28944b8 100644 --- a/source3/rpc_server/mdssvc/dalloc.c +++ b/source3/rpc_server/mdssvc/dalloc.c @@ -171,6 +171,7 @@ void *dalloc_value_for_key(const DALLOC_CTX *d, ...) array_len = talloc_array_length(d-dd_talloc_array); elem = va_arg(args, int); if (elem = array_len) { + va_end(args); result = -1; goto done; } @@ -178,6 +179,8 @@ void *dalloc_value_for_key(const DALLOC_CTX *d, ...) type = va_arg(args, const char *); } + va_end(args); + array_len = talloc_array_length(d-dd_talloc_array
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f9ceaf4 s3: smbd: Fix NULL pointer bug introduced by previous 'raw' stream fix (bug #11522). via bec685f s3: smbd: fix a crash in unix_convert() from 00954a9 lib: We can do ACCRIGHTS style fdpassing https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f9ceaf443991e0bb5db23eeced2841436f47359e Author: Jeremy Allison <j...@samba.org> Date: Wed Sep 30 17:12:11 2015 -0700 s3: smbd: Fix NULL pointer bug introduced by previous 'raw' stream fix (bug #11522). Ensure dirpath can never be NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11535 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Oct 1 08:58:36 CEST 2015 on sn-devel-104 commit bec685fb13e7cbe3bb98e5647183720d31f1c522 Author: Ralph Boehme <s...@samba.org> Date: Fri Sep 25 21:06:57 2015 +0200 s3: smbd: fix a crash in unix_convert() Some error code paths may result in dirpath being NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11535 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> --- Summary of changes: source3/smbd/filename.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 3ed60e2..555658d 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -388,6 +388,12 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, status = map_nt_error_from_unix(errno); goto err; } + /* dirpath must exist. */ + dirpath = talloc_strdup(ctx,""); + if (dirpath == NULL) { + status = NT_STATUS_NO_MEMORY; + goto err; + } DEBUG(5, ("conversion finished %s -> %s\n", orig_path, smb_fname->base_name)); @@ -1013,7 +1019,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, return NT_STATUS_OK; fail: DEBUG(10, ("dirpath = [%s] start = [%s]\n", dirpath, start)); - if (*dirpath != '\0') { + if (dirpath && *dirpath != '\0') { smb_fname->base_name = talloc_asprintf(smb_fname, "%s/%s", dirpath, start); } else { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6ce3643 s3: tests: smbclient test to ensure we can create and see a :foobar stream on the top level directory in a share. via 74fd4f9 s3: smbd: Fix opening/creating :stream files on the root share directory. via 94e7e70 s3: smbd: Remove unused parameter from build_stream_path(). via a47012d s3: smbclient: Move cmd_setmode out of clitar.c and back into client.c from ea53e86 tdb: Add tdbdump -u https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6ce3643e45bac6660ae69123738c4b39d7bc1864 Author: Jeremy Allison <j...@samba.org> Date: Wed Sep 16 16:12:15 2015 -0700 s3: tests: smbclient test to ensure we can create and see a :foobar stream on the top level directory in a share. Regression test for: BUG: https://bugzilla.samba.org/show_bug.cgi?id=11522 Remember to remove the ARCHIVE attribute from the toplevel share when done (can only be done over SMB2+). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Sep 18 11:00:44 CEST 2015 on sn-devel-104 commit 74fd4f93efe92516fc507edf71a588660782879e Author: Jeremy Allison <j...@samba.org> Date: Wed Sep 16 12:03:34 2015 -0700 s3: smbd: Fix opening/creating :stream files on the root share directory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11522 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 94e7e707783036b57babc73d320d2a3d8c0648d6 Author: Jeremy Allison <j...@samba.org> Date: Wed Sep 16 12:42:46 2015 -0700 s3: smbd: Remove unused parameter from build_stream_path(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit a47012d5429044c9a3616718bac21360f281aa81 Author: Jeremy Allison <j...@samba.org> Date: Thu Sep 17 15:54:40 2015 -0700 s3: smbclient: Move cmd_setmode out of clitar.c and back into client.c setmode attribute is a valid smbclient command even if libarchive isn't on the system and tarmode isn't compiled in. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/client/client.c | 118 +++ source3/client/client_proto.h | 6 ++ source3/client/clitar.c | 129 -- source3/script/tests/test_smbclient_s3.sh | 36 + source3/smbd/filename.c | 27 ++- 5 files changed, 184 insertions(+), 132 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/client/client.c b/source3/client/client.c index f49f3ff..034b48a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4656,6 +4656,124 @@ static int cmd_show_connect( void ) return 0; } +/** + * set_remote_attr - set DOS attributes of a remote file + * @filename: path to the file name + * @new_attr: attribute bit mask to use + * @mode: one of ATTR_SET or ATTR_UNSET + * + * Update the file attributes with the one provided. + */ +int set_remote_attr(const char *filename, uint16_t new_attr, int mode) +{ + extern struct cli_state *cli; + uint16_t old_attr; + NTSTATUS status; + + status = cli_getatr(cli, filename, _attr, NULL, NULL); + if (!NT_STATUS_IS_OK(status)) { + d_printf("cli_getatr failed: %s\n", nt_errstr(status)); + return 1; + } + + if (mode == ATTR_SET) { + new_attr |= old_attr; + } else { + new_attr = old_attr & ~new_attr; + } + + status = cli_setatr(cli, filename, new_attr, 0); + if (!NT_STATUS_IS_OK(status)) { + d_printf("cli_setatr failed: %s\n", nt_errstr(status)); + return 1; + } + + return 0; +} + +/** + * cmd_setmode - interactive command to set DOS attributes + * + * Read a filename and mode from the client command line and update + * the file DOS attributes. + */ +int cmd_setmode(void) +{ + const extern char *cmd_ptr; + char *buf; + char *fname = NULL; + uint16_t attr[2] = {0}; + int mode = ATTR_SET; + int err = 0; + bool ok; + TALLOC_CTX *ctx = talloc_new(NULL); + if (ctx == NULL) { + return 1; + } + + ok = next_token_talloc(ctx, _ptr, , NULL); + if (!ok) { + d_printf("setmode <[+|-]rsha>\n"); + err = 1; + goto out; + } + + f
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a1187bb dbwrap: Remove talloc from dbwrap_watch_record_stored() via 1a8750a dbwrap: Convert dbwrap_record_watchers_key to not use talloc via 2e0e06c dbwrap: Simplify dbwrap_record_watchers_key() via 9964d60 dbwrap: Make dbwrap_db_id return size_t via 71a407e dbwrap: Remove talloc_reference() via 225cba6 dbwrap: Remove unused dbwrap_hash_size() via 5d12eb8 dbwrap: Remove loadparm_context from db_open_tdb from 1399198 build: improve stack protector check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a1187bb873009ea673b039bc7152c31f831f6366 Author: Volker Lendecke <v...@samba.org> Date: Sun Sep 20 18:25:20 2015 +0200 dbwrap: Remove talloc from dbwrap_watch_record_stored() This happens on every store to locking.tdb for example, so we should make it cheap. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Sep 22 07:50:58 CEST 2015 on sn-devel-104 commit 1a8750a2c619ca3ab44c49e186a89893742f435f Author: Volker Lendecke <v...@samba.org> Date: Sun Sep 20 17:32:24 2015 +0200 dbwrap: Convert dbwrap_record_watchers_key to not use talloc Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 2e0e06c3c51fc57bd021f24850e85e2394b3fa1c Author: Volker Lendecke <v...@samba.org> Date: Sun Sep 20 17:06:22 2015 +0200 dbwrap: Simplify dbwrap_record_watchers_key() It took a bit for me to figure out what the rec_key parameter to dbwrap_record_watchers_key does. I think it's simpler to parse the watcher key in dbwrap_record_watch_recv to retrieve the watched record key than to store it Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 9964d60e3e3a779bc2a6e72f4d677a72c59e09e4 Author: Volker Lendecke <v...@samba.org> Date: Sun Sep 20 16:26:06 2015 +0200 dbwrap: Make dbwrap_db_id return size_t This will make an on-stack db-id easier Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 71a407edad9f3fc1cd1719d87123862698f12f2f Author: Volker Lendecke <v...@samba.org> Date: Mon Sep 21 12:32:47 2015 +0200 dbwrap: Remove talloc_reference() We want to know (by crashing) when we free the database with records still around. This would be a serious violation of our data structure hierarchies. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 225cba6e413758dcaff2ba275fa81b37485922f2 Author: Volker Lendecke <v...@samba.org> Date: Sun Sep 20 20:25:53 2015 +0200 dbwrap: Remove unused dbwrap_hash_size() Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 5d12eb890880c4d7e23a266f6817e40636fc81e6 Author: Volker Lendecke <v...@samba.org> Date: Mon Sep 21 12:28:20 2015 +0200 dbwrap: Remove loadparm_context from db_open_tdb Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: lib/dbwrap/dbwrap.c | 9 +- lib/dbwrap/dbwrap.h | 3 +- lib/dbwrap/dbwrap_cache.c| 8 +- lib/dbwrap/dbwrap_local_open.c | 9 +- lib/dbwrap/dbwrap_private.h | 4 +- lib/dbwrap/dbwrap_rbt.c | 8 +- lib/dbwrap/dbwrap_tdb.c | 21 ++-- lib/dbwrap/dbwrap_tdb.h | 1 - source3/lib/dbwrap/dbwrap_ctdb.c | 10 +- source3/lib/dbwrap/dbwrap_watch.c| 189 +++ source4/ntvfs/posix/python/pyxattr_tdb.c | 15 ++- 11 files changed, 137 insertions(+), 140 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c index d75c714..a1b98c3 100644 --- a/lib/dbwrap/dbwrap.c +++ b/lib/dbwrap/dbwrap.c @@ -395,11 +395,6 @@ int dbwrap_wipe(struct db_context *db) return db->wipe(db); } -int dbwrap_hash_size(struct db_context *db) -{ - return db->hash_size; -} - int dbwrap_check(struct db_context *db) { if (db->check == NULL) { @@ -454,9 +449,9 @@ int dbwrap_transaction_cancel(struct db_context *db) return db->transaction_cancel(db); } -void dbwrap_db_id(struct db_context *db, const uint8_t **id, size_t *idlen) +size_t dbwrap_db_id(struct db_context *db, uint8_t *id, size_t idlen) { - db->id(db, id, idlen); +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a36a734 Revert "tdb: Add tdbdump -u" from 6ce3643 s3: tests: smbclient test to ensure we can create and see a :foobar stream on the top level directory in a share. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a36a734717fc8cee2fe69f5822b2fc6aafb8dadd Author: Ralph Boehme <s...@samba.org> Date: Fri Sep 18 10:58:37 2015 +0200 Revert "tdb: Add tdbdump -u" This reverts commit ea53e86c256bec08373dbe86e190a7f5a06eff9d. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Sep 18 14:03:12 CEST 2015 on sn-devel-104 --- Summary of changes: lib/tdb/man/tdbdump.8.xml | 9 -- lib/tdb/tools/tdbdump.c | 285 +- 2 files changed, 1 insertion(+), 293 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/man/tdbdump.8.xml b/lib/tdb/man/tdbdump.8.xml index 238e881..31e6888 100644 --- a/lib/tdb/man/tdbdump.8.xml +++ b/lib/tdb/man/tdbdump.8.xml @@ -22,7 +22,6 @@ tdbdump -k keyname -e - -u -h filename @@ -70,14 +69,6 @@ - - -u - - 'Undumps' a database, turning the tdbdump output on stdin - into a tdb again. - - - diff --git a/lib/tdb/tools/tdbdump.c b/lib/tdb/tools/tdbdump.c index aa50540..9a0a7fe 100644 --- a/lib/tdb/tools/tdbdump.c +++ b/lib/tdb/tools/tdbdump.c @@ -23,7 +23,6 @@ #include "system/filesys.h" #include "system/wait.h" #include "tdb.h" -#include static void print_data(TDB_DATA d) { @@ -135,293 +134,18 @@ static int dump_tdb(const char *fname, const char *keyname, bool emergency) return 0; } -static bool file_parse_lines(FILE *f, -bool (*cb)(char *buf, size_t buflen, - void *private_data), -void *private_data) -{ - char *buf; - size_t buflen; - - buflen = 1024; - buf = malloc(1024); - if (buf == NULL) { - return false; - } - - while (true) { - size_t pos = 0; - int c; - bool ok; - - while ((c = fgetc(f)) != EOF) { - - buf[pos++] = c; - - if (pos == (buflen-1)) { - char *tmp; - tmp = realloc(buf, buflen*2); - if (tmp == NULL) { - free(buf); - return false; - } - buf = tmp; - buflen *= 2; - } - - if (c == '\n') { - break; - } - } - - if (c == EOF) { - free(buf); - return (pos == 0); - } - - buf[pos] = '\0'; - - ok = cb(buf, buflen, private_data); - if (!ok) { - break; - } - } - free(buf); - return true; -} - -struct undump_state { - struct tdb_context *tdb; - TDB_DATA key; - TDB_DATA data; - int line; -}; - -static ssize_t match_len(const regmatch_t *m, size_t buflen) -{ - if ((m->rm_eo < m->rm_so) || - (m->rm_eo > buflen) || (m->rm_so > buflen)) { - return -1; - } - return m->rm_eo - m->rm_so; -} - -static int nibble(char c) -{ - if ((c >= '0') && (c <= '9')) { - return c - '0'; - } - if ((c >= 'A') && (c <= 'F')) { - return c - 'A' + 10; - } - if ((c >= 'a') && (c <= 'f')) { - return c - 'a' + 10; - } - return -1; -} - -static bool undump_regmatch(int line, char *buf, size_t buflen, - const regmatch_t *nummatch, - const regmatch_t *datamatch, - TDB_DATA *pret) -{ - ssize_t numlen = match_len(nummatch, buflen); - ssize_t datalen = match_len(datamatch, buflen); - long long num; - size_t col; - - TDB_DATA ret = {0}; - - if ((numlen == -1) || (datalen == -1)) { - fprintf(stderr, "No matches in line %d\n", lin
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c2de842 s3:talloc_dict: fix a SIGBUS when dereferencing unaligned pointers from a84eed5 lib/param: add a fixed unified lpcfg_string_{free,set,set_upper}() infrastructure https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c2de8425d9a33baeb743a611c8169131b975f179 Author: Ralph Boehme <s...@samba.org> Date: Thu Nov 26 11:10:38 2015 +0100 s3:talloc_dict: fix a SIGBUS when dereferencing unaligned pointers Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Nov 30 22:31:16 CET 2015 on sn-devel-104 --- Summary of changes: source3/lib/talloc_dict.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/talloc_dict.c b/source3/lib/talloc_dict.c index 71ab899..7594679 100644 --- a/source3/lib/talloc_dict.c +++ b/source3/lib/talloc_dict.c @@ -72,7 +72,7 @@ bool talloc_dict_set(struct talloc_dict *dict, DATA_BLOB key, void *pdata) TALLOC_FREE(rec); return false; } - old_data = *(void **)(value.dptr); + memcpy(_data, value.dptr, sizeof(old_data)); TALLOC_FREE(old_data); if (data == NULL) { status = dbwrap_record_delete(rec); @@ -138,6 +138,7 @@ static int talloc_dict_traverse_fn(struct db_record *rec, void *private_data) TDB_DATA value; struct talloc_dict_traverse_state *state = (struct talloc_dict_traverse_state *)private_data; + void *p; key = dbwrap_record_get_key(rec); value = dbwrap_record_get_value(rec); @@ -145,8 +146,10 @@ static int talloc_dict_traverse_fn(struct db_record *rec, void *private_data) if (value.dsize != sizeof(void *)) { return -1; } + + memcpy(, value.dptr, sizeof(p)); return state->fn(data_blob_const(key.dptr, key.dsize), -*(void **)value.dptr, state->private_data); +p, state->private_data); } /* -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d2a0806 s4:torture/basic: Fix misleading test case names in aliases test via 6321145 lib/async_req: do not install async_connect_send_test. from 3bbd8d3 libcli/smb: fix BUFFER_OVERFLOW handling in tstream_smbXcli_np https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d2a0806cbd24f6211b55a5454e2e62fc61a4c4b6 Author: Anoop C S <anoo...@redhat.com> Date: Tue Dec 1 17:41:35 2015 +0530 s4:torture/basic: Fix misleading test case names in aliases test Previously, "QFILEINFO aliases" was running qfsinfo_aliases and "QFSINFO aliases" was running qfileinfo_aliases. This change is to make sure that each of them point towards correct test cases. Signed-off-by: Anoop C S <anoo...@redhat.com> Reviewed-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Dec 1 20:44:54 CET 2015 on sn-devel-104 commit 632114584d3be0d4660e97a6c9e69e577a7bc1e2 Author: Günther Deschner <g...@samba.org> Date: Tue Dec 1 14:39:37 2015 +0100 lib/async_req: do not install async_connect_send_test. Guenther Signed-off-by: Günther Deschner <g...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: lib/async_req/wscript_build | 3 ++- source4/torture/basic/aliases.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/wscript_build b/lib/async_req/wscript_build index 9c25223..bf79fdd 100644 --- a/lib/async_req/wscript_build +++ b/lib/async_req/wscript_build @@ -9,5 +9,6 @@ bld.SAMBA_SUBSYSTEM('LIBASYNC_REQ', bld.SAMBA_BINARY('async_connect_send_test', source='async_connect_send_test.c', - deps='LIBASYNC_REQ' + deps='LIBASYNC_REQ', + install=False ) diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c index 2d1d411..acd33a4 100644 --- a/source4/torture/basic/aliases.c +++ b/source4/torture/basic/aliases.c @@ -386,8 +386,8 @@ struct torture_suite *torture_trans2_aliases(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "aliases"); - torture_suite_add_1smb_test(suite, "QFILEINFO aliases", qfsinfo_aliases); - torture_suite_add_1smb_test(suite, "QFSINFO aliases", qfileinfo_aliases); + torture_suite_add_1smb_test(suite, "QFSINFO aliases", qfsinfo_aliases); + torture_suite_add_1smb_test(suite, "QFILEINFO aliases", qfileinfo_aliases); torture_suite_add_1smb_test(suite, "QPATHINFO aliases", qpathinfo_aliases); torture_suite_add_1smb_test(suite, "FINDFIRST aliases", findfirst_aliases); torture_suite_add_1smb_test(suite, "setfileinfo_aliases", setfileinfo_aliases); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8aab442 dbwrap_tdb: Fix a typo from 33084a1 ctdb-ipalloc: Drop unnecessary struct ctdb_ipflags https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8aab4426a5235c60d3febabad075985e1f9777f0 Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 20 14:00:54 2015 +0200 dbwrap_tdb: Fix a typo Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Nov 23 15:16:19 CET 2015 on sn-devel-104 --- Summary of changes: lib/dbwrap/dbwrap_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c index 0e54449..e12ec44 100644 --- a/lib/dbwrap/dbwrap_tdb.c +++ b/lib/dbwrap/dbwrap_tdb.c @@ -405,7 +405,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx, int hash_size, int tdb_flags, int open_flags, mode_t mode, enum dbwrap_lock_order lock_order, - uint64_t dbrwap_flags) + uint64_t dbwrap_flags) { struct db_context *result = NULL; struct db_tdb_ctx *db_tdb; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ea3ca6b selftest: Kerberos auth with netbios alias SPNs from 9379a86 s3/net: print returned addresses in dns gethostbyname https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ea3ca6be6425ffd8dffa22a122afabd47b7bb510 Author: Ralph Boehme <s...@samba.org> Date: Sat Jun 18 19:30:46 2016 +0200 selftest: Kerberos auth with netbios alias SPNs Since commit 0f6d51f34baa816b6ec422c8bc28687f0a3073de libnet_join automatically adds netbios aliases as SPNs to the machine account. This commit adds a simple test with smbclient -k against the aliases. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Jun 19 19:07:46 CEST 2016 on sn-devel-144 --- Summary of changes: selftest/target/Samba3.pm | 1 + .../script/tests/test_smbclient_netbios_aliases.sh | 40 ++ source3/selftest/tests.py | 5 +++ 3 files changed, 46 insertions(+) create mode 100755 source3/script/tests/test_smbclient_netbios_aliases.sh Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 7a67e77..3f6fd1e 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -380,6 +380,7 @@ sub setup_admember() security = ads workgroup = $dcvars->{DOMAIN} realm = $dcvars->{REALM} +netbios aliases = foo bar "; my $ret = $self->provision($prefix, diff --git a/source3/script/tests/test_smbclient_netbios_aliases.sh b/source3/script/tests/test_smbclient_netbios_aliases.sh new file mode 100755 index 000..cb0d967 --- /dev/null +++ b/source3/script/tests/test_smbclient_netbios_aliases.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then +cat < +EOF +exit 1; +fi + +SMBCLIENT3=$1 +SERVER=$2 +USERNAME=$3 +PASSWORD=$4 +PREFIX=$5 +shift 5 +ADDARGS="$*" + +samba4bindir="$BINDIR" +samba4srcdir="$SRCDIR/source4" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + +KRB5CCNAME_PATH="$PREFIX/tmpccache" +KRB5CCNAME="FILE:$KRB5CCNAME_PATH" +export KRB5CCNAME +rm -rf $KRB5CCNAME_PATH + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh + +echo $PASSWORD > $PREFIX/tmppassfile +testit "kinit" $samba4kinit --password-file=$PREFIX/tmppassfile $USERNAME || failed=`expr $failed + 1` +rm -f $PREFIX/tmppassfile +testit "smbclient" $VALGRIND $SMBCLIENT3 -k //$SERVER/tmp -c 'ls' $ADDARGS || failed=`expr $failed + 1` + +rm -rf $KRB5CCNAME_PATH + +testok $0 $failed diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 45a7787..cc635cd 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -496,6 +496,11 @@ for options in options_list: "none", smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration]) +for alias in ["foo", "bar"]: +plantestsuite("samba3.blackbox.smbclient_netbios_aliases [%s]" % alias, "ad_member:local", + [os.path.join(samba3srcdir, "script/tests/test_smbclient_netbios_aliases.sh"), + smbclient3, alias, "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX", options, configuration]) + for e in endianness_options: for a in auth_options: for s in signseal_options: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9379a86 s3/net: print returned addresses in dns gethostbyname from 3de3f64 s4-kdc: Move KDC packet handling functions to kdc-server.c https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9379a869439585410c4c3f74db2a39eaa36cb523 Author: Richard Sharpe <rsha...@samba.org> Date: Sat Jun 18 13:29:36 2016 -0700 s3/net: print returned addresses in dns gethostbyname Make net ads dns gethostbyname actually print out the returned addresses so we can use it in self tests. Signed-off-by: Richard Sharpe <rsha...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Jun 19 10:34:37 CEST 2016 on sn-devel-144 --- Summary of changes: source3/utils/net_ads.c | 7 --- source3/utils/net_dns.c | 29 +++-- 2 files changed, 31 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index f4c25e1..5feecc9 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1751,9 +1751,10 @@ static int net_ads_dns_gethostbyname(struct net_context *c, int argc, const char } err = do_gethostbyname(argv[0], argv[1]); - - d_printf(_("do_gethostbyname returned %s (%d)\n"), - dns_errstr(err), ERROR_DNS_V(err)); + if (!ERR_DNS_IS_OK(err)) { + d_printf(_("do_gethostbyname returned %s (%d)\n"), + dns_errstr(err), ERROR_DNS_V(err)); + } #endif return 0; } diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c index 3b9730a..207dfa5 100644 --- a/source3/utils/net_dns.c +++ b/source3/utils/net_dns.c @@ -212,14 +212,39 @@ DNS_ERROR do_gethostbyname(const char *server, const char *host) struct dns_connection *conn = NULL; struct dns_request *req, *resp; DNS_ERROR err; + int ans = 0; err = dns_open_connection(server, DNS_UDP, NULL, ); - if (!ERR_DNS_IS_OK(err)) goto error; + if (!ERR_DNS_IS_OK(err)) { + goto error; + } err = dns_create_query(conn, host, QTYPE_A, DNS_CLASS_IN, ); - if (!ERR_DNS_IS_OK(err)) goto error; + if (!ERR_DNS_IS_OK(err)) { + goto error; + } err = dns_transaction(conn, conn, req, ); + if (!ERR_DNS_IS_OK(err)) { + goto error; + } + + if (resp->num_answers == 0) { + printf("%s", "No answers!\n"); + goto error; + } + + for (ans = 0; ans < resp->num_answers; ans++) { + struct in_addr resp_ip; + + if (ans > 0) + printf("%s", " "); + + resp_ip.s_addr = *((uint32_t *)resp->answers[ans]->data); + printf("%s", inet_ntoa(resp_ip)); + } + + printf("%s", "\n"); error: TALLOC_FREE(conn); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 551e268 tldap: Use struct initializer in tldap_search via 8842235 tldap: Avoid includes.h via 093a89f tldap.h: References DATA_BLOB via 5021974 lib: Introduce util_tsock.h via 3df9e9c tldap: tevent_req_create NULLs out "state" via e481849 tldap: Use "size_t" for talloc_array_length result via 8215409 tldap: Remove an unneeded "return;" via 245064d tldap: Remove unneeded vars from 657610a smbd: Fix 240393 Uninitialized pointer read https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 551e268ac307bd352b2d45d3089319294261c9cd Author: Volker Lendecke <v...@samba.org> Date: Mon Dec 21 21:29:13 2015 +0100 tldap: Use struct initializer in tldap_search Avoids a call to ZERO_STRUCT Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Jan 11 01:31:59 CET 2016 on sn-devel-144 commit 8842235a82bbf8fb65d23fa38d87c16c58040dce Author: Volker Lendecke <v...@samba.org> Date: Mon Dec 21 11:17:28 2015 +0100 tldap: Avoid includes.h Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 093a89f6ecf706e1cc4ea838b09b2a83ed4cbe10 Author: Volker Lendecke <v...@samba.org> Date: Sun Jan 10 12:00:52 2016 +0100 tldap.h: References DATA_BLOB Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 5021974f2ab8a1318e2a0e7f51a8a988cd1820cb Author: Volker Lendecke <v...@samba.org> Date: Mon Dec 21 10:50:59 2015 +0100 lib: Introduce util_tsock.h This avoids includes.h in source3/lib/util_tsock.c Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 3df9e9c7aeb95ee5f5292c35bf0628b51b32b8b1 Author: Volker Lendecke <v...@samba.org> Date: Tue Dec 22 13:44:02 2015 +0100 tldap: tevent_req_create NULLs out "state" Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit e48184935e1f4c6a3876a054ed4031b23ed0df7a Author: Volker Lendecke <v...@samba.org> Date: Sun Jan 10 11:29:40 2016 +0100 tldap: Use "size_t" for talloc_array_length result Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 8215409153d15cbf96ac9103d355c8c5ea71ea13 Author: Volker Lendecke <v...@samba.org> Date: Sun Jan 10 11:33:01 2016 +0100 tldap: Remove an unneeded "return;" Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 245064d5a3b46491d446dbf2186412b1a0933ef9 Author: Volker Lendecke <v...@samba.org> Date: Sun Dec 27 15:31:58 2015 +0100 tldap: Remove unneeded vars Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/include/proto.h| 11 source3/include/tldap.h| 1 + source3/lib/tldap.c| 23 - source3/lib/util_tsock.c | 5 +++- source3/lib/{tevent_barrier.h => util_tsock.h} | 35 +- source3/libsmb/unexpected.c| 1 + 6 files changed, 34 insertions(+), 42 deletions(-) copy source3/lib/{tevent_barrier.h => util_tsock.h} (56%) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index cc00a84..a53aabd 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -600,17 +600,6 @@ struct tevent_req *getaddrinfo_send(TALLOC_CTX *mem_ctx, int getaddrinfo_recv(struct tevent_req *req, struct addrinfo **res); int poll_one_fd(int fd, int events, int timeout, int *revents); int poll_intr_one_fd(int fd, int events, int timeout, int *revents); -struct tstream_context; -struct tevent_req *tstream_read_packet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct tstream_context *stream, - size_t initial, - ssize_t (*more)(uint8_t *buf, - size_t buflen, - void *private_data), - void *private_data); -ssize_t tstream_read_packe
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cff17f0 s3: smbd: Remove one more use of lp_posix_pathnames(). from ecc7022 s3-util: skip S-1-18 sids in token generaion in sid_array_from_info3(). https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cff17f0a8ccf697d2836fe5b32b621995a9fc432 Author: Jeremy Allison <j...@samba.org> Date: Fri Jan 15 16:22:26 2016 -0800 s3: smbd: Remove one more use of lp_posix_pathnames(). Slowly removing them... Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Jan 17 02:07:23 CET 2016 on sn-devel-144 --- Summary of changes: source3/smbd/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index a322bb5..3805915 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -2036,7 +2036,7 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp) return status; } - if (!lp_posix_pathnames() && + if (!(fsp->posix_flags & FSP_POSIX_FLAGS_RENAME) && lp_strict_rename(SNUM(conn)) && have_file_open_below(fsp->conn, fsp->fsp_name)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via becc43b krb5_wrap: Fix build error when not using heimdal. via 2db5c10 s4/torture: add a test for dosmode and hidden files via 36b7cff s3/smbd: only use stored dos attributes for open_match_attributes() check via f2a53ef s3/smbd: move check for "hide files" to dos_mode_from_name() via 1be8770 s3/smbd: call dos_mode_from_name after SMB_VFS_GET_DOS_ATTRIBUTES() via c8c67c9 s3/smbd: add helper func dos_mode_from_name() from 030fd72 s3-ctdb: Return an error when unexpected reply is received https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit becc43b87d892503cf621ab9259c61fc72ff0813 Author: Jose A. Rivera <jar...@samba.org> Date: Sat Jun 25 10:47:52 2016 -0500 krb5_wrap: Fix build error when not using heimdal. Just a small typo fix where type and variable were flipped. Signed-off-by: Jose A. Rivera <jar...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Jun 25 22:43:27 CEST 2016 on sn-devel-144 commit 2db5c10ac59d5362e81c50d9a854071477de9c12 Author: Ralph Boehme <s...@samba.org> Date: Thu Jun 23 19:13:05 2016 +0200 s4/torture: add a test for dosmode and hidden files Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 36b7cff3188bbc21048c12ec971d9c2ac3666226 Author: Ralph Boehme <s...@samba.org> Date: Thu Jun 23 12:24:33 2016 +0200 s3/smbd: only use stored dos attributes for open_match_attributes() check This changes the way we check for old vs new DOS attributes on open with overwrite: only check against the DOS attributes actually set by a client and stored in the DOS attributes xattr. With this change "hide dot files" and "hide files" continue to work with "store dos attributes = yes". Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit f2a53efb1aab0986d6a7d9621b1efff2127df4e6 Author: Ralph Boehme <s...@samba.org> Date: Thu Jun 23 17:14:55 2016 +0200 s3/smbd: move check for "hide files" to dos_mode_from_name() Consolidate the "hide dot files" and "hide files" handling stuff in one function. No change in overall behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1be877038c53c88802bc19c00a49c1974f17c4eb Author: Ralph Boehme <s...@samba.org> Date: Thu Jun 23 16:40:15 2016 +0200 s3/smbd: call dos_mode_from_name after SMB_VFS_GET_DOS_ATTRIBUTES() This doesn't change overall behaviour in any way, it just prepares for the next step where the IS_HIDDEN_PATH() stuff will be moved to the function dos_mode_from_name(). It allows an optimisation by not checking "hide to files" patch if FILE_ATTRIBUTE_HIDDEN was already set in the DOS xattr. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit c8c67c9a2a6347e36f4628e2d0260bd6c58d8c65 Author: Ralph Boehme <s...@samba.org> Date: Thu Jun 23 12:23:33 2016 +0200 s3/smbd: add helper func dos_mode_from_name() This just moves the computation of "hide dot files" files to a helper functions without changing overall behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11992 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> --- Summary of changes: lib/krb5_wrap/krb5_samba.c | 2 +- selftest/target/Samba3.pm | 7 ++ source3/selftest/tests.py | 2 + source3/smbd/dosmode.c | 58 +++- source3/smbd/open.c| 13 ++- source4/selftest/tests.py | 5 +- source4/torture/smb2/dosmode.c | 183 + source4/torture/smb2/smb2.c| 1 + source4/torture/smb2/wscript_build | 2 +- 9 files changed, 245 insertions(+), 28 deletions(-) create mode 100644 source4/torture/smb2/dosmode.c Changeset truncated at 500 lines: diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index 79e9450..8064f17 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -162,7 +162,7 @@ kr
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6318615 s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. via 4856906 s3: tldap: Remove asynchronous calls to gensec_update_send()/_recv() as for the spnego backend they're synchronous anyway. via 2a322a7 selftest: test idmap backend id allocation for unknown SIDS via aa54fa4 selftest: make autorid the default idmap backend in admember_rfc2307 via 9be9181 winbindd: in wb_lookupsids return domain name if we have it via 5e346af winbindd/idmap_rfc2307: fix a crash from a8c737f s3:utils/net: Add new option 'unregister' in 'net ads dns' command. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6318615a63bc35c6d3ac555ea45f321d8988f0d6 Author: Jeremy Allison <j...@samba.org> Date: Mon Jun 27 10:39:02 2016 -0700 s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. Only expose a synchronous tldap_gensec_bind() call, as it can't really be async anyway. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Jun 28 11:19:33 CEST 2016 on sn-devel-144 commit 48569065c81414c79e9fd4d7b77baf92e8ee0aaf Author: Jeremy Allison <j...@samba.org> Date: Fri Jun 24 11:40:10 2016 -0700 s3: tldap: Remove asynchronous calls to gensec_update_send()/_recv() as for the spnego backend they're synchronous anyway. This should prevent nested event loops, and won't make the code performance worse anyway. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 2a322a7671c9ffd0dd600142dd76b5b51a67e185 Author: Ralph Boehme <s...@samba.org> Date: Sun Jun 12 19:03:11 2016 +0200 selftest: test idmap backend id allocation for unknown SIDS If an SID is is not found becaues the RID doesn't exist in a domain and the domain is configured to use a non-allocating idmap backend like idmap_ad or idmap_rfc2307, winbindd must not return a mapping for the SID. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11961 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit aa54fa4e88cc80bc7841beba3a5561ad2c83dc80 Author: Ralph Boehme <s...@samba.org> Date: Fri Jun 24 18:33:01 2016 +0200 selftest: make autorid the default idmap backend in admember_rfc2307 This is needed for a new test in the next commit. Exisiting tests aren't affected by this, at least a private autobuild passed with this change. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11961 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> commit 9be918116e356c358ef77cc2933e471090088293 Author: Ralph Boehme <s...@samba.org> Date: Fri Jun 24 15:16:42 2016 +0200 winbindd: in wb_lookupsids return domain name if we have it When doing a SID to xid mapping for an unknown SID, the idmap child gets passed a lsa_RefDomainList with an empty domain name (ie ""). This is coming from LsaLookupSids() and causes the mapping request to end up in the default idmap domain. Example request with domain name "": wbint_Sids2UnixIDs: struct wbint_Sids2UnixIDs in: struct wbint_Sids2UnixIDs domains : * domains: struct lsa_RefDomainList count: 0x0001 (1) domains : * domains: ARRAY(1) domains: struct lsa_DomainInfo name: struct lsa_StringLarge length : 0x (0) size : 0x0002 (2) string : * string : '' sid : * sid : S-1-5-21-3152989960-574718769-2188965058 max_size : 0x0020 (32) ids : * ids: struct wbint_TransIDArray num_ids : 0x0001 (1) ids: ARRAY(1) ids: struct wbint_TransID type : ID_TYPE_NOT_SPECIFIED (0) domain_index : 0x (0) rid
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4953b1f Fix ETIME handling for Solaris event ports. from 1f6495b ctdb/server: fix gcc6 build warning. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4953b1f73f8ec9387516be1058434d71937e1447 Author: Nathan Huff <nh...@acm.org> Date: Fri Feb 5 13:35:07 2016 -0700 Fix ETIME handling for Solaris event ports. It is possible for port_getn to return -1 with errno set to ETIME and still return events. If those events aren't processed the association is lost by samba since the kernel dissacociated them and samba never processed them so never reassociated them with the event port. The patch checks the nget return value in the case of ETIME and if it is non 0 it doesn't return and goes through the event processing loop. Signed-off-by: Nathan Huff <nh...@acm.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Feb 7 11:26:35 CET 2016 on sn-devel-144 --- Summary of changes: lib/tevent/tevent_port.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tevent/tevent_port.c b/lib/tevent/tevent_port.c index 5b487d7..4b524df 100644 --- a/lib/tevent/tevent_port.c +++ b/lib/tevent/tevent_port.c @@ -496,10 +496,24 @@ static int port_event_loop(struct port_event_context *port_ev, struct timeval *t return 0; } - if (ret == -1 && port_errno == ETIME && tvalp) { - /* we don't care about a possible delay here */ - tevent_common_loop_timer_delay(ev); - return 0; + if (ret == -1 && port_errno == ETIME) { + /* +* If errno is set to ETIME it is possible that we still got an event. +* In that case we need to go through the processing loop so that we +* reassociate the received event with the port or the association will +* be lost so check the value of nget is 0 before returning. +*/ + if (nget == 0) { + /* we don't care about a possible delay here */ + tevent_common_loop_timer_delay(ev); + return 0; + } + /* +* Set the return value to 0 since we do not actually have an error and we +* do have events that need to be processed. This keeps us from getting +* caught in the generic error test. +*/ + ret = 0; } if (ret == -1) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 574313a lib/tsocket: workaround sockets not supporting FIONREAD from 1d26012 asn1: Ensure asn1_tag_remaining() only ever returns -1 as an error condition. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 574313a1e11d521ba3f7232ff0b4186b49658199 Author: Ralph Boehme <s...@samba.org> Date: Thu Feb 4 15:35:06 2016 +0100 lib/tsocket: workaround sockets not supporting FIONREAD Netlink sockets don't support querying pending bytes with ioctl(fd, FIONREAD, ...) and would return EOPNOTSUPP, so use recvmsg() with MSG_PEEK|MSG_TRUNC as a fallback. The MSG_TRUNC flag to recvmsg() is Linux only, but netlink is as well, so we're safe for now. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11714 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Reviewed-by: Martin Schwenke <mar...@meltin.net> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Feb 10 10:30:24 CET 2016 on sn-devel-144 --- Summary of changes: lib/tsocket/tsocket_bsd.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index ac0617d..9608dde 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -132,6 +132,43 @@ static int tsocket_bsd_common_prepare_fd(int fd, bool high_fd) return -1; } +#ifdef HAVE_LINUX_RTNETLINK_H +/** + * Get the amount of pending bytes from a netlink socket + * + * For some reason netlink sockets don't support querying the amount of pending + * data via ioctl with FIONREAD, which is what we use in tsocket_bsd_pending() + * below. + * + * We know we are on Linux as we're using netlink, which means we have a working + * MSG_TRUNC flag to recvmsg() as well, so we use that together with MSG_PEEK. + **/ +static ssize_t tsocket_bsd_netlink_pending(int fd) +{ + struct iovec iov; + struct msghdr msg; + char buf[1]; + + iov = (struct iovec) { + .iov_base = buf, + .iov_len = sizeof(buf) + }; + + msg = (struct msghdr) { + .msg_iov = , + .msg_iovlen = 1 + }; + + return recvmsg(fd, , MSG_PEEK | MSG_TRUNC); +} +#else +static ssize_t tsocket_bsd_netlink_pending(int fd) +{ + errno = ENOSYS; + return -1; +} +#endif + static ssize_t tsocket_bsd_pending(int fd) { int ret, error; @@ -640,6 +677,7 @@ struct tdgram_bsd { void *event_ptr; struct tevent_fd *fde; bool optimize_recvfrom; + bool netlink; void *readable_private; void (*readable_handler)(void *private_data); @@ -892,7 +930,12 @@ static void tdgram_bsd_recvfrom_handler(void *private_data) int err; bool retry; - ret = tsocket_bsd_pending(bsds->fd); + if (bsds->netlink) { + ret = tsocket_bsd_netlink_pending(bsds->fd); + } else { + ret = tsocket_bsd_pending(bsds->fd); + } + if (state->first_try && ret == 0) { state->first_try = false; /* retry later */ @@ -1395,6 +1438,11 @@ int _tdgram_bsd_existing_socket(TALLOC_CTX *mem_ctx, { struct tdgram_context *dgram; struct tdgram_bsd *bsds; +#ifdef HAVE_LINUX_RTNETLINK_H + int result; + struct sockaddr sa; + socklen_t sa_len = sizeof(struct sockaddr); +#endif dgram = tdgram_context_create(mem_ctx, _bsd_ops, @@ -1409,6 +1457,18 @@ int _tdgram_bsd_existing_socket(TALLOC_CTX *mem_ctx, talloc_set_destructor(bsds, tdgram_bsd_destructor); *_dgram = dgram; + +#ifdef HAVE_LINUX_RTNETLINK_H + /* +* Try to determine the protocol family and remember if it's +* AF_NETLINK. We don't care if this fails. +*/ + result = getsockname(fd, , _len); + if (result == 0 && sa.sa_family == AF_NETLINK) { + bsds->netlink = true; + } +#endif + return 0; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 519564b ctdb-scripts: Drop use of "smbcontrol winbindd ip-dropped ..." from 574313a lib/tsocket: workaround sockets not supporting FIONREAD https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 519564bb35a0f840bc4d7c8c5a92441c97b49791 Author: Martin Schwenke <mar...@meltin.net> Date: Mon Feb 8 15:55:17 2016 +1100 ctdb-scripts: Drop use of "smbcontrol winbindd ip-dropped ..." This is unnecessary in Samba >= 4.0 because winbindd monitors IP address itself and no longer needs to be told when they are dropped. The smbcontrol commands can hang if a node has recovery mode active because smbcontrol is unable to connect to the registry. Therefore, the smbcontrol commands should be removed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11719 Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Feb 10 14:08:17 CET 2016 on sn-devel-144 --- Summary of changes: ctdb/config/events.d/11.natgw | 4 ctdb/config/events.d/49.winbind | 7 --- 2 files changed, 11 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 2b30eeb..956f77b 100755 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -164,10 +164,6 @@ natgw_set_slave () _net="${_net_gw%@*}" ip route add "$_net" via "$_natgwip" metric 10 done - -# Make sure winbindd does not stay bound to this address if we are -# no longer NATGW master -smbcontrol winbindd ip-dropped $CTDB_NATGW_PUBLIC_IP >/dev/null 2>&1 } natgw_ensure_master () diff --git a/ctdb/config/events.d/49.winbind b/ctdb/config/events.d/49.winbind index dee3c90..a1ea787 100755 --- a/ctdb/config/events.d/49.winbind +++ b/ctdb/config/events.d/49.winbind @@ -55,13 +55,6 @@ case "$1" in ctdb_check_command wbinfo -p ;; - takeip|releaseip) - iface=$2 - ip=$3 - maskbits=$4 - - smbcontrol winbindd ip-dropped $ip >/dev/null 2>/dev/null - ;; *) ctdb_standard_event_handler "$@" ;; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via be704c8 selftest: add dbwrap_tdb_require_mutexes:* = yes, when using dbwrap_tdb_mutexes:* = yes by default via 719428f s3:dbwrap: add dbwrap_tdb_require_mutexes:*= option via 00f4bf3 test:docs: remove unused param_table/get_param_table_full() via 9219756 tldap: Add a missing TALLOC_FREE(frame) from 4953b1f Fix ETIME handling for Solaris event ports. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit be704c87650d85159c054b03fc94e2eee1eab17e Author: Stefan Metzmacher <me...@samba.org> Date: Sat Jan 16 10:20:32 2016 +0100 selftest: add dbwrap_tdb_require_mutexes:* = yes, when using dbwrap_tdb_mutexes:* = yes by default export SELFTEST_DONT_REQUIRE_TDB_MUTEX_SUPPORT=1 can overwrite this. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Feb 9 01:42:14 CET 2016 on sn-devel-144 commit 719428f587702fa07b88d23ccf484dd7fd9ccc3e Author: Stefan Metzmacher <me...@samba.org> Date: Sat Jan 16 10:19:23 2016 +0100 s3:dbwrap: add dbwrap_tdb_require_mutexes:*= option This is similar to dbwrap_tdb_mutexes:*= (which is autodetected by default), but dbwrap_tdb_require_mutexes is off by default. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 00f4bf32db3e4cde5dc5278de218efc49a2f4fe1 Author: Michael Adam <ob...@samba.org> Date: Tue Feb 2 15:32:26 2016 +0100 test:docs: remove unused param_table/get_param_table_full() No tests use this any more, hence we should not parse the file anymore either. It is generated directly from the parametersr.all.xml file. Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 9219756a369d31f44a77de2c43b8176c95108665 Author: Volker Lendecke <v...@samba.org> Date: Mon Feb 8 14:40:19 2016 +0100 tldap: Add a missing TALLOC_FREE(frame) Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: python/samba/tests/docs.py | 64 selftest/target/Samba3.pm| 4 +++ selftest/target/Samba4.pm| 4 +++ source3/lib/dbwrap/dbwrap_open.c | 10 +++ source3/lib/tldap.c | 2 +- 5 files changed, 19 insertions(+), 65 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py index e7123b6..238b5c7 100644 --- a/python/samba/tests/docs.py +++ b/python/samba/tests/docs.py @@ -59,64 +59,6 @@ def get_documented_parameters(sourcedir): p.close() -def get_param_table_full(sourcedir, filename="lib/param/param_table_static.c"): -# Reading entries from source code -f = open(os.path.join(sourcedir, filename), "r") -try: -# burn through the preceding lines -while True: -l = f.readline() -if l.startswith("struct parm_struct parm_table"): -break - -for l in f.readlines(): - -if re.match("^\s*\}\;\s*$", l): -# end of the table reached -break - -if re.match("^\s*\{\s*$", l): -# start a new entry -_label = "" -_type = "" -_class = "" -_offset = "" -_special = "" -_enum_list = "" -_flags = "" -continue - -if re.match("^\s*\},\s*$", l): -# finish the entry -yield _label, _type, _class, _offset, _special, _enum_list, _flags -continue - -m = re.match("^\s*\.([^\s]+)\s*=\s*(.*),.*", l) -if not m: -continue - -attrib = m.group(1) -value = m.group(2) - -if attrib == "label": -_label = value -elif attrib == "type": -_type = value -elif attrib == "p_class": -_class = value -elif attrib == "offset": -_offset = value -elif attrib == "special": -_special = value -elif attrib == "enum_list": -_special = value -elif attrib == "flags": -_flags = value - -finally: -f.close() - - def ge
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f6f43c4 winbind: Remove unused WINBINDD_UID_TO_SID via 07b1344 nss_aix: Hack away WINBINDD_UID_TO_SID via f387124 winbind: Remove unused WINBINDD_GID_TO_SID via e8b5a97 selftest: "standard" process model for a few envs via 2b26522 libwbclient: Make source4/ use nsswitch/libwbclient via 148452b libwbclient: Use wbcCtxUnixIdsToSids in wbcCtxGidToSid via 1e4e215 libwbclient: Use wbcCtxUnixIdsToSids in wbcCtxUidToSid via ec94aa5 winbind: Remove unused WINBINDD_SID_TO_GID via 112998f winbind: Remove unused WINBINDD_SID_TO_UID via 122b1a3 libwbclient: Use wbcCtxSidsToUnixIds in wbcCtxSidToGid via fbbe017 libwbclient: Use wbcCtxSidsToUnixIds in wbcCtxSidToUid via eeb0f3b winbind: Remove unused wbint_Gid2Sid via e2dda19 winbind: Use xids2sids in getgrgid via b0f6adf winbind: Use xids2sids in gid2sid via 708df7e winbind: Remove unused wbint_Uid2Sid via 89f753c winbind: Use xids2sids in getpwuid via 05aa340 winbind: Use xids2sids in uid2sid via 182149e wbinfo: Add --unix-ids-to-sids via 171931c libwbclient: Implement wbc[Ctx]UnixIdsToSids via 5cd5ce7 winbind: Expose WINBINDD_XIDS_TO_SIDS externally via e50c1a6 winbind: Add parse_xidlist() via 5bb6600 winbind: Add wb_xids2sids via 24929ee winbind: Add wbint_UnixIDs2Sids via 4d5680e winbind: Simplify _wbint_Sids2UnixIDs via 2b1dd01 winbind: Make _wbint_Sids2UnixIDs single-domain via 9743be6 winbind: Remove a level of indirection from 6018a77 s3:rpc_server: make it possible to build mdssvc as a shared module https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f6f43c496e535641e024afde8fa596e4cbf929b4 Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 09:36:37 2016 +0100 winbind: Remove unused WINBINDD_UID_TO_SID Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Feb 22 23:39:13 CET 2016 on sn-devel-144 commit 07b134407c611f5e26be79c53b02cb97aa02002c Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 09:42:28 2016 +0100 nss_aix: Hack away WINBINDD_UID_TO_SID To do a proper xids2sids conversion I need a build environment. Everyone who needs this and can build AIX please speak up! Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f387124a0441a2e1dfe1a029dacc06792262a43b Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 09:36:37 2016 +0100 winbind: Remove unused WINBINDD_GID_TO_SID Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit e8b5a979ab4b9ac2b70451092eeb7db9238be5ec Author: Volker Lendecke <v...@samba.org> Date: Wed Feb 17 11:58:43 2016 +0100 selftest: "standard" process model for a few envs This is needed as with source4/libcli/wbclient changed to nsswitch/libwbclient we don't have a nested event loop here anymore. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 2b26522e349803067bae004e4d37d2bca1a1b319 Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 09:30:09 2016 +0100 libwbclient: Make source4/ use nsswitch/libwbclient Right now there's no async user of this, so I think it's okay to use the sync libwbclient. If we really get async libwbclient users, we need to put it there instead of calling the struct protocol directly. The code before this patch did not look at the _NO_WINBIND environment variable. So ignore it here too. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 148452b446e020537ac52e96f13a176f2e1c99d2 Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 08:19:41 2016 +0100 libwbclient: Use wbcCtxUnixIdsToSids in wbcCtxGidToSid Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 1e4e215f2f2580b9e5946070f3b736e353cf5b78 Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 08:17:40 2016 +0100 libwbclient: Use wbcCtxUnixIdsToSids in wbcCtxUidToSid Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit ec94aa543be1e11a3c3eb7260d29030218fc528f Author: Volker Lendecke <v...@samba.org> Date: Tue Feb 9 08:02:22 2016 +0100 winbind: Remove unused WINBINDD_SID_TO_GID Signed-off-by: Volker Lendecke <v...@samb
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7b4dfd9 winbindd: return trust parameters when listing trusts via d0aa5d0 winbindd: initialize foreign domain as AD based on trust via c65841a winbindd: introduce add_trusted_domain_from_tdc() from a42dc86 s3/winbindd: Add missing space in debug message. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7b4dfd939f417c7d8c4c2c1e8c77f4af9bcd28d7 Author: Uri Simchoni <u...@samba.org> Date: Wed Feb 10 00:38:11 2016 +0200 winbindd: return trust parameters when listing trusts When asking a child domain process to list trusts on that domain, return (along with trust domain names and SID) the trust properties - flags, type, and attributes. Use those attributes to initialize domain object. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691 Signed-off-by: Uri Simchoni <u...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Feb 23 22:02:16 CET 2016 on sn-devel-144 commit d0aa5d057497022aeefffa9882d3ac2b7e18a682 Author: Uri Simchoni <u...@samba.org> Date: Wed Feb 10 00:32:23 2016 +0200 winbindd: initialize foreign domain as AD based on trust Based on trust parameters, initialize the active_directory member of domain object to true. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691 Signed-off-by: Uri Simchoni <u...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit c65841a3bd737b61251603a916a315043703c832 Author: Uri Simchoni <u...@samba.org> Date: Wed Feb 10 00:26:45 2016 +0200 winbindd: introduce add_trusted_domain_from_tdc() This is purely a refactoring patch - Add a routine that adds a winbindd domain object based on domain trust cache entry. add_trusted_domain() becomes a wrapper for this new routine. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691 Signed-off-by: Uri Simchoni <u...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/winbindd/winbindd_misc.c | 11 +-- source3/winbindd/winbindd_util.c | 153 +++ 2 files changed, 114 insertions(+), 50 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 3e024c9..560f197 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -181,11 +181,12 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain * } extra_data = talloc_asprintf_append_buffer( - extra_data, "%s\\%s\\%s\n", - trusts.array[i].netbios_name, - trusts.array[i].dns_name, - sid_string_talloc(state->mem_ctx, - trusts.array[i].sid)); + extra_data, "%s\\%s\\%s\\%u\\%u\\%u\n", + trusts.array[i].netbios_name, trusts.array[i].dns_name, + sid_string_talloc(state->mem_ctx, trusts.array[i].sid), + trusts.array[i].trust_flags, + (uint32_t)trusts.array[i].trust_type, + trusts.array[i].trust_attributes); } /* add our primary domain */ diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 0cd77f7..c323520 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -34,6 +34,10 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND +static struct winbindd_domain * +add_trusted_domain_from_tdc(const struct winbindd_tdc_domain *tdc, + struct winbindd_methods *methods); + extern struct winbindd_methods cache_methods; /** @@ -119,14 +123,40 @@ static bool is_in_internal_domain(const struct dom_sid *sid) If the domain already exists in the list, return it and don't re-initialize. */ -static struct winbindd_domain *add_trusted_domain(const char *domain_name, const char *alt_name, - struct winbindd_methods *methods, - const struct dom_sid *sid) +static struct winbindd_domain * +add_trusted_domain(const char *domain_name, const char *alt_name, + struct winbindd_methods *methods, const struct dom_sid *sid) +{ + struct winbindd_tdc_domain tdc; + + ZERO_STRUCT(tdc); + + tdc.domain_name = domain_name; + tdc.dns_name = alt_name; + if (sid) { + sid_copy(, sid); + } + + return add_trusted_d
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 006d4c1 docs: Bump version up to 4.4. from d51a635 ctdb-build: Fix -O3 developer build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 006d4c1dc3a3446f8a1ae6593487a13e712396ed Author: Karolin Seeger <ksee...@samba.org> Date: Thu Jan 14 12:16:51 2016 +0100 docs: Bump version up to 4.4. Signed-off-by: Karolin Seeger <ksee...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Jan 19 21:34:14 CET 2016 on sn-devel-144 --- Summary of changes: docs-xml/manpages/dbwrap_tool.1.xml | 2 +- docs-xml/manpages/eventlogadm.8.xml | 2 +- docs-xml/manpages/findsmb.1.xml | 2 +- docs-xml/manpages/idmap_ad.8.xml | 2 +- docs-xml/manpages/idmap_autorid.8.xml| 2 +- docs-xml/manpages/idmap_hash.8.xml | 2 +- docs-xml/manpages/idmap_ldap.8.xml | 2 +- docs-xml/manpages/idmap_nss.8.xml| 2 +- docs-xml/manpages/idmap_rfc2307.8.xml| 2 +- docs-xml/manpages/idmap_rid.8.xml| 2 +- docs-xml/manpages/idmap_script.8.xml | 2 +- docs-xml/manpages/idmap_tdb.8.xml| 2 +- docs-xml/manpages/idmap_tdb2.8.xml | 2 +- docs-xml/manpages/libsmbclient.7.xml | 2 +- docs-xml/manpages/lmhosts.5.xml | 2 +- docs-xml/manpages/log2pcap.1.xml | 2 +- docs-xml/manpages/net.8.xml | 2 +- docs-xml/manpages/nmbd.8.xml | 2 +- docs-xml/manpages/nmblookup.1.xml| 2 +- docs-xml/manpages/ntlm_auth.1.xml| 2 +- docs-xml/manpages/pam_winbind.8.xml | 2 +- docs-xml/manpages/pam_winbind.conf.5.xml | 2 +- docs-xml/manpages/pdbedit.8.xml | 2 +- docs-xml/manpages/profiles.1.xml | 2 +- docs-xml/manpages/rpcclient.1.xml| 2 +- docs-xml/manpages/samba-regedit.8.xml| 2 +- docs-xml/manpages/samba-tool.8.xml | 2 +- docs-xml/manpages/samba.7.xml| 2 +- docs-xml/manpages/samba.8.xml| 2 +- docs-xml/manpages/sharesec.1.xml | 2 +- docs-xml/manpages/smb.conf.5.xml | 2 +- docs-xml/manpages/smbcacls.1.xml | 2 +- docs-xml/manpages/smbclient.1.xml| 2 +- docs-xml/manpages/smbcontrol.1.xml | 2 +- docs-xml/manpages/smbcquotas.1.xml | 2 +- docs-xml/manpages/smbd.8.xml | 2 +- docs-xml/manpages/smbget.1.xml | 2 +- docs-xml/manpages/smbgetrc.5.xml | 2 +- docs-xml/manpages/smbpasswd.5.xml| 2 +- docs-xml/manpages/smbpasswd.8.xml| 2 +- docs-xml/manpages/smbspool.8.xml | 2 +- docs-xml/manpages/smbstatus.1.xml| 2 +- docs-xml/manpages/smbtar.1.xml | 2 +- docs-xml/manpages/smbtree.1.xml | 2 +- docs-xml/manpages/testparm.1.xml | 2 +- docs-xml/manpages/vfs_acl_tdb.8.xml | 2 +- docs-xml/manpages/vfs_acl_xattr.8.xml| 2 +- docs-xml/manpages/vfs_aio_fork.8.xml | 2 +- docs-xml/manpages/vfs_aio_linux.8.xml| 2 +- docs-xml/manpages/vfs_aio_pthread.8.xml | 2 +- docs-xml/manpages/vfs_audit.8.xml| 2 +- docs-xml/manpages/vfs_btrfs.8.xml| 2 +- docs-xml/manpages/vfs_cacheprime.8.xml | 2 +- docs-xml/manpages/vfs_cap.8.xml | 2 +- docs-xml/manpages/vfs_catia.8.xml| 2 +- docs-xml/manpages/vfs_ceph.8.xml | 2 +- docs-xml/manpages/vfs_commit.8.xml | 2 +- docs-xml/manpages/vfs_crossrename.8.xml | 2 +- docs-xml/manpages/vfs_default_quota.8.xml| 2 +- docs-xml/manpages/vfs_dirsort.8.xml | 2 +- docs-xml/manpages/vfs_extd_audit.8.xml | 2 +- docs-xml/manpages/vfs_fake_perms.8.xml | 2 +- docs-xml/manpages/vfs_fileid.8.xml | 2 +- docs-xml/manpages/vfs_fruit.8.xml| 2 +- docs-xml/manpages/vfs_full_audit.8.xml | 2 +- docs-xml/manpages/vfs_glusterfs.8.xml| 2 +- docs-xml/manpages/vfs_gpfs.8.xml | 2 +- docs-xml/manpages/vfs_linux_xfs_sgid.8.xml | 2 +- docs-xml/manpages/vfs_media_harmony.8.xml| 2 +- docs-xml/manpages/vfs_netatalk.8.xml | 2 +- docs-xml/manpages/vfs_prealloc.8.xml | 2 +- docs-xml/manpages/vfs_preopen.8.xml | 2 +- docs-xml/manpages/vfs_readahead.8.xml| 2 +- docs-xml/manpages/vfs_readonly.8.xml | 2 +- docs-xml/manpages/vfs_recycle.8.xml | 2 +- docs-xml/manpages/vfs_shadow_copy.8.xml | 2 +- docs-xml/manpages/vfs_shadow_copy2.8.xml | 2 +- docs-xml/manpages/vfs_shell_snap.8.xml | 2 +- docs-xml/manpages/vfs_snapper.8.xml | 2 +- docs-xml/manp
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b74bef8 smbstatus: add support for SMB1 signing and CIFS UNIX extensions encryption via f955499 libcli/smb: add define SMB_ENCRYPTION_GSSAPI for CIFS encryption type via 1e60a3f smbstatus: show signing state of sessions and tcons via 8d8af47 s3:lib/conn_tdb: store the connection dialect via 9d28443 s3:smb2_server: add signing state tracking flags via fe5353c s3:smb2_server: convert signing_required bool to flags bitmap via 780743d smbstatus: show encrpytion state of tree connects via 83a557d smbstatus: align tree connect header and output via e0fc931 smbstatus: show encrpytion state of sessions via 5d75078 smbstatus: align session list header and ouput via 603f1de smbstatus: pass talloc context to traverse_connections via c2443d6 smbstatus: pass talloc context to traverse_sessionid via f59ef03 smbstatus: rework connection dialect printing via e501c73 s3:smb2_server: add encryption state tracking flags via 736cd36 s3:smb2_server: store encryption cipher in the channel via bfdffea s3:smb2_server: convert encryption desired and required bools to flags via 63a13f4 smbstatus: remove obsolete verbose message from ef269c9 substitute: Fix talloc_sub_basic for %G in the case of a local user. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b74bef8f7d3452f9a5aee4c934c9ff62afc2b2bd Author: Ralph Boehme <s...@samba.org> Date: Mon Nov 30 17:03:26 2015 +0100 smbstatus: add support for SMB1 signing and CIFS UNIX extensions encryption Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Jan 22 11:06:05 CET 2016 on sn-devel-144 commit f95549957ec73a67bee0093a17e84808adfe97de Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 3 12:17:50 2015 +0100 libcli/smb: add define SMB_ENCRYPTION_GSSAPI for CIFS encryption type Add a define for the CIFS UNIX extensions encryption type. We store this in smbXsrv_channel and use it in smbstatus for showing the CIFS/SMB2/SMB3 encryption cipher used. The SMB3 encryption cipher constants start at 1, carefully choosing the highest available bit for the CIFS UNIX extensions encryption cipher should avoid collisions and leaves room for many SMB3 ciphers in the future. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1e60a3f009649df4b22ce09828a9f3c82848cee0 Author: Ralph Boehme <s...@samba.org> Date: Mon Nov 30 11:20:43 2015 +0100 smbstatus: show signing state of sessions and tcons Show the signing state of sesssions tcons in smbstatus. This is SMB2/3 only. SMB1 support will be added in a later commit. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 8d8af479e22f3a8b394c72d36a49715cd5de6ca0 Author: Ralph Boehme <s...@samba.org> Date: Mon Nov 30 11:14:34 2015 +0100 s3:lib/conn_tdb: store the connection dialect This will be used in a subsequent commit that will print the signing cipher in smbstatus. We need the connection dialect for that. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 9d284431fc478bc6e19ac2d98b3c330800521ad3 Author: Ralph Boehme <s...@samba.org> Date: Sun Nov 15 11:12:34 2015 +0100 s3:smb2_server: add signing state tracking flags Add flags that track the signing state of all incoming and outgoing SMB2 packets and a helper function that can be used to determine whether a session of tcon can be considered "signed". Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit fe5353c82ee41ef620aa8340acd4748dd3bc795f Author: Ralph Boehme <s...@samba.org> Date: Sun Nov 15 10:49:38 2015 +0100 s3:smb2_server: convert signing_required bool to flags bitmap Use a flags bitmap for storing the signing state. This is in preparation of a subsequent patch that adds more flags to the bitmap. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 780743d1b28d92352fa91322f9a14dc86055ea08 Author: Ralph Boehme <s...@samba.org> Date: Mon Nov 9 17:26:51 2015 +0100 smbstatus: show encrpytion state of tree
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cd86f20 s4:torture: add SMB2 test for directory creation initial allocation size via 78ccbb0 s3:smbd: Ignore initial allocation size for directory creation from a1a8746 s3:smb2_sesssetup: implement SMB3 session bind (disabled) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cd86f20e245cc1b0cb3be5d6cb1b45c45e2a45a8 Author: Ralph Boehme <s...@samba.org> Date: Wed Jan 20 17:46:38 2016 +0100 s4:torture: add SMB2 test for directory creation initial allocation size Test that directory creation with an initial allocation size > 0 succeeds. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11684 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Jan 24 01:20:52 CET 2016 on sn-devel-144 commit 78ccbb07170c3e49a084d31434310f973e3d6158 Author: Ralph Boehme <s...@samba.org> Date: Wed Nov 25 15:23:26 2015 +0100 s3:smbd: Ignore initial allocation size for directory creation We reject directory creation with an initial allocation size > 0 with NT_STATUS_ACCESS_DENIED. Windows servers ignore the initial allocation size on directories. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11684 Pair-Programmed-With: Volker Lendecke <v...@samba.org> Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> --- Summary of changes: source3/smbd/open.c | 10 ++- source4/torture/smb2/create.c | 64 +++ 2 files changed, 67 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 3c0a7a3..ed0594b 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4708,15 +4708,11 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, /* Save the requested allocation size. */ if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) { - if (allocation_size - && (allocation_size > fsp->fsp_name->st.st_ex_size)) { + if ((allocation_size > fsp->fsp_name->st.st_ex_size) + && !(fsp->is_directory)) + { fsp->initial_allocation_size = smb_roundup( fsp->conn, allocation_size); - if (fsp->is_directory) { - /* Can't set allocation size on a directory. */ - status = NT_STATUS_ACCESS_DENIED; - goto fail; - } if (vfs_allocate_file_space( fsp, fsp->initial_allocation_size) == -1) { status = NT_STATUS_DISK_FULL; diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c index 68dbbc1..1275aa8 100644 --- a/source4/torture/smb2/create.c +++ b/source4/torture/smb2/create.c @@ -1666,6 +1666,69 @@ done: return ret; } +/* + test directory creation with an initial allocation size > 0 +*/ +static bool test_dir_alloc_size(struct torture_context *tctx, + struct smb2_tree *tree) +{ + bool ret = true; + const char *dname = DNAME "\\torture_alloc_size.dir"; + NTSTATUS status; + struct smb2_create c; + struct smb2_handle h1 = {{0}}, h2; + + torture_comment(tctx, "Checking initial allocation size on directories\n"); + + smb2_deltree(tree, dname); + + status = torture_smb2_testdir(tree, DNAME, ); + torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "torture_smb2_testdir failed"); + + ZERO_STRUCT(c); + c.in.create_disposition = NTCREATEX_DISP_CREATE; + c.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED; + c.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY; + c.in.share_access = NTCREATEX_SHARE_ACCESS_NONE; + c.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; + c.in.fname = dname; + /* +* An insanely large value so we can check the value is +* ignored: Samba either returns 0 (current behaviour), or, +* once vfswrap_get_alloc_size() is fixed to allow retrieving +* the allocated size for directories, returns +* smb_roundup(..., stat.st_size) which would be 1 MB by +* default. +* +* Windows returns 0 for emtpy directories, once directories +* have a few entries it starts replying with values > 0. +*/ + c.in.alloc_s
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6cff009 smbcacls: fix uninitialized variable from d905179 ctdb-client: Use ctdb_rec_buffer_init() to initialize ctdb_rec_buffer https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6cff00954763a7b266db5bab229b989e89abcee0 Author: Uri Simchoni <u...@samba.org> Date: Wed Jan 20 09:34:26 2016 +0200 smbcacls: fix uninitialized variable An uninitialized variable causes "numeric" mode to be used without the -n option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11682 Signed-off-by: Uri Simchoni <u...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Jan 20 12:12:12 CET 2016 on sn-devel-144 --- Summary of changes: source3/utils/smbcacls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 2596069..d50219c 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -791,7 +791,7 @@ int main(int argc, char *argv[]) poptContext pc; /* numeric is set when the user wants numeric SIDs and ACEs rather than going via LSA calls to resolve them */ - int numeric; + int numeric = 0; struct poptOption long_options[] = { POPT_AUTOHELP -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6018a77 s3:rpc_server: make it possible to build mdssvc as a shared module via 593abe5 s3:rpc_server: allow building RPC services as shared modules from 4164111 testprogs/blackbox/subunit: Fix testok https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6018a7756f9610ffd392371a3d5e5a433d7528a5 Author: Ralph Boehme <s...@samba.org> Date: Tue Oct 6 13:45:33 2015 +0200 s3:rpc_server: make it possible to build mdssvc as a shared module Allow building mdssvc RPC service as shared module: --with-shared-modules=rpc_mdssvc_module The default is to build it static. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Feb 21 22:28:41 CET 2016 on sn-devel-144 commit 593abe5f6bf3eefba35218214efb31907fa11bd7 Author: Ralph Boehme <s...@samba.org> Date: Sat Oct 24 10:50:43 2015 +0200 s3:rpc_server: allow building RPC services as shared modules This is the general RPC subsystem change, existing modules must be tweaked to support being loaded as a module. The next commit shows how to do this for the Spotlight RPC service. The general syntax is: --with-shared-modules=rpc_NAME_module Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> --- Summary of changes: source3/rpc_server/mdssd.c| 40 ++--- source3/rpc_server/mdssvc/srv_mdssvc_nt.c | 66 ++ source3/rpc_server/rpc_modules.c | 138 ++ source3/rpc_server/rpc_modules.h | 47 ++ source3/rpc_server/rpc_service_setup.c| 85 ++ source3/rpc_server/rpc_service_setup.h| 6 ++ source3/rpc_server/wscript_build | 32 --- source3/wscript | 3 +- 8 files changed, 310 insertions(+), 107 deletions(-) create mode 100644 source3/rpc_server/rpc_modules.c create mode 100644 source3/rpc_server/rpc_modules.h Changeset truncated at 500 lines: diff --git a/source3/rpc_server/mdssd.c b/source3/rpc_server/mdssd.c index f76d13e..e4c12cd 100644 --- a/source3/rpc_server/mdssd.c +++ b/source3/rpc_server/mdssd.c @@ -34,6 +34,7 @@ #include "rpc_server/rpc_server.h" #include "rpc_server/rpc_ep_register.h" #include "rpc_server/rpc_sock_helper.h" +#include "rpc_server/rpc_modules.h" #include "librpc/gen_ndr/srv_mdssvc.h" #include "rpc_server/mdssvc/srv_mdssvc_nt.h" @@ -91,7 +92,7 @@ static void mdssd_sig_term_handler(struct tevent_context *ev, void *siginfo, void *private_data) { - rpc_mdssvc_shutdown(); + shutdown_rpc_module("mdssvc"); DEBUG(0, ("termination signal\n")); exit(0); @@ -228,10 +229,9 @@ static bool mdssd_child_init(struct tevent_context *ev_ctx, messaging_register(msg_ctx, ev_ctx, MSG_PREFORK_PARENT_EVENT, parent_ping); - status = rpc_mdssvc_init(NULL); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("Failed to intialize RPC: %s\n", - nt_errstr(status))); + ok = init_rpc_module("mdssvc", NULL); + if (!ok) { + DBG_ERR("Failed to de-intialize RPC\n"); return false; } @@ -608,27 +608,6 @@ done: return ok; } -static bool mdssvc_init_cb(void *ptr) -{ - struct messaging_context *msg_ctx = - talloc_get_type_abort(ptr, struct messaging_context); - bool ok; - - ok = init_service_mdssvc(msg_ctx); - if (!ok) { - return false; - } - - return true; -} - -static bool mdssvc_shutdown_cb(void *ptr) -{ - shutdown_service_mdssvc(); - - return true; -} - void start_mdssd(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx) { @@ -638,7 +617,6 @@ void start_mdssd(struct tevent_context *ev_ctx, pid_t pid; int rc; bool ok; - struct rpc_srv_callbacks mdssvc_cb; DEBUG(1, ("Forking Metadata Service Daemon\n")); @@ -720,12 +698,8 @@ void start_mdssd(struct tevent_context *ev_ctx, messaging_register(msg_ctx, ev_ctx, MSG_PREFORK_CHILD_EVENT, child_ping); - mdssvc_cb.init = mdssvc_init_cb; - mdssvc_cb.shutdown = mdssvc_shutdown_cb; -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3e2af15 vfs_catia: Fix bug 11827, memleak via 8fedb37 vfs_catia: Align loop index with terminator from 494da27 examples/smb.conf.default: Fix typo in comment line: sever -> server https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3e2af1568d150de1cb12fef40580f4880ac787ff Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 10 12:51:15 2016 +0200 vfs_catia: Fix bug 11827, memleak add_srt should add the mappings to the linked list even if mappings==NULL (the default) Bug: https://bugzilla.samba.org/show_bug.cgi?id=11827 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Apr 11 14:25:59 CEST 2016 on sn-devel-144 commit 8fedb37369f52cdaf99000e5c5d20710d8b881e9 Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 10 13:09:29 2016 +0200 vfs_catia: Align loop index with terminator Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/modules/vfs_catia.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index c5d2b6a..f4c77d9 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -141,6 +141,9 @@ static struct share_mapping_entry *add_srt(int snum, const char **mappings) ret->snum = snum; + ret->next = srt_head; + srt_head = ret; + if (mappings) { ret->mappings = (struct char_mappings**) ((unsigned char*) ret + sizeof(struct share_mapping_entry)); @@ -176,9 +179,6 @@ static struct share_mapping_entry *add_srt(int snum, const char **mappings) } } - ret->next = srt_head; - srt_head = ret; - return ret; } @@ -805,7 +805,7 @@ catia_streaminfo(struct vfs_handle_struct *handle, { char *mapped_name = NULL; NTSTATUS status; - int i; + unsigned int i; struct smb_filename *catia_smb_fname = NULL; unsigned int num_streams = 0; struct stream_struct *streams = NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via acf6deb tdb: version 1.3.9 via ef3d837 tdb: rework cleanup logic in tdb_runtime_check_for_robust_mutexes() from 3e2af15 vfs_catia: Fix bug 11827, memleak https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit acf6deb6981f3e4043b51c1ed134362cc9112d2c Author: Stefan Metzmacher <me...@samba.org> Date: Tue Mar 29 18:01:32 2016 +0200 tdb: version 1.3.9 * avoid a race condition when checking for robust mutexes (bug #11808) * Remove use of strcpy in tdb test. * eliminate deprecation warnings in python tests * Only set public headers field when installing as a public library. * Refuse to load a database with hash size 0 * Fix various spelling errors Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Apr 11 18:48:26 CEST 2016 on sn-devel-144 commit ef3d837040f330a98f5bf4856af5a35a6de74616 Author: Uri Simchoni <u...@samba.org> Date: Tue Mar 29 21:36:17 2016 +0300 tdb: rework cleanup logic in tdb_runtime_check_for_robust_mutexes() The cleanup logic used six goto lables, at least I'm not able to make sane modifications to such a beast. By using state flags that track which objects are initialized and need cleanup, we get rid of the goto labels. It comes at a cost though: you have to be careful to correctly set the cleanup flags. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> --- Summary of changes: lib/tdb/ABI/{tdb-1.3.5.sigs => tdb-1.3.9.sigs} | 0 lib/tdb/common/mutex.c | 82 ++ lib/tdb/wscript| 2 +- 3 files changed, 46 insertions(+), 38 deletions(-) copy lib/tdb/ABI/{tdb-1.3.5.sigs => tdb-1.3.9.sigs} (100%) Changeset truncated at 500 lines: diff --git a/lib/tdb/ABI/tdb-1.3.5.sigs b/lib/tdb/ABI/tdb-1.3.9.sigs similarity index 100% copy from lib/tdb/ABI/tdb-1.3.5.sigs copy to lib/tdb/ABI/tdb-1.3.9.sigs diff --git a/lib/tdb/common/mutex.c b/lib/tdb/common/mutex.c index e57031d..d8167be 100644 --- a/lib/tdb/common/mutex.c +++ b/lib/tdb/common/mutex.c @@ -766,8 +766,8 @@ static void tdb_robust_mutex_handler(int sig) _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) { - void *ptr; - pthread_mutex_t *m; + void *ptr = NULL; + pthread_mutex_t *m = NULL; pthread_mutexattr_t ma; int ret = 1; int pipe_down[2] = { -1, -1 }; @@ -777,6 +777,8 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) bool ok; static bool initialized; sigset_t mask, old_mask, suspend_mask; + bool cleanup_ma = false; + bool cleanup_sigmask = false; if (initialized) { return tdb_mutex_locking_cached; @@ -796,37 +798,38 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) if (ptr == MAP_FAILED) { return false; } - m = (pthread_mutex_t *)ptr; ret = pipe(pipe_down); if (ret != 0) { - goto cleanup_mmap; + goto cleanup; } ret = pipe(pipe_up); if (ret != 0) { - goto cleanup_pipe; + goto cleanup; } ret = pthread_mutexattr_init(); if (ret != 0) { - goto cleanup_pipe; + goto cleanup; } + cleanup_ma = true; ret = pthread_mutexattr_settype(, PTHREAD_MUTEX_ERRORCHECK); if (ret != 0) { - goto cleanup_ma; + goto cleanup; } ret = pthread_mutexattr_setpshared(, PTHREAD_PROCESS_SHARED); if (ret != 0) { - goto cleanup_ma; + goto cleanup; } ret = pthread_mutexattr_setrobust(, PTHREAD_MUTEX_ROBUST); if (ret != 0) { - goto cleanup_ma; + goto cleanup; } - ret = pthread_mutex_init(m, ); + ret = pthread_mutex_init(ptr, ); if (ret != 0) { - goto cleanup_ma; + goto cleanup; } + m = (pthread_mutex_t *)ptr; /* * Block SIGCHLD so we can atomically wait for it later with @@ -836,14 +839,15 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) sigaddset(, SIGCHLD); ret = pthread_sigmask(SIG_BLOCK, , _mask); if (ret != 0) { - goto cleanup_m; + goto cleanup; } + cleanup_sigmask = true; suspend_mask = old_mask; sigdelset(_mask, SIGCHLD); if (tdb_robust_mutex_setup_sigchild(tdb_robust_mutex_handler,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8e870dd vfs: remove an outdate comment from the files_struct definition via 8e88b97 VFS: Modify chmod_acl to take a const struct smb_filename * instead of const char * via ac8fba6 VFS: Modify chmod to take a const struct smb_filename * instead of const char * from d7ca174 s3:smbd: add negprot remote arch detection for OSX https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8e870dd121f82f359abfdc456c015b096094a1fb Author: Michael Adam <ob...@samba.org> Date: Wed Mar 2 21:54:58 2016 +0100 vfs: remove an outdate comment from the files_struct definition Leases are implemented since a while... Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Mar 3 12:16:47 CET 2016 on sn-devel-144 commit 8e88b9783dec751fe5bd4750923b62b978080885 Author: Jeremy Allison <j...@samba.org> Date: Tue Mar 1 17:25:25 2016 -0800 VFS: Modify chmod_acl to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit ac8fba6ef7093836eb6988e749325b69e7a7fde1 Author: Jeremy Allison <j...@samba.org> Date: Tue Mar 1 16:20:25 2016 -0800 VFS: Modify chmod to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: examples/VFS/skel_opaque.c | 9 -- examples/VFS/skel_transparent.c | 13 +--- source3/include/vfs.h| 24 ++- source3/include/vfs_macros.h | 16 +- source3/modules/vfs_acl_common.c | 10 +++--- source3/modules/vfs_audit.c | 16 ++ source3/modules/vfs_cap.c| 53 +++ source3/modules/vfs_catia.c | 49 - source3/modules/vfs_ceph.c | 20 +--- source3/modules/vfs_default.c| 21 + source3/modules/vfs_extd_audit.c | 20 +++- source3/modules/vfs_fruit.c | 21 ++--- source3/modules/vfs_full_audit.c | 16 ++ source3/modules/vfs_glusterfs.c | 5 +-- source3/modules/vfs_gpfs.c | 14 ++--- source3/modules/vfs_linux_xfs_sgid.c | 5 +-- source3/modules/vfs_media_harmony.c | 50 +- source3/modules/vfs_netatalk.c | 20 source3/modules/vfs_shadow_copy2.c | 60 +++- source3/modules/vfs_snapper.c| 58 ++ source3/modules/vfs_time_audit.c | 18 +++ source3/modules/vfs_unityed_media.c | 42 ++--- source3/smbd/dosmode.c | 2 +- source3/smbd/open.c | 2 +- source3/smbd/posix_acls.c| 4 +-- source3/smbd/trans2.c| 2 +- source3/smbd/vfs.c | 14 + source3/torture/cmd_vfs.c| 24 +-- 28 files changed, 426 insertions(+), 182 deletions(-) Changeset truncated at 500 lines: diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 4ffdacc..e7bb645 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -367,7 +367,9 @@ static int skel_unlink(vfs_handle_struct *handle, return -1; } -static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode) +static int skel_chmod(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + mode_t mode) { errno = ENOSYS; return -1; @@ -690,8 +692,9 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, return NT_STATUS_NOT_IMPLEMENTED; } -static int skel_chmod_acl(vfs_handle_struct *handle, const char *name, - mode_t mode) +static int skel_chmod_acl(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + mode_t mode) { errno = ENOSYS; return -1; diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 5d3ffb7..fe2356a 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -475,9 +475,11 @@ static int skel_unlink(vfs_handle_struct *handle, return SMB_VFS_NEXT_UNLINK(handle, smb_fname); } -static int skel_chmod(vfs_handle_struct *handle, const char *path, m
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f4b4872 s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *. via f67d116 s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *. via fc122d9 s3: smbd: Change open_streams_for_delete() to static. via a3856cb s3: smbd: Change delete_all_streams() to take a const struct smb_filename *. via 859d978 s3: VFS: vfs_fruit. If we have an fsp, use it in preference to a pathname in vfs_streaminfo. via dbcdacc lib: Avoid a gencache_parse when setting a delete marker via 639b3ca lib: Avoid looking at fcntl'ed gencache.tdb via b3dd6fd lib: Simplify gencache_pull_timeout callers via 6797014 lib: Make gencache_pull_timeout look at uint8_t via 1ff902f lib: Remove memcache from gencache via b6f90f7 lib: Fix a typo in gencache via f0e3515 lib: Simplify gencache_del via f857f30 lib: skip deleted entries in gencache_iterate from b73235f krb5_wrap: Do not use deprecated KRB5 functions https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f4b48729823b0a32d53abaeba2bbafa54a36a11c Author: Jeremy Allison <j...@samba.org> Date: Fri Mar 4 14:16:13 2016 -0800 s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *. Prepare for changing vfs_streaminfo to do the same. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Mar 7 21:12:56 CET 2016 on sn-devel-144 commit f67d11676fed97a6c1ad468e22bad8c5d8fe24f5 Author: Jeremy Allison <j...@samba.org> Date: Fri Mar 4 14:16:13 2016 -0800 s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *. Prepare for changing vfs_streaminfo to do the same. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit fc122d92550ce39efbf019dcb01f3a54e8bfa89c Author: Jeremy Allison <j...@samba.org> Date: Fri Mar 4 14:13:22 2016 -0800 s3: smbd: Change open_streams_for_delete() to static. Not used outside of open.c Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit a3856cbf893a39d88b064c882dc9236f33cdba27 Author: Jeremy Allison <j...@samba.org> Date: Fri Mar 4 14:07:04 2016 -0800 s3: smbd: Change delete_all_streams() to take a const struct smb_filename *. Prepare for changing the interface to vfs_streaminfo(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 859d9784ba2c7aeaebbe31292e20b98c7e827c2f Author: Jeremy Allison <j...@samba.org> Date: Fri Mar 4 14:01:47 2016 -0800 s3: VFS: vfs_fruit. If we have an fsp, use it in preference to a pathname in vfs_streaminfo. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit dbcdacc58df77c87f7e6f919208cfd141e37b2d4 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 3 17:39:09 2016 +0100 lib: Avoid a gencache_parse when setting a delete marker We know that we want to put something into _notrans, no point in doing another round trip into gencache.tdb. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 639b3ca48a8dc4e853aa414ba175768413cb3aa3 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 3 17:41:34 2016 +0100 lib: Avoid looking at fcntl'ed gencache.tdb gencache_notrans.tdb is much cheaper to look at than gencache.tdb because it's mutexed and thus avoids expensive fcntl locks. This patch aggressively uses the shared _notrans tdb for both positive and negative entries. It's a replacement for the memcache copy in every process that was removed a few patches ago. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit b3dd6fd8a4d77cbb7e4e1110204fb4ddf9d8caf8 Author: Volker Lendecke <v...@samba.org> Date: Wed Jul 22 16:03:47 2015 +0200 lib: Simplify gencache_pull_timeout callers gencache_pull_timeout used to point at the "/" right after the timeout. None of the callers was interested in the "/", they are interested in the payload. Increment the endpointer in gencache_pull_timeout and rename it. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 6797014d4509b7b243a50e9d2cac88007ec09dc4 Author: Volker Lendecke <v...@samba.org> Date: Wed Jul 22 16:00:03 2015 +0200 lib: Mak
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 937d60f smbd: Clean up the logic inside vfs_chown_fsp() to prevent future security issues. via 8b4a38b VFS: Modify lchown to take a const struct smb_filename * instead of const char * via d1f26bc VFS: Modify chown to take a const struct smb_filename * instead of const char * via 9678611 VFS: vfs_netatalk. Fix wrong VFS call used inside atalk_lchown() from 9ee4678 vfs_glusterfs: Fix use after free in AIO callback. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 937d60f2e24fa27dca562306022de1f4855f047c Author: Jeremy Allison <j...@samba.org> Date: Thu Mar 3 15:29:10 2016 -0800 smbd: Clean up the logic inside vfs_chown_fsp() to prevent future security issues. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Mar 5 12:53:11 CET 2016 on sn-devel-144 commit 8b4a38b4c94bb3617d0b6444125d9e24f41891cf Author: Jeremy Allison <j...@samba.org> Date: Thu Mar 3 14:34:57 2016 -0800 VFS: Modify lchown to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit d1f26bc43228843f57b1ee23c1690306d6440865 Author: Jeremy Allison <j...@samba.org> Date: Thu Mar 3 11:54:23 2016 -0800 VFS: Modify chown to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 9678611d82d518bb16402a827cbf13769a5f0333 Author: Jeremy Allison <j...@samba.org> Date: Thu Mar 3 11:53:39 2016 -0800 VFS: vfs_netatalk. Fix wrong VFS call used inside atalk_lchown() Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: examples/VFS/skel_opaque.c | 12 -- examples/VFS/skel_transparent.c | 16 +--- source3/include/vfs.h | 26 ++--- source3/include/vfs_macros.h| 16 source3/modules/vfs_cap.c | 56 --- source3/modules/vfs_catia.c | 50 +++- source3/modules/vfs_ceph.c | 27 + source3/modules/vfs_default.c | 14 +-- source3/modules/vfs_fake_acls.c | 38 --- source3/modules/vfs_fruit.c | 24 +--- source3/modules/vfs_full_audit.c| 16 +--- source3/modules/vfs_glusterfs.c | 12 -- source3/modules/vfs_media_harmony.c | 50 +++- source3/modules/vfs_netatalk.c | 22 ++- source3/modules/vfs_shadow_copy2.c | 30 +++ source3/modules/vfs_snapper.c | 33 source3/modules/vfs_time_audit.c| 20 +++--- source3/modules/vfs_unityed_media.c | 44 +++-- source3/smbd/open.c | 6 ++- source3/smbd/pysmbd.c | 14 ++- source3/smbd/trans2.c | 4 +- source3/smbd/vfs.c | 76 +++-- source3/torture/cmd_vfs.c | 12 +- 23 files changed, 431 insertions(+), 187 deletions(-) Changeset truncated at 500 lines: diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index e7bb645..457881d 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -382,8 +382,10 @@ static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, return -1; } -static int skel_chown(vfs_handle_struct *handle, const char *path, - uid_t uid, gid_t gid) +static int skel_chown(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uid_t uid, + gid_t gid) { errno = ENOSYS; return -1; @@ -396,8 +398,10 @@ static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, return -1; } -static int skel_lchown(vfs_handle_struct *handle, const char *path, - uid_t uid, gid_t gid) +static int skel_lchown(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uid_t uid, + gid_t gid) { errno = ENOSYS; return -1; diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index fe2356a..55b1ed6 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -488,10 +488,12 @@ static
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 247481c s3: smbd: Change dptr_create() to take a const struct smb_filename * instead of const char *. via 66ce80c s3: smbd: In call_trans2findfirst() all use of ctx is really talloc_tos(). via 3203eb6 s3: smbd: Change OpenDir() to take a struct smb_filename *, not a char *. via 852cce9 s3: smbd: Change the internals of the private struct smb_Dir. via c74ae37 VFS: Modify opendir to take a const struct smb_filename * instead of const char * from fb4778f passdb: add linefeed to debug message https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 247481c12c048c10471895e00e3b7501e1362842 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 26 16:35:17 2016 -0800 s3: smbd: Change dptr_create() to take a const struct smb_filename * instead of const char *. Also internally change path storage inside struct dptr_struct to a struct smb_filename *. This allows me to remove several of the synthetic_smb_fname() calls I had to add in the previous patches, as we're now dealing with struct smb_filename * throughout the dptr and OpenDir code. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Mar 1 18:34:24 CET 2016 on sn-devel-144 commit 66ce80c6d94ca407dc54d318c3956fc037672985 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 26 16:31:10 2016 -0800 s3: smbd: In call_trans2findfirst() all use of ctx is really talloc_tos(). Use talloc_tos() explicitly to make this clear. Will help make the next commit clearer. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 3203eb66d9fd85e8e58c2f0c658eb3483dcf0870 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 26 15:55:14 2016 -0800 s3: smbd: Change OpenDir() to take a struct smb_filename *, not a char *. Enhances plumbing to remove lp_posix_pathnames() later. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 852cce993047436353bc2e977b2a3d0886dc74b5 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 26 14:59:51 2016 -0800 s3: smbd: Change the internals of the private struct smb_Dir. Store a struct smb_filename *, not a char *. This will allow us to change the interface to OpenDir() in the next commit to pass in a struct smb_filename *, not a char *. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit c74ae37fe6df0c7a80733e6ed3ae8844345743a5 Author: Jeremy Allison <j...@samba.org> Date: Fri Feb 26 14:53:12 2016 -0800 VFS: Modify opendir to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: examples/VFS/skel_opaque.c | 6 +- examples/VFS/skel_transparent.c | 8 +- source3/include/vfs.h | 12 ++- source3/include/vfs_macros.h| 8 +- source3/modules/vfs_audit.c | 9 ++- source3/modules/vfs_cap.c | 19 - source3/modules/vfs_catia.c | 27 +-- source3/modules/vfs_default.c | 7 +- source3/modules/vfs_dirsort.c | 9 ++- source3/modules/vfs_extd_audit.c| 11 ++- source3/modules/vfs_full_audit.c| 9 ++- source3/modules/vfs_media_harmony.c | 24 -- source3/modules/vfs_netatalk.c | 7 +- source3/modules/vfs_shadow_copy.c | 25 +- source3/modules/vfs_shadow_copy2.c | 40 -- source3/modules/vfs_snapper.c | 25 -- source3/modules/vfs_streams_depot.c | 14 +++- source3/modules/vfs_time_audit.c| 6 +- source3/modules/vfs_unityed_media.c | 23 -- source3/smbd/close.c| 4 +- source3/smbd/dir.c | 154 +++- source3/smbd/filename.c | 15 +++- source3/smbd/msdfs.c| 24 +- source3/smbd/proto.h| 17 +++- source3/smbd/reply.c| 58 +- source3/smbd/smb2_query_directory.c | 2 +- source3/smbd/trans2.c | 26 +++--- source3/smbd/vfs.c | 7 +- source3/torture/cmd_vfs.c | 28 ++- 29 files changed, 466 insertions(+), 158 deletion
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a7a77e2 tdb: avoid a race condition when checking for robust mutexes from aa81199 vfs_glusterfs: call clock_gettime_mono() only on profile-enabled build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a7a77e2f43a5baa00e104037b20487f28aabe866 Author: Ralph Boehme <s...@samba.org> Date: Sat Mar 26 12:43:55 2016 +0100 tdb: avoid a race condition when checking for robust mutexes This fixes a race between calling waitpid() in two places (SIGCHLD the signal handler and the rendezvous code when waiting for the child to terminate), by - blocking SIGCHLD before installing our signal handler - in the rendezvous code call sigssuspend() which unblocks SIGCHLD and suspends the thread and waits for signal delivery BUG: https://bugzilla.samba.org/show_bug.cgi?id=11808 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Uri Simchoni <u...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Mar 29 16:04:19 CEST 2016 on sn-devel-144 --- Summary of changes: lib/tdb/common/mutex.c | 60 +++--- 1 file changed, 32 insertions(+), 28 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/mutex.c b/lib/tdb/common/mutex.c index fae43d4..e57031d 100644 --- a/lib/tdb/common/mutex.c +++ b/lib/tdb/common/mutex.c @@ -775,8 +775,8 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) ssize_t nread; char c = 0; bool ok; - int status; static bool initialized; + sigset_t mask, old_mask, suspend_mask; if (initialized) { return tdb_mutex_locking_cached; @@ -828,9 +828,22 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) goto cleanup_ma; } + /* +* Block SIGCHLD so we can atomically wait for it later with +* sigsuspend() +*/ + sigemptyset(); + sigaddset(, SIGCHLD); + ret = pthread_sigmask(SIG_BLOCK, , _mask); + if (ret != 0) { + goto cleanup_m; + } + suspend_mask = old_mask; + sigdelset(_mask, SIGCHLD); + if (tdb_robust_mutex_setup_sigchild(tdb_robust_mutex_handler, _robust_mutext_old_handler) == false) { - goto cleanup_ma; + goto cleanup_sigmask; } tdb_robust_mutex_pid = fork(); @@ -884,16 +897,9 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) } while (tdb_robust_mutex_pid > 0) { - pid_t pid; - - errno = 0; - pid = waitpid(tdb_robust_mutex_pid, , 0); - if (pid == tdb_robust_mutex_pid) { - tdb_robust_mutex_pid = -1; - break; - } - if (pid == -1 && errno != EINTR) { - goto cleanup_child; + ret = sigsuspend(_mask); + if (ret != -1 || errno != EINTR) { + abort(); } } tdb_robust_mutex_setup_sigchild(tdb_robust_mutext_old_handler, NULL); @@ -903,46 +909,44 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) if (ret == 0) { pthread_mutex_unlock(m); } - goto cleanup_m; + goto cleanup_sigmask; } ret = pthread_mutex_consistent(m); if (ret != 0) { - goto cleanup_m; + goto cleanup_sigmask; } ret = pthread_mutex_trylock(m); if (ret != EDEADLK) { pthread_mutex_unlock(m); - goto cleanup_m; + goto cleanup_sigmask; } ret = pthread_mutex_unlock(m); if (ret != 0) { - goto cleanup_m; + goto cleanup_sigmask; } tdb_mutex_locking_cached = true; - goto cleanup_m; + goto cleanup_sigmask; cleanup_child: while (tdb_robust_mutex_pid > 0) { - pid_t pid; - kill(tdb_robust_mutex_pid, SIGKILL); - - errno = 0; - pid = waitpid(tdb_robust_mutex_pid, , 0); - if (pid == tdb_robust_mutex_pid) { - tdb_robust_mutex_pid = -1; - break; - } - if (pid == -1 && errno != EINTR) { - break; + ret = sigsuspend(_mask); + if (ret != -1 || errno != EINTR) { + abort(); } } + cleanup_sig_child: tdb_robust_mutex_setup_sigchild(tdb_robust_mutext_old_handler, NULL); +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5291462 winbind: Fix CID 1357100 Unchecked return value from aab2f39 autobuild: Return the last 50 log lines https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5291462bd8a683b2d21b5f21ad73f84939aa2d67 Author: Volker Lendecke <v...@samba.org> Date: Tue Mar 22 11:24:23 2016 +0100 winbind: Fix CID 1357100 Unchecked return value Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Mar 22 15:49:14 CET 2016 on sn-devel-144 --- Summary of changes: source3/winbindd/idmap.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index faf0df2..7eb7e58 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -126,8 +126,12 @@ bool domain_has_idmap_config(const char *domname) char *config_option; const char *range = NULL; const char *backend = NULL; + bool ok; - idmap_init(); + ok = idmap_init(); + if (!ok) { + return false; + } for (i=0; i<num_domains; i++) { if (strequal(idmap_domains[i]->name, domname)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ad5a4a9 ctdbd_conn: Make "cstatus" int32_t via 2bd1bcf ctdbd_conn: Add some more debug info via aad53cf ctdbd: Use talloc_memdup where appropriate via 445ad6e ctdbd_conn: Use ctdbd_control_local where possible via f0525d4 ctdbd_conn: Avoid "includes.h" via d36def8 lib: serverid.h references struct server_id via ff72a8a lib: Move ctdbd_init_connection out of ctdbd_traverse() via 966cef0 ctdbd_conn: Remove unused ctdbd_messaging_connection via e2d39ae lib: Use ctdbd_init_connection in messaging_ctdbd_init via 1ff4002 ctdbd_conn: Make ctdbd_init_connection public via b1277ac ctdbd_conn: Use ctdbd_init_connection in ctdbd_probe via 14beae7 ctdbd_conn: Use sys_poll_intr via d59ae31 ctdbd_conn: Adapt loop counter's type to the loop limit from 39bbd40 fix Invalid read of size 8 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ad5a4a9e369248789b08f8ccad51d4d42df71bc9 Author: Volker Lendecke <v...@samba.org> Date: Thu Apr 21 13:31:39 2016 +0200 ctdbd_conn: Make "cstatus" int32_t This converts the "cstatus" parameter of ctdbd_control_local to what it is defined as in the packet: int32_t. It was used inconsistently throughout the code. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Apr 25 21:54:24 CEST 2016 on sn-devel-144 commit 2bd1bcf50c6d9e8fd486262742268f3208c0680d Author: Volker Lendecke <v...@samba.org> Date: Thu Apr 21 11:21:26 2016 +0200 ctdbd_conn: Add some more debug info Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit aad53cf59524355df757c9de7dca081da75b76d0 Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 4 16:23:09 2016 +0200 ctdbd: Use talloc_memdup where appropriate 40 bytes .text less ;-) Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 445ad6e8e42b6fb82aa736f7db904505175e8daf Author: Volker Lendecke <v...@samba.org> Date: Wed Apr 13 18:47:46 2016 +0200 ctdbd_conn: Use ctdbd_control_local where possible Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f0525d4e07a5d741746f539a508668abeb14f0d5 Author: Volker Lendecke <v...@samba.org> Date: Fri Apr 8 16:14:33 2016 +0200 ctdbd_conn: Avoid "includes.h" Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit d36def84aec84f63a92538726bed91dc197f9743 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 07:26:34 2016 +0200 lib: serverid.h references struct server_id Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit ff72a8ae82ec2e7760d86bc7ea95837489a93df2 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 17:30:11 2016 +0200 lib: Move ctdbd_init_connection out of ctdbd_traverse() 2 effects: This removes the [un]become_root calls from ctdbd_conn, and it makes it possible to re-use the traversal connections, should the setup/teardown become a problem in the future. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 966cef0d41d85d2753d3664a0e555bb444cef2e3 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 10:14:11 2016 +0200 ctdbd_conn: Remove unused ctdbd_messaging_connection Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit e2d39aefae41da5a5614c5061d2aa30f40c5d65d Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 10:11:44 2016 +0200 lib: Use ctdbd_init_connection in messaging_ctdbd_init Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 1ff4002b23d7ff1d9de145f1f356d9a729af9ae9 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 10:09:35 2016 +0200 ctdbd_conn: Make ctdbd_init_connection public Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit b1277acb44a51d92af0e7d7e59856606b8806192 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 5 09:52:01 2016 +0200 ctdbd_conn: Use ctdbd_init_connection in ctdbd_probe We are only interested in ctdb connectability here. ctdbd_messaging_connection() does a few more calls not requ
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f9099d3 s3-libads: Fix compilation with MIT Kerberos from 2a81893 ctdb-tests: Fix CID 1358704 use of "=" where "==" may have been intended https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f9099d3c469efd4085ca0b0e81941c77f1b61c4f Author: Andreas Schneider <a...@samba.org> Date: Tue Apr 26 15:45:17 2016 +0200 s3-libads: Fix compilation with MIT Kerberos ENCTYPE_NULL is defined by the RFC and used by MIT Kerberos. Heimdal also provides ENCTYPE_NULL. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Apr 26 22:47:19 CEST 2016 on sn-devel-144 --- Summary of changes: source3/libads/kerberos_keytab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 8a3363c..731895e 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -280,7 +280,7 @@ int ads_keytab_flush(ADS_STRUCT *ads) ret = smb_krb5_kt_seek_and_delete_old_entries(context, keytab, kvno, - KRB5_ENCTYPE_NULL, + ENCTYPE_NULL, NULL, NULL, true, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4158729 selfttest: add common_test_fns.inc from f667ff6 ctdb-doc: Document cluster mutex helper API https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 415872990eadaa7d5b999ecb3028e0cd422b2e8a Author: Richard Sharpe <rsha...@samba.org> Date: Sun Apr 24 11:09:05 2016 -0700 selfttest: add common_test_fns.inc Create an include file of common functions used by several of the blackbox tests in testprogs and then make all the users of test_smbclient include that file so we can eliminate duplicate code. We pass the UNC to the test_smbclient function. Signed-off-by: Richard Sharpe <rsha...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Apr 28 16:50:35 CEST 2016 on sn-devel-144 --- Summary of changes: testprogs/blackbox/common_test_fns.inc | 20 + testprogs/blackbox/test_chgdcpass.sh | 27 +++- testprogs/blackbox/test_export_keytab_heimdal.sh | 22 ++ testprogs/blackbox/test_kinit_heimdal.sh | 54 +--- testprogs/blackbox/test_kinit_trusts_heimdal.sh | 37 +--- testprogs/blackbox/test_passwords.sh | 36 +--- testprogs/blackbox/test_pdbtest.sh | 30 - testprogs/blackbox/test_pkinit_heimdal.sh| 20 ++--- 8 files changed, 84 insertions(+), 162 deletions(-) create mode 100755 testprogs/blackbox/common_test_fns.inc Changeset truncated at 500 lines: diff --git a/testprogs/blackbox/common_test_fns.inc b/testprogs/blackbox/common_test_fns.inc new file mode 100755 index 000..ef21834 --- /dev/null +++ b/testprogs/blackbox/common_test_fns.inc @@ -0,0 +1,20 @@ +# Common tests +# Pulled out of existing tests to prevent duplication. +# +test_smbclient() { + name="$1" + cmd="$2" + unc="$3" + shift + shift + shift + echo "test: $name" + $VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ + status=$? + if [ x$status = x0 ]; then + echo "success: $name" + else + echo "failure: $name" + fi + return $status +} diff --git a/testprogs/blackbox/test_chgdcpass.sh b/testprogs/blackbox/test_chgdcpass.sh index ca7987e..120f002 100755 --- a/testprogs/blackbox/test_chgdcpass.sh +++ b/testprogs/blackbox/test_chgdcpass.sh @@ -32,23 +32,10 @@ fi machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache" -. `dirname $0`/subunit.sh +unc="//$SERVER/tmp" -test_smbclient() { - name="$1" - cmd="$2" - shift - shift - echo "test: $name" - $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" $@ - status=$? - if [ x$status = x0 ]; then - echo "success: $name" - else - echo "failure: $name" - fi - return $status -} +. `dirname $0`/subunit.sh +. `dirname $0`/common_test_fns.inc test_drs() { function="$1" @@ -75,7 +62,7 @@ rm -f $KRB5CCNAME testit "kinit with keytab" $samba4kinit $enctype -t $PROVDIR/private/secrets.keytab --use-keytab $USERNAME || failed=`expr $failed + 1` #This is important because it puts the ticket for the old KVNO and password into a local ccache -test_smbclient "Test login with kerberos ccache before password change" 'ls' -k yes || failed=`expr $failed + 1` +test_smbclient "Test login with kerberos ccache before password change" 'ls' "$unc" -k yes || failed=`expr $failed + 1` #check that drs bind works before we change the password (prime the ccache) test_drs bind "Test drs bind with with kerberos ccache" || failed=`expr $failed + 1` @@ -86,7 +73,7 @@ test_drs options "Test drs options with with kerberos ccache" || failed=`expr $f testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` #This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed -test_smbclient "Test login with kerberos ccache after password change" 'ls' -k yes || failed=`expr $failed + 1` +test_smbclient "Test login with kerberos ccache after password change" 'ls' "$unc" -k yes || failed=`expr $failed + 1` #check that drs bind works after we change the password test_drs bind "Test drs bind with new password" || failed=`expr $failed + 1` @@ -98,7 +85,7 @@ test
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 404acae dbwrap_ctdb: Remove get_my_vnn dependency via 1dcdd86 dbwrap_ctdb: Fix some 32-bit hickups via 3bd368b ctdbd_conn: Remove messages.h dependency via 46be182 dbwrap: Add "msg_ctx" to db_open_ctdb via 3fe3226 dbwrap_ctdb: Pass in ctdbd_connection via 0a367f5 dbwrap_ctdb: Add "conn" to db_ctdb_ctx via e3fcf90 dbwrap_ctdb: Align loop index with terminator via 069d79b lib: Move async message handling out of ctdbd_conn via 33c8861 ctdbd_conn: Expose ctdb socket readability handler via 120f867 ctdbd_conn: "sockname" is not needed anymore via 0b8896d ctdbd_conn: Simplify two DEBUGs via a1309d5 ctdbd_conn: remove ctdb_processes_exist from b3b2fee python/tests/dns_forwarder: fix for python 2.6 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 404acae05c9fa8a537e3dbf6480caa266940ec0a Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 11 16:31:25 2016 +0200 dbwrap_ctdb: Remove get_my_vnn dependency Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue May 17 16:54:36 CEST 2016 on sn-devel-144 commit 1dcdd862e58bb23927a9778166c1d91db513532a Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 11 16:07:12 2016 +0200 dbwrap_ctdb: Fix some 32-bit hickups Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 3bd368b12dc5b4bd6500a4bb49f2d9d536580d59 Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 24 17:39:44 2016 +0200 ctdbd_conn: Remove messages.h dependency This removes a circular dependency Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 46be182ccb931d689f85b0a5ef6e25cb886b59ce Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 24 17:37:07 2016 +0200 dbwrap: Add "msg_ctx" to db_open_ctdb Another step towards making ctdbd_conn.c independent of messages.c. No call to ctdb_conn_msg_ctx() anymore Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 3fe3226daa8488e0fa787c40359c3401b6f05fc0 Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 11 16:20:32 2016 +0200 dbwrap_ctdb: Pass in ctdbd_connection This removes one circular dependency of dbwrap_ctdb to messages.c: No call to messaging_ctdbd_connection() anymore from dbwrap_ctdb.c. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 0a367f5fd4b0fa1971052bc6c88ab511b03716e2 Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 11 16:01:07 2016 +0200 dbwrap_ctdb: Add "conn" to db_ctdb_ctx This minimizes the use of messaging_ctdbd_connection() to db_open_ctx(). Next step will move this into db_open(). Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit e3fcf90f1553ca0d27d42225d1924664c4d8901e Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 11 15:45:49 2016 +0200 dbwrap_ctdb: Align loop index with terminator Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 069d79bbd9ad3f37e9b1a89372301179f726300d Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 24 17:37:33 2016 +0200 lib: Move async message handling out of ctdbd_conn messages_ctdbd.c is the code that is genuinely interested in async messages from ctdb, so let it take care of them. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 33c8861fc5ed828fe8e1d5b752f09a0c0ea4cc55 Author: Volker Lendecke <v...@samba.org> Date: Sun Apr 24 17:36:00 2016 +0200 ctdbd_conn: Expose ctdb socket readability handler This will obsolete ctdbd_register_msg_ctx soon Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 120f86755abd4919ae7a27de6071878d72fe279b Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 19 21:40:40 2016 +0200 ctdbd_conn: "sockname" is not needed anymore Previously it was used in ctdb_traverse(), but with ff72a8a this is no longer the case Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 0b8896d51e1db5543048d2ccd02d45c7b17ab12c Author: Volker Lendecke <v...@samba
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0f6d51f s3:libnet:libnet_join: add netbios aliases as SPNs from f85b30a s3:smbd remove todo comments https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0f6d51f34baa816b6ec422c8bc28687f0a3073de Author: Ralph Boehme <s...@samba.org> Date: Tue Apr 26 17:21:46 2016 +0200 s3:libnet:libnet_join: add netbios aliases as SPNs Add all listed smb.conf netbios aliases as SPNs to the machine account: HOST/NETBIOS_ALIAS@REALM and HOST/netbios_alias.dnsdomain.name@REALM Bug: https://bugzilla.samba.org/show_bug.cgi?id=1703 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed May 4 17:58:05 CEST 2016 on sn-devel-144 --- Summary of changes: source3/libnet/libnet_join.c | 60 1 file changed, 60 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index ef6c995..a28864d 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -463,6 +463,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx, size_t num_spns = 0; char *spn = NULL; bool ok; + const char **netbios_aliases = NULL; /* Find our DN */ @@ -524,6 +525,65 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx, } } + netbios_aliases = lp_netbios_aliases(); + if (netbios_aliases != NULL) { + for (; *netbios_aliases != NULL; netbios_aliases++) { + /* +* Add HOST/NETBIOSNAME +*/ + spn = talloc_asprintf(mem_ctx, "HOST/%s", *netbios_aliases); + if (spn == NULL) { + TALLOC_FREE(spn); + return ADS_ERROR_LDAP(LDAP_NO_MEMORY); + } + if (!strupper_m(spn)) { + TALLOC_FREE(spn); + return ADS_ERROR_LDAP(LDAP_NO_MEMORY); + } + + ok = ads_element_in_array(spn_array, num_spns, spn); + if (ok) { + TALLOC_FREE(spn); + continue; + } + ok = add_string_to_array(spn_array, spn, +_array, _spns); + if (!ok) { + TALLOC_FREE(spn); + return ADS_ERROR_LDAP(LDAP_NO_MEMORY); + } + TALLOC_FREE(spn); + + /* +* Add HOST/netbiosname.domainname +*/ + if (r->out.dns_domain_name == NULL) { + continue; + } + fstr_sprintf(my_fqdn, "%s.%s", +*netbios_aliases, +r->out.dns_domain_name); + + spn = talloc_asprintf(mem_ctx, "HOST/%s", my_fqdn); + if (spn == NULL) { + return ADS_ERROR_LDAP(LDAP_NO_MEMORY); + } + + ok = ads_element_in_array(spn_array, num_spns, spn); + if (ok) { + TALLOC_FREE(spn); + continue; + } + ok = add_string_to_array(spn_array, spn, +_array, _spns); + if (!ok) { + TALLOC_FREE(spn); + return ADS_ERROR_LDAP(LDAP_NO_MEMORY); + } + TALLOC_FREE(spn); + } + } + /* make sure to NULL terminate the array */ spn_array = talloc_realloc(mem_ctx, spn_array, const char *, num_spns + 1); if (spn_array == NULL) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6379737 heimdal: encode/decode kvno as signed integer from ebd139c init: set core file size to unlimited by default https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6379737b7ddc6ccb752238c5820cc62e76a8da17 Author: Uri Simchoni <u...@samba.org> Date: Thu May 5 23:40:22 2016 +0300 heimdal: encode/decode kvno as signed integer This patch changes the encoding/decoding of kvno (key version number) in blobs and packets to signed integer, for compatibility with Windows. Reportedly, MIT Kerberos does the same. This patch effectively reverts commit 1124c4872dfb81bec9c4b527b8927ca35e39a599 in the heimdal tree. According to the Kerberos spec (RFC 4120 5.2.9), the kvno field in encrypted data object is an unsigned integer that fits in 32 bits. The Heimdal Kerberos component bundled with Samba conforms to this. However, Windows deviates from the standard and encodes kvno as a signed integer, and this creates interoperability issues. ASN.1 DER has no special encoding for unsigned integer. A 32-bit unsigned integer is encoded as a signed integer, so while a signed 32-bit integer (covering the range of -0x8000..0x7fff) is encoded using up to 4 bytes, an unsigned integer (covering 0..0x) could require 5 bytes. Normally, kvno for a given account starts at 1 and increments on password changes. Kerberos defined this as unsigned because there's no meaning for negative version numbers, so the standard writers figured 4 billion versions is better than 2 billion. It was not expected for a kvno to really go past 0x7fff and the disctinction usually does not matter. However, RODCs use kvnos which have the most-significant bit set. In Active Directory, RODCs have a private secret for the krbtgt, because the assumption is that the RODC is less secure, and recovering the domain krbtgt secret from the RODC would compromise the security of the entire domain. The kvno field is being used to identify the private krbtgt account that owns the key - the upper 16 bits are the RODC id, and the lower 16 bits identify the key version number for this specific RODC. It's common to have an RODC id greater than 0x8000, and therefore to have a kvno larger than 0x7fff, which would be DER-encoded using 5 bytes. Windows encodes kvno as signed integer - basically taking the 32 bits and treating them as a signed integer rather than an unsigned integer. This means that in Windows a kvno can always be encoded using 4 bytes, and Windows DCs reject a kvno encoded using more than 4 bytes without even generating an error response (the DC assumes it's an attack). Heimdal re-encodes the TGT when it creates a TGS request. Obviously it cannot decode and encode the encrypted parts but it does re-encode the plain parts, which include the kvno. That leads to a 5-byte kvno in the TGS request, which is rejected without an error response. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11900 Signed-off-by: Uri Simchoni <u...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat May 7 21:14:21 CEST 2016 on sn-devel-144 --- Summary of changes: source4/heimdal/kdc/misc.c | 2 +- source4/heimdal/lib/asn1/krb5.asn1 | 2 +- source4/torture/rpc/lsa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/heimdal/kdc/misc.c b/source4/heimdal/kdc/misc.c index b0bc38a..6fd5119 100644 --- a/source4/heimdal/kdc/misc.c +++ b/source4/heimdal/kdc/misc.c @@ -40,7 +40,7 @@ _kdc_db_fetch(krb5_context context, krb5_kdc_configuration *config, krb5_const_principal principal, unsigned flags, - krb5uint32 *kvno_ptr, + krb5int32 *kvno_ptr, HDB **db, hdb_entry_ex **h) { diff --git a/source4/heimdal/lib/asn1/krb5.asn1 b/source4/heimdal/lib/asn1/krb5.asn1 index f3ae6bba..c2f40c0 100644 --- a/source4/heimdal/lib/asn1/krb5.asn1 +++ b/source4/heimdal/lib/asn1/krb5.asn1 @@ -360,7 +360,7 @@ LastReq ::= SEQUENCE OF SEQUENCE { EncryptedData ::= SEQUENCE { etype[0]ENCTYPE, -- EncryptionType - kvno[1] krb5uint32 OPTIONAL, + kvno[1] krb5int32 OPTIONAL, cipher[2] OCTET STRING -- ciphertext } diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index fa884fb..4d0084b 100644 --- a/s
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8c61e14 Fix a typo in smb.conf man page from ce82bf0 selftest: add a test for new "inherit owner" option https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8c61e1479654c43a45a8993437da524a54f506a7 Author: Anoop C S <anoo...@redhat.com> Date: Wed Aug 10 19:53:09 2016 +0530 Fix a typo in smb.conf man page Signed-off-by: Anoop C S <anoo...@redhat.com> Reviewed-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Aug 10 20:11:54 CEST 2016 on sn-devel-144 --- Summary of changes: docs-xml/smbdotconf/misc/allowinsecurewidelinks.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/misc/allowinsecurewidelinks.xml b/docs-xml/smbdotconf/misc/allowinsecurewidelinks.xml index 6b60108..29c25fc 100644 --- a/docs-xml/smbdotconf/misc/allowinsecurewidelinks.xml +++ b/docs-xml/smbdotconf/misc/allowinsecurewidelinks.xml @@ -20,7 +20,7 @@ is turned on. - If is not recommended to enable this option unless you + It is not recommended to enable this option unless you fully understand the implications of allowing the server to follow symbolic links created by UNIX clients. For most normal Samba configurations this would be considered a security -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9c6a4ea async_req: make async_connect_send() "reentrant" from 065dcc8 selftest: Merge alternate error codes into backupkey from backupkey_heimdal https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9c6a4ea2788808bdcc7bfea798d838ea56c3b5ec Author: Ralph Boehme <s...@samba.org> Date: Wed Aug 3 15:00:45 2016 +0200 async_req: make async_connect_send() "reentrant" Allow callers to pass in socket fds that where already passed to an earlier call of async_connect_send(). Callers expect this behaviour and it was working until 05d4dbda8357712cb81008e0d611fdb0e7239587 broke it. The proper fix would be to change callers to close the fd and start from scratch with a fresh socket. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12105 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Thu Aug 4 05:03:21 CEST 2016 on sn-devel-144 --- Summary of changes: lib/async_req/async_sock.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index c14acf3..3af1748 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -128,11 +128,21 @@ struct tevent_req *async_connect_send( } /* -* The only errno indicating that the connect is still in -* flight is EINPROGRESS, everything else is an error +* The only errno indicating that an initial connect is still +* in flight is EINPROGRESS. +* +* We get EALREADY when someone calls us a second time for a +* given fd and the connect is still in flight (and returned +* EINPROGRESS the first time). +* +* This allows callers like open_socket_out_send() to reuse +* fds and call us with an fd for which the connect is still +* in flight. The proper thing to do for callers would be +* closing the fd and starting from scratch with a fresh +* socket. */ - if (errno != EINPROGRESS) { + if (errno != EINPROGRESS && errno != EALREADY) { tevent_req_error(req, errno); return tevent_req_post(req, ev); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 89a2462 vfs_gpfs: Load nfs4 acl params at tcon time via 519b10e nfs4acls: Allow nfs4 acl params to be set by callers via d982ea5 nfs4acls: Make smbacl4_vfs_params public via e3523c8 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_set_nt_acl_nfs4 via 02882b4 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_get_nt_acl_nfs4 via fbddf56 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_fget_nt_acl_nfs4 via 41bb898 nfs4acls: Add some const via baaf4e3 nfs4acls: Remove a typedef from e7ad872 KCC: Fix misnamed variable in DSA object https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 89a24622e738c5e31042e299d93682789d80f4fe Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:38:43 2016 +0200 vfs_gpfs: Load nfs4 acl params at tcon time This reduces user-space CPU for metadata intensive workloads, lp_parm_* is expensive doing lots of strwicmp. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Aug 12 21:03:36 CEST 2016 on sn-devel-144 commit 519b10e224356055474a5a03546ccd2479e16db2 Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:31:12 2016 +0200 nfs4acls: Allow nfs4 acl params to be set by callers Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit d982ea5246a90b630a5e1e51accc04f3690e2429 Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:28:30 2016 +0200 nfs4acls: Make smbacl4_vfs_params public vfs_gpfs & others will be able to embed this structure in their special config. We could have gone with an anonymous struct and a talloc'ed object, but for my taste this is specialized and hidden enough that it's not worth the indirection. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit e3523c8d46989ce078b31e212e44952db600ec5e Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:07:38 2016 +0200 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_set_nt_acl_nfs4 Pure placeholder right now, this will allow vfs modules to load the params in advance Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 02882b44df9653ac1378bc1d7e279f03b370477c Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:07:38 2016 +0200 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_get_nt_acl_nfs4 Pure placeholder right now, this will allow vfs modules to load the params in advance Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit fbddf56f17ab0c1cc669e381588e868c23d16fbc Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 11:07:38 2016 +0200 nfs4acls: Add "smbacl4_vfs_params" parameter to smb_fget_nt_acl_nfs4 Pure placeholder right now, this will allow vfs modules to load the params in advance. nfs4 acl parameters should not change while a tcon is live, and lp_parm_get_* show up in profiles. Loading the parameters once at tcon time will remove this. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 41bb898d0a80079019622c65057132016b19171a Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 09:10:19 2016 +0200 nfs4acls: Add some const Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit baaf4e393bed859fd69bb63c814ed00aaac5e3c1 Author: Volker Lendecke <v...@samba.org> Date: Tue Aug 9 09:07:13 2016 +0200 nfs4acls: Remove a typedef Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/modules/nfs4_acls.c | 70 ++--- source3/modules/nfs4_acls.h | 16 + source3/modules/vfs_aixacl2.c | 5 +-- source3/modules/vfs_gpfs.c | 21 +-- source3/modules/vfs_nfs4acl_xattr.c | 9 ++--- source3/modules/vfs_zfsacl.c| 6 ++-- 6 files changed, 81 insertions(+), 46 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 8756285..71f4d8d 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -51,23 +51,11 @@ struct SMB4AC
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 961c4b5 vfs_acl_xattr: objects without NT ACL xattr via afc2417 s3/smbd: move make_default_filesystem_acl() to vfs_acl_common.c from 5a58a14 notify_inotify: Map inotify mask back to filter https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 961c4b591bb102751079d9cc92d7aa1c37f1958c Author: Ralph Boehme <s...@samba.org> Date: Fri Jul 15 17:48:19 2016 +0200 vfs_acl_xattr: objects without NT ACL xattr Even with "ignore system acls" set to "yes", for objects without NT ACL xattr we use the underlying filesystem permissions to construct an NT ACL. This can result in *very* unexpected permissions, eg: - a directory with the following ACL: $ ./bin/smbcacls -Uslow%pass //localhost/normal "" REVISION:1 CONTROL:SR|DP OWNER:SLOW\slow GROUP:Unix Group\root ACL:SLOW\slow:ALLOWED/0x0/FULL So only one non-inheritable(!) ACE. - creating a subdirectory: $ ./bin/smbclient -Uslow%pass //localhost/normal -c "mkdir dir1" - checking whether there's an ACL xattr: $ getfattr -m "" /Volumes/normal/dir1 getfattr: Removing leading '/' from absolute path names system.posix_acl_access system.posix_acl_default user.DOSATTRIB So there isn't an ACL xattr, because there where no inheritable ACEs on the parent folder. - reading the new subdirectories ACL: $ ./bin/smbcacls -Uslow%pass //localhost/normal "dir1" REVISION:1 CONTROL:SR|DP OWNER:SLOW\slow GROUP:Unix Group\slow ACL:SLOW\slow:ALLOWED/0x0/FULL ACL:Unix Group\slow:ALLOWED/0x0/READ ACL:Everyone:ALLOWED/0x0/READ ACL:NT Authority\SYSTEM:ALLOWED/0x0/FULL The ACES for "SLOW\slow", "Unix Group\slow" and "Everyone" are coming from the underlying filesystem. This is the problem. - Windows assigns the following ACL in this situation: $ ./bin/smbcacls -UAdministrator%Passw0rd //10.10.10.14/data "dir" REVISION:1 CONTROL:SR|PD|DI|DP OWNER:VORDEFINIERT\Administratoren GROUP:WIN2008R2\Domänen-Benutzer ACL:WIN2008R2\Administrator:ALLOWED/0x0/FULL $ ./bin/smbclient -UAdministrator%Passw0rd //10.10.10.14/data -c "mkdir dir\dir1" $ ./bin/smbcacls -UAdministrator%Passw0rd //10.10.10.14/data "dir\dir1" REVISION:1 CONTROL:SR|DI|DP OWNER:VORDEFINIERT\Administratoren GROUP:WIN2008R2\Domänen-Benutzer ACL:VORDEFINIERT\Administratoren:ALLOWED/0x0/FULL ACL:NT-AUTORITÄT\SYSTEM:ALLOWED/0x0/FULL By changing make_default_filesystem_acl() to only adds user and system ACE to the ACL of objects that lack an ACL xattr, we match Windows behaviour: $ ./bin/smbclient -Uslow%pass //localhost/normal -c "mkdir dir2" $ ./bin/smbcacls -Uslow%pass //localhost/normal "dir2" REVISION:1 CONTROL:SR|DP OWNER:SLOW\slow GROUP:Unix Group\slow ACL:SLOW\slow:ALLOWED/0x0/FULL ACL:NT Authority\SYSTEM:ALLOWED/0x0/FULL Bug: https://bugzilla.samba.org/show_bug.cgi?id=12028 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Jul 19 10:22:05 CEST 2016 on sn-devel-144 commit afc2417b107af572081974ff9d013ddec890d31f Author: Ralph Boehme <s...@samba.org> Date: Fri Jul 15 17:56:02 2016 +0200 s3/smbd: move make_default_filesystem_acl() to vfs_acl_common.c This function is only used in vfs_acl_common.c and will be modified in the next commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12028 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> --- Summary of changes: source3/modules/vfs_acl_common.c | 74 ++ source3/smbd/posix_acls.c| 110 --- source3/smbd/proto.h | 4 -- 3 files changed, 74 insertions(+), 114 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 98e1b8e..2fda938e 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -24,6 +24,7 @@ #include "../libcli/security/security.h" #include "../librpc/gen_ndr/ndr_security.h" #include "../lib/util/bitmap.h" +#include "passdb/lookup_sid.h" static NTSTATUS create_acl_blob(const struct security_descriptor *psd, DATA_BLOB *pblob, @@ -358,6 +359,79 @@ static NTSTATUS
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 99b8aca s3: torture: Regression test case to specify exactly how UNIX extensions should act on files with streams. via a4f1ecf s3: smbd: Fix delete operations enumerating streams inside a file. This must always be done as a Windows operation. from bbdace4 VLV tests: remove vestigial pdb stub https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 99b8acaa809b8de70ff6b16eb2511bb7d6e904e8 Author: Jeremy Allison <j...@samba.org> Date: Tue Jul 19 09:24:38 2016 -0700 s3: torture: Regression test case to specify exactly how UNIX extensions should act on files with streams. If a stream is open, refuse the unlink. Ensure UNIX unlink request can remove a file containing streams. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12021 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Jul 20 05:20:29 CEST 2016 on sn-devel-144 commit a4f1ecf50d9ab1e8c74a7543eeb3cca41df529fc Author: Jeremy Allison <j...@samba.org> Date: Tue Jul 19 09:21:08 2016 -0700 s3: smbd: Fix delete operations enumerating streams inside a file. This must always be done as a Windows operation. When using UNIX extensions to delete a file containing streams, the open for delete and close operations need to enumerate the contained streams and do CREATE and UNLINK operations on the stream names. These must always be done as Windows operations (remove the SMB_FILENAME_POSIX_PATH flag) as the stream names are Windows paths. Without this the create operation under the unlink will recurse and cause the client to time out (or a server crash). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12021 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: selftest/skip | 1 + selftest/target/Samba3.pm | 2 +- source3/selftest/tests.py | 3 +- source3/smbd/close.c | 3 +- source3/smbd/open.c | 3 +- source3/torture/torture.c | 146 ++ 6 files changed, 154 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/skip b/selftest/skip index 4ff7274..ba6718a 100644 --- a/selftest/skip +++ b/selftest/skip @@ -47,6 +47,7 @@ ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-ACL # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-EA # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-OFD-LOCK # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-STREAM-DELETE # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).PIDHIGH # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).NTTRANS-FSCTL # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-NEGPROT # Fails against the s4 ntvfs server diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 8a49cdb..f5f4c0c 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1590,7 +1590,7 @@ sub provision() force create mode = 0 directory mask = 0777 force directory mode = 0 - vfs objects = xattr_tdb + vfs objects = xattr_tdb streams_depot [aio] copy = tmp aio read size = 1 diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index e4b185b..7538f12 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -78,7 +78,8 @@ tests = ["RW1", "RW2", "RW3"] for t in tests: plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"]) -posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK" ] +posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK", + "POSIX-STREAM-DELETE" ] for t in posix_tests: plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH&
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a391e92 s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit() via f9913813 s3-messaging/ctdb: add messaging_ctdbd_reinit() via c6373ab s3-messaging/ctdb: split messaging_ctdbd_init() via 84da49f ctdbd_conn: add ctdbd_reinit_connection() via 1184931 ctdbd_conn: split ctdbd_init_connection() from 2f95ada ctdb: fix autotest with socket-wrapper installed in the system https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a391e9202db6a8f64f2fe12d0ab5752f6e684f84 Author: Ralph Boehme <s...@samba.org> Date: Sat Jul 9 14:33:52 2016 +0200 s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit() This is the last step to fix a regression introduced by 3fe3226daa8488e0fa787c40359c3401b6f05fc0 and 3fe3226daa8488e0fa787c40359c3401b6f05fc0^ where we pass the ctdb-messaging object conn to db_open() and add a reference to it to the private db_ctdb_ctx for later use. Unfortunately reinit_after_fork() destroys conn, leaving us with an invalid reference. The previous patches added new lower level functions messaging_ctdbd_reinit() and ctdbd_reinit_connection(), finally use them them from messaging_reinit(). They preserve the conn object and simply reinitialize the IPC fd. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Jul 11 23:45:20 CEST 2016 on sn-devel-144 commit f991381356b09c09edf410b2659bb4f833102be7 Author: Ralph Boehme <s...@samba.org> Date: Sat Jul 9 14:30:35 2016 +0200 s3-messaging/ctdb: add messaging_ctdbd_reinit() Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit c6373aba00dd7a69b2e69c979510e3de04700b2d Author: Ralph Boehme <s...@samba.org> Date: Sat Jul 9 13:20:01 2016 +0200 s3-messaging/ctdb: split messaging_ctdbd_init() Split out and internal function from messaging_ctdbd_init() that does the connection setup. Keep the conn object allocation in messaging_ctdbd_init(). This is in preperation of adding messaging_ctdbd_reinit() which will use the new internal function as well. messaging_ctdbd_init_internal() has a new reinit flag, messaging_ctdbd_init() calls with reinit=false resulting in unmodified behaviour. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 84da49f89b905a80d82901bfc1e4c8ec534edd3d Author: Ralph Boehme <s...@samba.org> Date: Sat Jul 9 08:59:09 2016 +0200 ctdbd_conn: add ctdbd_reinit_connection() Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 1184931001be983b858f44468aeb083140d924ad Author: Ralph Boehme <s...@samba.org> Date: Sat Jul 9 08:48:49 2016 +0200 ctdbd_conn: split ctdbd_init_connection() Split ctdbd_init_connection() into an internal function that does the connection setup and only keep the conn object allocation in ctdbd_init_connection(). This is in preperation of adding ctdbd_reinit_connection() which will use the new internal function as well. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> --- Summary of changes: source3/include/ctdbd_conn.h | 3 ++ source3/include/messages.h | 3 ++ source3/lib/ctdb_dummy.c | 7 source3/lib/ctdbd_conn.c | 72 + source3/lib/messages.c | 6 +-- source3/lib/messages_ctdbd.c | 95 +++- 6 files changed, 139 insertions(+), 47 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h index 11e71ba..bbebbce 100644 --- a/source3/include/ctdbd_conn.h +++ b/source3/include/ctdbd_conn.h @@ -33,6 +33,9 @@ struct messaging_rec; int ctdbd_init_connection(TALLOC_CTX *mem_ctx, const char *sockname, int timeout, struct ctdbd_connection **pconn); +int ctdbd_reinit_connection(TALLOC_CTX *mem_ctx, + const char *sockname, int timeout, + struct ctdbd_connection *conn); uint32_t ctdbd_vnn(const struct ctdbd_connection *conn); diff --git a/source3/include/messages.h b/source3/include/messages.h index 8bbe026..2eaf146 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -79,6 +79,9 @@ struct messaging_backend { int messaging_ctdbd_init(struct messaging_context *msg_ctx,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ed4af82 s4/selftests: test net ads dns register/unregister. via 4e20d24 ldb: Fix CID 1362935: CHECKED_RETURN via 874a9d9 libnet: Fix CID 1362934: CHECKED_RETURN from 6318615 s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ed4af82a4f1018884b534232ccfbe3fff8b7bdef Author: Richard Sharpe <rsha...@samba.org> Date: Sat Jun 18 21:51:26 2016 -0700 s4/selftests: test net ads dns register/unregister. Add a new test for the net ads dns commands and the needed self test setup. Currently tests that we can register a name and that it turns up. Also, tests that we can register with -P. Signed-off-by: Richard Sharpe <rsha...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Jun 28 22:35:35 CEST 2016 on sn-devel-144 commit 4e20d2448e2d43f2bb36ea8a131c7677befed242 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 28 14:41:19 2016 +0200 ldb: Fix CID 1362935: CHECKED_RETURN Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 874a9d9c87c69b5dd62494c6372aa196daadc325 Author: Volker Lendecke <v...@samba.org> Date: Tue Jun 28 14:38:57 2016 +0200 libnet: Fix CID 1362934: CHECKED_RETURN Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: lib/ldb/ldb_map/ldb_map.c | 7 ++- source4/libnet/libnet_samsync_ldb.c| 7 ++- source4/selftest/tests.py | 1 + testprogs/blackbox/test_net_ads_dns.sh | 81 ++ 4 files changed, 94 insertions(+), 2 deletions(-) create mode 100755 testprogs/blackbox/test_net_ads_dns.sh Changeset truncated at 500 lines: diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c index 66b0059..f2a86fe 100644 --- a/lib/ldb/ldb_map/ldb_map.c +++ b/lib/ldb/ldb_map/ldb_map.c @@ -727,6 +727,7 @@ static void map_objectclass_generate_remote(struct ldb_module *module, const cha struct ldb_val val; bool found_extensibleObject = false; unsigned int i; + int ret; ldb = ldb_module_get_ctx(module); @@ -774,7 +775,11 @@ static void map_objectclass_generate_remote(struct ldb_module *module, const cha } /* Add new objectClass to remote message */ - ldb_msg_add(remote, el, 0); + ret = ldb_msg_add(remote, el, 0); + if (ret != LDB_SUCCESS) { + ldb_oom(ldb); + return; + } } /* Map an objectClass into the local partition. */ diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c index f3a45b8..5fdef79 100644 --- a/source4/libnet/libnet_samsync_ldb.c +++ b/source4/libnet/libnet_samsync_ldb.c @@ -414,7 +414,12 @@ static NTSTATUS samsync_ldb_handle_user(TALLOC_CTX *mem_ctx, samdb_msg_add_delete(state->sam_ldb, mem_ctx, msg, remote_attrs[i]); } else { - ldb_msg_add(msg, el, LDB_FLAG_MOD_REPLACE); + ret = ldb_msg_add(msg, el, LDB_FLAG_MOD_REPLACE); + if (ret != LDB_SUCCESS) { + *error_string = talloc_strdup( + mem_ctx, "ldb_msg_add failed"); + return NT_STATUS_NO_MEMORY; + } } } diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index c3a3914..87abcff 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -405,6 +405,7 @@ plantestsuite("samba4.blackbox.rfc2307_mapping(ad_dc_ntvfs:local)", "ad_dc_ntvfs plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) plantestsuite("samba4.blackbox.net_ads(ad_member:client)", "ad_member:client", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS']) +plantestsuite("samba4.blackbox.net_ads_dns(ad_member:local)", "ad_member:l
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f6db954 s4: tests: Skip drs tests. from 6147ed7 s3:lib: fix a typo in comment for talloc_sub_basic() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f6db954fd6d6b027ec253d9e17130e4fe0f0db77 Author: Jeremy Allison <j...@samba.org> Date: Thu Aug 4 12:51:24 2016 -0700 s4: tests: Skip drs tests. Please revert once the tests are fixed. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Aug 5 22:17:03 CEST 2016 on sn-devel-144 --- Summary of changes: selftest/skip | 4 1 file changed, 4 insertions(+) Changeset truncated at 500 lines: diff --git a/selftest/skip b/selftest/skip index ba6718a..879608d 100644 --- a/selftest/skip +++ b/selftest/skip @@ -138,3 +138,7 @@ bench # don't run benchmarks in our selftest ^samba4.rpc.unixinfo # This contains a server-side getpwuid call which hangs the server when nss_winbindd is in use ^samba.tests.dcerpc.unix # This contains a server-side getpwuid call which hangs the server when nss_winbindd is in use GETADDRINFO # socket wrapper doesn't support threads +# +# drs tests are currently broken. +# Revert this when they are working again. +^samba.*drs.* -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a0e60e9 samba-tool/ldapcmp: ignore differences of whenChanged via 7147859 smbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser() from 464b386 ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsave https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a0e60e96aa38407ded8d63650dcf8f39304c958a Author: Stefan Metzmacher <me...@samba.org> Date: Mon Aug 8 12:53:26 2016 +0200 samba-tool/ldapcmp: ignore differences of whenChanged This is implicitly replicated, but may diverge on updates of non-replicated attributes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12129 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Aug 8 17:34:24 CEST 2016 on sn-devel-144 commit 7147859c7afc1344e76485e2cbc286679110d96e Author: Ralph Boehme <s...@samba.org> Date: Wed Jul 20 12:36:24 2016 +0200 smbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser() dbwrap_parse_record() can return ctdb tombstone records from the lctdb, ignore them. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> --- Summary of changes: python/samba/netcmd/ldapcmp.py| 2 +- source3/locking/share_mode_lock.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index 96b94f2..cb02de2 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -438,7 +438,7 @@ class LDAPObject(object): "uSNChanged", "uSNCreated", "uSNLastObjRem", -# "whenChanged", # This is implicitly replicated +"whenChanged", # This is implicitly replicated, but may diverge on updates of non-replicated attributes ] self.ignore_attributes = self.non_replicated_attributes self.ignore_attributes += ["msExchServer1HighestUSN"] diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index b5a63f8..f738323 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -628,6 +628,12 @@ static void fetch_share_mode_unlocked_parser( struct share_mode_lock *lck = talloc_get_type_abort( private_data, struct share_mode_lock); + if (data.dsize == 0) { + /* Likely a ctdb tombstone record, ignore it */ + lck->data = NULL; + return; + } + lck->data = parse_share_modes(lck, key, data); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 02729863 selftest: Remove unsued variables WINBINDD_PRIV_PIPE_DIR and wbsockprivdir via bd8d955 param: Remove winbindd privileged socket directory option via a551d38 lib/util: Avoid a talloc in ms_fnmatch_protocol via b4ed72a s3/lib: Use ms_fnmatch_protocol in mask_match via f969be5 lib: Add "is_case_sensitive" to ms_fnmatch_protocol via 07d9a90 lib/util/charset: Optimize next_codepoint for the ascii case via 66cba99 s3/locking: Avoid a talloc for nonexisting fetch_share_mode_unlocked via 27daed8 smbd: Streamline get_ea_names_from_file via f827650 smbd: Fix an indentation via c687924 smbd: Fix a few signed/unsigned hickups via 1395823 lib: Avoid a "includes.h" via 6faf30b smbd: Fix a typo via 9bed3e3 lib: Avoid an includes.h via 9af73f6 lib: Add lib/util/server_id.h from 5059c8e vfs_default: unlock the right file in copy chunk https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0272986377aecf06f00b7730379fd32b7066dc91 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jan 4 07:58:15 2017 +1300 selftest: Remove unsued variables WINBINDD_PRIV_PIPE_DIR and wbsockprivdir I can not find anything that uses these in the testsuite Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sun Jan 22 22:15:01 CET 2017 on sn-devel-144 commit bd8d9559bf8e6cdbf080902bc2460dbc12848054 Author: Andrew Bartlett <abart...@samba.org> Date: Tue Jan 3 20:46:59 2017 +1300 param: Remove winbindd privileged socket directory option This option is unused and has not been used since before Samba 4.3 when the source4/ winbindd code went away. The associated dynconfig parameters used for the default are also removed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10066 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit a551d3826d885f22eed33aac56df697f32f854d4 Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 25 12:46:00 2016 +0200 lib/util: Avoid a talloc in ms_fnmatch_protocol Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit b4ed72a2d3b08128ee03202512914cfbe21b6c91 Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 25 12:28:44 2016 +0200 s3/lib: Use ms_fnmatch_protocol in mask_match This avoids the talloc/free through push_ucs2_talloc Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f969be54417a0d4d2bab0f854ce1c9f9d4639711 Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 25 11:53:53 2016 +0200 lib: Add "is_case_sensitive" to ms_fnmatch_protocol Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 07d9a909ba6853fb0b96f6d86e4cf0d5d1b35b28 Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 25 12:28:12 2016 +0200 lib/util/charset: Optimize next_codepoint for the ascii case Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 66cba9939b76fbfad91a6fe7156feb898b51b2ad Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 24 17:32:17 2016 +0200 s3/locking: Avoid a talloc for nonexisting fetch_share_mode_unlocked Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 27daed8fcf95eed2df112dc1c30c3a40b5c9565b Author: Volker Lendecke <v...@samba.org> Date: Thu Oct 20 16:33:55 2016 +0200 smbd: Streamline get_ea_names_from_file Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f827650c65e36526abe9d87a52966fec5be1a2dd Author: Volker Lendecke <v...@samba.org> Date: Wed Oct 26 12:20:39 2016 +0200 smbd: Fix an indentation Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit c687924eed221b800bb29a7a3e00393b0e7876a4 Author: Volker Lendecke <v...@samba.org> Date: Wed Oct 26 12:56:53 2016 +0200 smbd: Fix a few signed/unsigned hickups Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 13958236a983531fc04a7143daf32b11745f813f Author: Volker Lendecke <v...@samba.org> Date: Tue Oct 25 15:42:28 2016 +0200 lib: Avoid a "includes.h" Signed-off-by
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 35460d9 s3/rpc_server/mdssvc: prefix public flex and bison global symbols via 7933c2a s3/rpc_server/mdssvc: use flex noyyalloc noyyrealloc from 98d05dc smbcontrol: add ringbuf-log https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 35460d92bbf3ee0af00b10a0a3a72887049f09ff Author: Ralph Boehme <s...@samba.org> Date: Wed Jan 18 19:18:40 2017 +0100 s3/rpc_server/mdssvc: prefix public flex and bison global symbols This fixes a clash with a parser in Heimdal when building with --nonshared-binary=smbd/smbd: ... [3139/3620] Linking default/source3/smbd/smbd ... default/source4/heimdal/lib/hx509/sel-lex_116.o: In function `yy_get_previous_state': /usr/build/packages/samba-4.5/bin/../source4/heimdal/lib/hx509/sel-lex.c:1122:multiple definition of `yyin' default/source3/rpc_server/mdssvc/sparql_lexer_28.o:/usr/build/packages/samba-4.5/bin/sparql_lexer.c:1149:first defined here ... The fix is to use namespace prefixes in the parser and the lexer as described here: <https://www.gnu.org/software/bison/manual/html_node/Multiple-Parsers.html> Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: David Disseldorp <dd...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Jan 21 13:13:19 CET 2017 on sn-devel-144 commit 7933c2a60fed8b18e88957cfc267990d8d7f0041 Author: Ralph Boehme <s...@samba.org> Date: Thu Jan 19 07:39:37 2017 +0100 s3/rpc_server/mdssvc: use flex noyyalloc noyyrealloc Redefine the symbols used for malloc and realloc in the flex source instead of running sed over the generated one. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: David Disseldorp <dd...@samba.org> --- Summary of changes: source3/rpc_server/mdssvc/Makefile| 3 - source3/rpc_server/mdssvc/sparql_lexer.c | 561 -- source3/rpc_server/mdssvc/sparql_lexer.l | 10 +- source3/rpc_server/mdssvc/sparql_parser.c | 152 source3/rpc_server/mdssvc/sparql_parser.h | 24 +- source3/rpc_server/mdssvc/sparql_parser.y | 25 +- 6 files changed, 412 insertions(+), 363 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/mdssvc/Makefile b/source3/rpc_server/mdssvc/Makefile index 3b0983f..3de4a46 100644 --- a/source3/rpc_server/mdssvc/Makefile +++ b/source3/rpc_server/mdssvc/Makefile @@ -1,6 +1,5 @@ BISON=bison FLEX=flex -SED=sed PARSER=sparql_parser LEXER=sparql_lexer @@ -12,5 +11,3 @@ $(PARSER).c: $(PARSER).y $(LEXER).c: $(LEXER).l $(FLEX) -o $@ $< - $(SED) -i s/malloc/SMB_MALLOC/g $@ - $(SED) -i s/realloc/SMB_REALLOC/g $@ diff --git a/source3/rpc_server/mdssvc/sparql_lexer.c b/source3/rpc_server/mdssvc/sparql_lexer.c index 34bc0ca..39539c5 100644 --- a/source3/rpc_server/mdssvc/sparql_lexer.c +++ b/source3/rpc_server/mdssvc/sparql_lexer.c @@ -6,10 +6,29 @@ /* A lexical scanner generated by flex */ +#define yy_create_buffer mdsyy_create_buffer +#define yy_delete_buffer mdsyy_delete_buffer +#define yy_flex_debug mdsyy_flex_debug +#define yy_init_buffer mdsyy_init_buffer +#define yy_flush_buffer mdsyy_flush_buffer +#define yy_load_buffer_state mdsyy_load_buffer_state +#define yy_switch_to_buffer mdsyy_switch_to_buffer +#define yyin mdsyyin +#define yyleng mdsyyleng +#define yylex mdsyylex +#define yylineno mdsyylineno +#define yyout mdsyyout +#define yyrestart mdsyyrestart +#define yytext mdsyytext +#define yywrap mdsyywrap +#define yyalloc mdsyyalloc +#define yyrealloc mdsyyrealloc +#define yyfree mdsyyfree + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 0 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -136,13 +155,21 @@ typedef unsigned int flex_uint32_t; #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) +#define YY_NEW_FILE mdsyyrestart(mdsyyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per cha
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f605332 docs: Improve description of "unix_primary_group" parameter in idmap_ad manpage from 348bcca selftest/Samba3: use "server min protocol = SMB3_00" for "ktest" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f605332e1b87d87e0c454bcae2a374013d3ebf82 Author: John Mulligan <jmulli...@nasuni.com> Date: Fri Jan 13 07:33:01 2017 +0100 docs: Improve description of "unix_primary_group" parameter in idmap_ad manpage Bug: https://bugzilla.samba.org/show_bug.cgi?id=12542 Signed-off-by: John Mulligan <jmulli...@nasuni.com> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Jan 27 20:58:18 CET 2017 on sn-devel-144 --- Summary of changes: docs-xml/manpages/idmap_ad.8.xml | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/idmap_ad.8.xml b/docs-xml/manpages/idmap_ad.8.xml index 355c08e..fa5ae72 100644 --- a/docs-xml/manpages/idmap_ad.8.xml +++ b/docs-xml/manpages/idmap_ad.8.xml @@ -70,23 +70,34 @@ For SFU 3.0 or 3.5 please choose "sfu", for SFU 2.0 please choose "sfu20". - Please note that primary group membership is currently always calculated - via the "primaryGroupID" LDAP attribute. + Please note that the behavior of primary group membership is + controlled by the unix_primary_group option. unix_primary_group = yes/no - Defines whether to retrieve the user's primary group - from the SFU attributes. - + Defines whether the user's primary group is fetched from the SFU + attributes or the AD primary group. If set to + yes the primary group membership is fetched + from the LDAP attributes (gidNumber). + If set to no the primary group membership is + calculated via the "primaryGroupID" LDAP attribute. + + Default: no + unix_nss_info = yes/no - Defines whether to retrieve the login shell and - home directory from the SFU attributes. - + If set to yes winbind will retrieve the login + shell and home directory from the LDAP attributes. If set to + no the or the AD LDAP entry lacks the SFU + attributes the options template shell and + template homedir are used. + + Default: no + -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 73deaec s3:winbindd: document "winbind:ignore domains" from 1820209 s3/rpc_server/mdssvc: Generate flex/bison files in build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 73deaecbd598dcda5b213c07bf9593fca2290c72 Author: David Mulder <dmul...@suse.com> Date: Mon Jan 23 14:44:03 2017 -0700 s3:winbindd: document "winbind:ignore domains" The "winbind:ignore domains" smb.conf option is undocumented but used frequently. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Jan 30 12:24:47 CET 2017 on sn-devel-144 --- Summary of changes: docs-xml/smbdotconf/winbind/winbindignoredomains.xml | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 docs-xml/smbdotconf/winbind/winbindignoredomains.xml Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/winbind/winbindignoredomains.xml b/docs-xml/smbdotconf/winbind/winbindignoredomains.xml new file mode 100644 index 000..62a8f863 --- /dev/null +++ b/docs-xml/smbdotconf/winbind/winbindignoredomains.xml @@ -0,0 +1,14 @@ +http://www.samba.org/samba/DTD/samba-doc;> + + Allows to enter a list of trusted domains winbind should + ignore (untrust). This can avoid the overhead of resources from + attempting to login to DCs that should not be communicated with. + + + + +DOMAIN1, DOMAIN2 + -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1820209 s3/rpc_server/mdssvc: Generate flex/bison files in build from 9a3b64a vfs_fruit: checks wrong AAPL config state and so always uses readdirattr https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1820209b9ec182ae53fd569239e9e16f090afa4a Author: Noel Power <noel.po...@suse.com> Date: Tue Jan 17 16:02:27 2017 + s3/rpc_server/mdssvc: Generate flex/bison files in build Build the generated files at build time instead of using a committed version generated at some point in the past. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Noel Power <noel.po...@suse.com> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: David Disseldorp <dd...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Jan 28 13:26:01 CET 2017 on sn-devel-144 --- Summary of changes: source3/rpc_server/mdssvc/Makefile | 13 - source3/rpc_server/mdssvc/mdssvc.c |2 +- source3/rpc_server/mdssvc/sparql_lexer.c | 1869 -- source3/rpc_server/mdssvc/sparql_lexer.l |2 +- source3/rpc_server/mdssvc/sparql_parser.c | 1983 source3/rpc_server/mdssvc/sparql_parser.h | 100 -- source3/rpc_server/mdssvc/sparql_parser.y |8 +- source3/rpc_server/mdssvc/sparql_parser_test.c |2 +- source3/rpc_server/wscript_build |4 +- source3/wscript| 12 + source3/wscript_build |4 +- 11 files changed, 23 insertions(+), 3976 deletions(-) delete mode 100644 source3/rpc_server/mdssvc/Makefile delete mode 100644 source3/rpc_server/mdssvc/sparql_lexer.c delete mode 100644 source3/rpc_server/mdssvc/sparql_parser.c delete mode 100644 source3/rpc_server/mdssvc/sparql_parser.h Changeset truncated at 500 lines: diff --git a/source3/rpc_server/mdssvc/Makefile b/source3/rpc_server/mdssvc/Makefile deleted file mode 100644 index 3de4a46..000 --- a/source3/rpc_server/mdssvc/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -BISON=bison -FLEX=flex - -PARSER=sparql_parser -LEXER=sparql_lexer - -all: $(PARSER).c $(LEXER).c - -$(PARSER).c: $(PARSER).y - $(BISON) -d -o $@ $< - -$(LEXER).c: $(LEXER).l - $(FLEX) -o $@ $< diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c index 44d7703..c32ba0c 100644 --- a/source3/rpc_server/mdssvc/mdssvc.c +++ b/source3/rpc_server/mdssvc/mdssvc.c @@ -27,7 +27,7 @@ #include "lib/dbwrap/dbwrap_rbt.h" #include "libcli/security/dom_sid.h" #include "mdssvc.h" -#include "sparql_parser.h" +#include "rpc_server/mdssvc/sparql_parser.tab.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/mdssvc/sparql_lexer.c b/source3/rpc_server/mdssvc/sparql_lexer.c deleted file mode 100644 index 39539c5..000 --- a/source3/rpc_server/mdssvc/sparql_lexer.c +++ /dev/null @@ -1,1869 +0,0 @@ -#line 2 "sparql_lexer.c" - -#line 4 "sparql_lexer.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer mdsyy_create_buffer -#define yy_delete_buffer mdsyy_delete_buffer -#define yy_flex_debug mdsyy_flex_debug -#define yy_init_buffer mdsyy_init_buffer -#define yy_flush_buffer mdsyy_flush_buffer -#define yy_load_buffer_state mdsyy_load_buffer_state -#define yy_switch_to_buffer mdsyy_switch_to_buffer -#define yyin mdsyyin -#define yyleng mdsyyleng -#define yylex mdsyylex -#define yylineno mdsyylineno -#define yyout mdsyyout -#define yyrestart mdsyyrestart -#define yytext mdsyytext -#define yywrap mdsyywrap -#define yyalloc mdsyyalloc -#define yyrealloc mdsyyrealloc -#define yyfree mdsyyfree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 0 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 10e1b92 krb5_wrap: use our own code to calculate the ENCTYPE_ARCFOUR_HMAC key via 383432d s4:scripting: use generate_random_machine_password() for machine passwords via ea57a20 samba-tool:provision: use generate_random_machine_password() for machine passwords via f04e09e samba-tool:domain: use generate_random_machine_password() for machine passwords via b2fac99 samba-tool:domain: use generate_random_machine_password() for trusted domains via d7840e77 pyglue: add generate_random_machine_password() wrapper via b86c29b python/samba: use an explicit .encode('utf-8') where we expect utf8 passwords via 99b8d6b python/samba: provision_dns_add_samba.ldif expects utf-16-le passwords via 0ed258b s4:dsdb: autogenerate a random utf16 buffer for krbtgt password resets. via 26515dc s4:libnet: make use of generate_random_machine_password() via e9c1840 s4:libcli/raw: remove unused DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH via 21cbf8e s3:include: remove unused DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH via 13fd543 s3:net_rpc_trust: make use of trust_pw_new_value() via 77edef9 s3:libnet_join: make use of trust_pw_new_value() via 0013694 s3:libads: use trust_pw_new_value() for krb5 machine passwords via c21e998 s3:libsmb: use trust_pw_new_value() in trust_pw_change() via 9e26ad8 s3:libsmb: add trust_pw_new_value() helper function via a287754 s3:libsmb: let trust_pw_change() verify the new password at the end. via 4185689 s3:libsmb: let trust_pw_change() debug more verbose information via ad12cfa lib/util: add generate_random_machine_password() function via abe4277 libcli/auth: add netlogon_creds_cli_debug_string() via 8a209e5 libcli/auth: check E_md4hash() result in netlogon_creds_cli_ServerPasswordSet_send() via 0ed2a65 libcli/auth: use the correct creds value against servers without LogonSamLogonEx via cebcc2a s3:winbindd: make sure cm_prepare_connection() only returns OK with a valid tree connect via c97e39b librpc/rpc: fix regression in NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error mapping from e36e1f7 build:wafsamba: Remove ambiguous 'if x in conf.env' constructs https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 10e1b92c288ae27f775debb16c3e122b6063fa21 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Feb 21 12:15:07 2017 +0100 krb5_wrap: use our own code to calculate the ENCTYPE_ARCFOUR_HMAC key Our own convert_string_talloc() function handles a wider range of unicode code points than the MIT krb5 or heimdal code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Feb 21 20:08:16 CET 2017 on sn-devel-144 commit 383432d2cd3046c2c3768c1ae452211c7e583604 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Feb 13 19:37:09 2017 +0100 s4:scripting: use generate_random_machine_password() for machine passwords BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit ea57a204a1f6b4999e5347c1edb5753bed933fba Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 12:40:24 2016 +0200 samba-tool:provision: use generate_random_machine_password() for machine passwords BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f04e09e1968c40483b8dc2f92b9c15bce0b0b55a Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 12:37:37 2016 +0200 samba-tool:domain: use generate_random_machine_password() for machine passwords BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit b2fac99ac63739398aa716c26d8e187a25bb8400 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 12:27:19 2016 +0200 samba-tool:domain: use generate_random_machine_password() for trusted domains BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit d7840e77961cdc4ccc4f5549494d458b6b2c2cf4 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 09:35:50 2016 +0200 pyglue: add generate_random_machine_password() wrapper We use PyUnicode_FromSt
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f4e25ec lib: Use tdb_storev in gencache via 4d9ff07 dbwrap: Use tdb_storev in dbwrap_ctdb via c27c7d4 tdb: Use tdb_storev in tdb_append via 504b04b tdb: Add tdb_storev via 647e61b tdb: Add tdb_trace_1plusn_rec_flag_ret via 37e644f tdb: Vectorize _tdb_store via f6f4e5e tdb: Vectorize tdb_update_hash via 6295080 tdb: Allow _v variant in tdb_update_hash_cmp via babd543 tdb: Remove unnecessary checks via 4913180 tdb: Do an overflow check via 6dc4e29 tdb: Fix a signed/unsigned hickup via 28f2849 dbwrap_watch: Add dsize to DEBUG, avoid casts from db32a0e dbcheck: Abandon dbcheck if we get an error during a transaction https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f4e25ec9635d7ea61db011e7ad685b1e0ae61db9 Author: Volker Lendecke <v...@samba.org> Date: Fri Aug 12 20:57:26 2016 +0200 lib: Use tdb_storev in gencache Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Aug 29 22:51:34 CEST 2016 on sn-devel-144 commit 4d9ff07150d316db081d412e958e46bf4b432a05 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 21:12:06 2016 +0200 dbwrap: Use tdb_storev in dbwrap_ctdb Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit c27c7d44fb89c08addc5280944c88787bf18c075 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 20:57:42 2016 +0200 tdb: Use tdb_storev in tdb_append Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 504b04b817d9bc46b638fbf2335fbcac1ed6ce93 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 20:46:07 2016 +0200 tdb: Add tdb_storev Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 647e61b0e8807d3f1f61f5a82cbe761691b61edb Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 20:45:10 2016 +0200 tdb: Add tdb_trace_1plusn_rec_flag_ret Needed for tdb_storev Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 37e644fc20bb77c486d973ed66c7e21ea055a5e1 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 14:11:03 2016 +0200 tdb: Vectorize _tdb_store Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit f6f4e5e6b590d41d7c411e3e406cc629d59f156a Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 13:47:49 2016 +0200 tdb: Vectorize tdb_update_hash Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 629508036113ce3afa5056857716d97ad5a3251d Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 12:37:13 2016 +0200 tdb: Allow _v variant in tdb_update_hash_cmp Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit babd5432ed91dec1b64b966e2a6633b9642a82d5 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 11:31:44 2016 +0200 tdb: Remove unnecessary checks This has already been done in tdb_find() Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 4913180aada29a6118d19f27f3521b8456c5c912 Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 10:49:04 2016 +0200 tdb: Do an overflow check Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 6dc4e294a51532fb4550ac68b4c3f5a5a9bcbf1b Author: Volker Lendecke <v...@samba.org> Date: Wed Aug 10 10:16:05 2016 +0200 tdb: Fix a signed/unsigned hickup Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 28f2849584d550403117004348b7370530a549a7 Author: Volker Lendecke <v...@samba.org> Date: Mon Jul 25 12:59:46 2016 +0200 dbwrap_watch: Add dsize to DEBUG, avoid casts Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: lib/tdb/ABI/{tdb-1.3.5.sigs => tdb-1.3.11.sigs} | 1 + lib/tdb/common/tdb.c| 222 +--- lib/tdb/common/tdb_private.h| 5 + lib/tdb/include/tdb.h | 26 +++ lib/tdb/wscript | 2 +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b722875 vfs_acl_xattr|tdb: enforced settings when ignore system acls=yes via cbe8f0d docs: document vfs_acl_xattr|tdb enforced settings from 0958010 ldb: Avoid multiple tiny allocations during full DB scan https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b72287514cc78c9019db7385af4c9b9d94f60894 Author: Ralph Boehme <s...@samba.org> Date: Fri Aug 26 10:04:53 2016 +0200 vfs_acl_xattr|tdb: enforced settings when ignore system acls=yes When "ignore system acls" is set to "yes, we need to ensure filesystem permission always grant access so that when doing our own access checks we don't run into situations where we grant access but the filesystem doesn't. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12181 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Aug 31 18:41:20 CEST 2016 on sn-devel-144 commit cbe8f0d63b90e4380da35e9f9f5a05d8ccc2058b Author: Ralph Boehme <s...@samba.org> Date: Fri Aug 26 10:22:37 2016 +0200 docs: document vfs_acl_xattr|tdb enforced settings Bug: https://bugzilla.samba.org/show_bug.cgi?id=12181 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> --- Summary of changes: docs-xml/manpages/vfs_acl_tdb.8.xml | 24 docs-xml/manpages/vfs_acl_xattr.8.xml | 24 source3/modules/vfs_acl_tdb.c | 21 + source3/modules/vfs_acl_xattr.c | 21 + source4/torture/vfs/acl_xattr.c | 4 ++-- 5 files changed, 92 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_acl_tdb.8.xml b/docs-xml/manpages/vfs_acl_tdb.8.xml index 607e344..2510f08 100644 --- a/docs-xml/manpages/vfs_acl_tdb.8.xml +++ b/docs-xml/manpages/vfs_acl_tdb.8.xml @@ -40,6 +40,15 @@ $LOCKDIR/file_ntacls.tdb. + + This module forces the following parameters: + + inherit acls = true + dos filemode = true + force unknown acl user = true + + + This module is stackable. @@ -61,6 +70,21 @@ access the data via Samba you might set this to yes to achieve better NT ACL compatibility. + + + If acl_tdb:ignore system acls + is set to yes, the following + additional settings will be enforced: + + create mask = 0666 + directory mask = 0777 + map archive = no + map hidden = no + map readonly = no + map system = no + store dos attributes = yes + + diff --git a/docs-xml/manpages/vfs_acl_xattr.8.xml b/docs-xml/manpages/vfs_acl_xattr.8.xml index 8da73e0..9d21290 100644 --- a/docs-xml/manpages/vfs_acl_xattr.8.xml +++ b/docs-xml/manpages/vfs_acl_xattr.8.xml @@ -44,6 +44,15 @@ ). + + This module forces the following parameters: + + inherit acls = true + dos filemode = true + force unknown acl user = true + + + This module is stackable. @@ -65,6 +74,21 @@ access the data via Samba you might set this to yes to achieve better NT ACL compatibility. + + + If acl_xattr:ignore system acls + is set to yes, the following + additional settings will be enforced: + + create mask = 0666 + directory mask = 0777 + map archive = no + map hidden = no + map readonly = no + map system = no + store dos attributes = yes + + diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 0c92b72..174affe 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -309,6 +309,7 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle, { int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); bool ok; + struct acl_common_config *config = NULL; if (ret < 0) { return ret; @@ -336,6 +337,26 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle, lp_do_parameter(SNUM(handle->conn), "dos filemode", "true"); lp_do_parameter(SNUM(handle->conn
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8dc6fbb auth: One const is enough... from 754f8ef lib: Avoid a few casts https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8dc6fbbf45f4bf3058357b5d34601c9c7eecb7f9 Author: Volker Lendecke <v...@samba.org> Date: Fri Sep 9 16:31:55 2016 +0200 auth: One const is enough... Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Sep 9 20:33:10 CEST 2016 on sn-devel-144 --- Summary of changes: auth/auth_sam_reply.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/auth/auth_sam_reply.h b/auth/auth_sam_reply.h index 617fae7..4aa3096 100644 --- a/auth/auth_sam_reply.h +++ b/auth/auth_sam_reply.h @@ -33,7 +33,7 @@ /* The following definitions come from auth/auth_sam_reply.c */ NTSTATUS make_user_info_SamBaseInfo(TALLOC_CTX *mem_ctx, - const const char *account_name, + const char *account_name, const struct netr_SamBaseInfo *base, bool authenticated, struct auth_user_info **_user_info); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 70e2418 s3/smbd: use correct talloc memory context for tevent subrequests from 28fad1c ctdb-daemon: Log a message when vfork() takes long time https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 70e241897564918a1e2ab6781a579c74f0e44e67 Author: Ralph Boehme <s...@samba.org> Date: Sun Sep 18 17:14:37 2016 +0200 s3/smbd: use correct talloc memory context for tevent subrequests Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Mon Sep 19 23:25:37 CEST 2016 on sn-devel-144 --- Summary of changes: source3/smbd/server.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 97c0fdc..f1e64ac 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -456,7 +456,7 @@ static struct tevent_req *notifyd_init_send(struct tevent_context *ev, .ppid = ppid }; - subreq = tevent_wakeup_send(req, ev, tevent_timeval_current_ofs(1, 0)); + subreq = tevent_wakeup_send(state, ev, tevent_timeval_current_ofs(1, 0)); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -491,7 +491,7 @@ static void notifyd_init_trigger(struct tevent_req *subreq) DBG_NOTICE("notifyd startup failed, rescheduling\n"); - subreq = tevent_wakeup_send(req, state->ev, + subreq = tevent_wakeup_send(state, state->ev, tevent_timeval_current_ofs(1, 0)); if (tevent_req_nomem(subreq, req)) { DBG_ERR("scheduling notifyd restart failed, giving up\n"); @@ -667,7 +667,7 @@ static struct tevent_req *cleanupd_init_send(struct tevent_context *ev, .ppid = ppid }; - subreq = tevent_wakeup_send(req, ev, tevent_timeval_current_ofs(0, 0)); + subreq = tevent_wakeup_send(state, ev, tevent_timeval_current_ofs(0, 0)); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -702,7 +702,7 @@ static void cleanupd_init_trigger(struct tevent_req *subreq) DBG_NOTICE("cleanupd startup failed, rescheduling\n"); - subreq = tevent_wakeup_send(req, state->ev, + subreq = tevent_wakeup_send(state, state->ev, tevent_timeval_current_ofs(1, 0)); if (tevent_req_nomem(subreq, req)) { DBG_ERR("scheduling cleanupd restart failed, giving up\n"); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1b9787b docs/vfs_fruit: explain when to use vfs_catia from fa99ae7 tls: Fix warning Wunused-variable https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1b9787b3191ae71d87f613e4c6d845cd7ed678b3 Author: Ralph Boehme <s...@samba.org> Date: Tue Sep 20 09:12:15 2016 -0700 docs/vfs_fruit: explain when to use vfs_catia Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Sep 21 03:54:59 CEST 2016 on sn-devel-144 --- Summary of changes: docs-xml/manpages/vfs_fruit.8.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index 473cc96..7a84f87 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -155,7 +155,10 @@ native - store characters with their native ASCII - value + value. Important: this option + requires the use of vfs_catia in + the VFS module stack as shown in the examples + section. -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4f9d956 s3/smbd: remove a misleading error message from def65c5 tevent_tutorial: Fix tevent_thread referencing https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4f9d956fc46007251127b989b1685d03eccf47a9 Author: Ralph Boehme <s...@samba.org> Date: Fri Sep 16 12:48:39 2016 +0200 s3/smbd: remove a misleading error message It can happen that we get 0 cleanup events, so remove this error message. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Fri Sep 16 16:43:16 CEST 2016 on sn-devel-144 --- Summary of changes: source3/smbd/smbd_cleanupd.c | 1 - 1 file changed, 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/smbd_cleanupd.c b/source3/smbd/smbd_cleanupd.c index 0deb8b0..152f63c 100644 --- a/source3/smbd/smbd_cleanupd.c +++ b/source3/smbd/smbd_cleanupd.c @@ -169,7 +169,6 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg, } if (ret == 0) { - DBG_ERR("got 0 cleanup events, expected at least 1\n"); TALLOC_FREE(frame); return; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 44a7040 s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address. via e84521d lib: Fix a pthreadpool race condition via 30f084d ctdb: Add a required include via 6c95148 ctdb: Fix format errors for time_t!=long from c89fa0d s3/vfs: gpfs: adapt vfs_gpfs_is_offline() to changes from 3031815f982e365be50148564d47d7d5afab46e0 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 44a7040500d74551b48eba04f5d0bedb1ec35ba6 Author: Jeremy Allison <j...@samba.org> Date: Mon Oct 17 10:07:23 2016 -0700 s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address. Analysis by: Rebecca Gellman <rebe...@starfleet-net.co.uk> Ignore cldap_socket_init() failure when sending multiple cldap netlogon requests. Allow cldap_netlogon_send() to catch the bad address and correctly return through a tevent subreq. Make sure cldap_search_send() copes with cldap parameter == NULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12381 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Oct 18 02:16:20 CEST 2016 on sn-devel-144 commit e84521dc44585fbde8b239bed2dcfaa1423d2796 Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 17 17:09:01 2016 +0200 lib: Fix a pthreadpool race condition Yes, there is one I've seen two flaky builds on sn-devel with pthreadpool after the coverity checks went in. They were in the ret = pthread_mutex_unlock(>mutex); assert(ret == 0); in pthreadpool_parent() and pthreadpool_child(). No idea what that was, I could not really reproduce that. A build attempt on FreeBSD also gave an erratic error, this time it was an EINVAL in ret = pthread_mutex_lock(>mutex); assert(ret == 0); pthreadpool_parent(). EINVAL means that the mutex is not a proper mutex. What happened: Someone (a detached thread) does the pthreadpool_free behind our back, while we are in pthreadpool_parent, preparing the fork. Unfortunately the mutex was already destroyed before we came to lock it. The fix is simple: Remove the obsolete struct pthreadpool from the linked list before the mutex is destroyed. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 30f084dfd072936d1226479f22d4065dec084136 Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 17 16:42:37 2016 +0200 ctdb: Add a required include exit(3) is defined in stdlib.h Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 6c95148f859c4608b416c47783178fbca0005370 Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 17 11:27:17 2016 +0200 ctdb: Fix format errors for time_t!=long Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: ctdb/server/ctdb_daemon.c | 4 ++-- ctdb/tools/ctdb.c | 4 ++-- ctdb/utils/smnotify/smnotify.c| 1 + libcli/cldap/cldap.c | 5 + source3/lib/pthreadpool/pthreadpool.c | 16 source3/libads/cldap.c| 17 +++-- 6 files changed, 33 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index fc1ce27..0d24e21 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1134,7 +1134,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp, if (diff.tv_sec > 3) { DEBUG(DEBUG_ERR, ("Handling event took %ld seconds!\n", - diff.tv_sec)); + (long)diff.tv_sec)); } tevent_before_wait_ts = now; break; @@ -1144,7 +1144,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp, if (diff.tv_sec > 3) { DEBUG(DEBUG_ERR, ("No event for %ld seconds!\n", - diff.tv_sec)); + (long)diff.tv_sec)); } tevent_after_wait_ts = now; break; diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index d2f78b8..2d61e22 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4630,9 +4630,9 @@ static void print
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 28fbc5e s3-net: use SMB_SIGNING_DEFAULT in connect_to_service() via 1f91b6a param: validate value in lp_canonicalize_parameter_with_value() via fa7e40b param: use early return in lp_canonicalize_parameter_with_value() via 21ae887 param: add lp_parameter_value_is_valid() function via 41cc17c net conf: fix error message from c1a316b samba_dnsupdate: Raise after the error count is incremented https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 28fbc5ea2e39bf23808aee5035cfc2f58b7fbcfd Author: Günther Deschner <g...@samba.org> Date: Fri Nov 18 18:17:52 2016 +0100 s3-net: use SMB_SIGNING_DEFAULT in connect_to_service() For non IPC$ connections we get NT_STATUS_REVISION_MISMATCH otherwise when using the connection. Guenther Signed-off-by: Guenther Deschner <g...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Nov 23 16:52:38 CET 2016 on sn-devel-144 commit 1f91b6aa63df4c48c49dabf8b30cde33579da17f Author: Michael Adam <ob...@samba.org> Date: Wed Nov 23 11:14:54 2016 +0100 param: validate value in lp_canonicalize_parameter_with_value() Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit fa7e40b92460c094e64cb175dfb297436fe483eb Author: Michael Adam <ob...@samba.org> Date: Wed Nov 23 11:12:42 2016 +0100 param: use early return in lp_canonicalize_parameter_with_value() This reduces the indentation and streamlines the flow. View with "git show -w" to see it's mostly indentation change. Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 21ae8871580fbcacfb0091fb83ba328448850b4d Author: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Date: Mon Nov 21 14:56:52 2016 +0100 param: add lp_parameter_value_is_valid() function Signed-off-by: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Reviewed-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 41cc17c8d174fc54754b11ff6f68b155909642f5 Author: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Date: Tue Nov 22 11:20:22 2016 +0100 net conf: fix error message Signed-off-by: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> --- Summary of changes: source3/param/loadparm.c | 98 +-- source3/utils/net_conf_util.c | 2 +- source3/utils/net_util.c | 7 +++- 3 files changed, 92 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 3e1a15e..21073c6 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1062,6 +1062,7 @@ static bool hash_a_service(const char *name, int number); static void free_service_byindex(int iService); static void show_parameter(int parmIndex); static bool is_synonym_of(int parm1, int parm2, bool *inverse); +static bool lp_parameter_value_is_valid(const char *parm_name, const char *val); /* * This is a helper function for parametrical options support. It returns a @@ -1687,9 +1688,11 @@ bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm, Turn the value given into the inverse boolean expression when the synonym is an invers boolean synonym. - Return true if parm_name is a valid parameter name and - in case it is an invers boolean synonym, if the val string could - successfully be converted to the reverse bool. + Return true if + - parm_name is a valid parameter name and + - val is a valid value for this parameter and + - in case the parameter is an inverse boolean synonym, if the val + string could successfully be converted to the reverse bool. Return false in all other cases. **/ @@ -1700,6 +1703,7 @@ bool lp_canonicalize_parameter_with_value(const char *parm_name, { int num; bool inverse; + bool ret; if (!lp_parameter_is_valid(parm_name)) { *canon_parm = NULL; @@ -1712,19 +1716,22 @@ bool lp_canonicalize_parameter_with_value(const char *parm_name, /* parametric option */ *canon_parm = parm_name; *canon_val = val; - } else { - *canon_parm = parm_table[num].label; - if (inverse) { - if (!lp_inver
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a0783e8 s3/smbd: fix the last resort check that sets the file type attribute from 6c6d63c ctdb-locking: Reset real-time priority in lock helper https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a0783e8dd966a0b2d24d2ca5baa6bed3fe5a7d5a Author: Jeremy Allison <j...@samba.org> Date: Fri Nov 18 10:20:41 2016 -0800 s3/smbd: fix the last resort check that sets the file type attribute The rule is, a directory (with any other attributes) should always also set FILE_ATTRIBUTE_DIRECTORY, a file should only set FILE_ATTRIBUTE_NORMAL if no other attributes is set. Iow, if a file contains any existing attributes (e.g. FILE_ATTRIBUTE_HIDDEN), don't add in the FILE_ATTRIBUTE_NORMAL attribute. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12436 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Nov 19 11:55:35 CET 2016 on sn-devel-144 --- Summary of changes: source3/smbd/dosmode.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index dab47c0..1789b55 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -636,12 +636,10 @@ uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname) result |= dos_mode_from_name(conn, smb_fname, result); - if (result == 0) { - if (S_ISDIR(smb_fname->st.st_ex_mode)) { - result = FILE_ATTRIBUTE_DIRECTORY; - } else { - result = FILE_ATTRIBUTE_NORMAL; - } + if (S_ISDIR(smb_fname->st.st_ex_mode)) { + result |= FILE_ATTRIBUTE_DIRECTORY; + } else if (result == 0) { + result = FILE_ATTRIBUTE_NORMAL; } result = filter_mode_by_protocol(result); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e56fa1f nfs4acls: Fix SMB_ACE4_MAX_TYPE define via 4194c07 ctdb-conn: add missing variable initialization from 34d98a8 Replaced string "Samba 4" with "Samba AD" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e56fa1f0e3fc42afe725c877d63add65ec8e Author: Volker Lendecke <v...@samba.org> Date: Mon Oct 10 14:24:31 2016 +0200 nfs4acls: Fix SMB_ACE4_MAX_TYPE define ACE4_SYSTEM_ALARM_ACE_TYPE does not exist Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Oct 11 02:17:10 CEST 2016 on sn-devel-144 commit 4194c0797f78293fe48105ce5af70f36a3c233a8 Author: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Date: Mon Oct 10 16:26:05 2016 +0200 ctdb-conn: add missing variable initialization Avoid potential crash in TALLOC_FREE(hdr). Signed-off-by: Ralph Wuerthner <ralph.wuerth...@de.ibm.com> Reviewed-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: source3/lib/ctdbd_conn.c| 2 +- source3/modules/nfs4_acls.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 1f8ac94..118f3a0 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -765,7 +765,7 @@ int ctdbd_db_attach(struct ctdbd_connection *conn, int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key) { struct ctdb_req_call_old req; - struct ctdb_req_header *hdr; + struct ctdb_req_header *hdr = NULL; struct iovec iov[2]; ssize_t nwritten; int ret; diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index ba6761d..a73b315 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -65,7 +65,7 @@ typedef struct _SMB_ACE4PROP_T { #defineSMB_ACE4_ACCESS_DENIED_ACE_TYPE 0x0001 #defineSMB_ACE4_SYSTEM_AUDIT_ACE_TYPE 0x0002 #defineSMB_ACE4_SYSTEM_ALARM_ACE_TYPE 0x0003 -#define SMB_ACE4_MAX_TYPE ACE4_SYSTEM_ALARM_ACE_TYPE /* largest valid ACE4_TYPE */ +#define SMB_ACE4_MAX_TYPE SMB_ACE4_SYSTEM_ALARM_ACE_TYPE /* largest valid ACE4_TYPE */ uint32_t aceFlags; /* Controls Inheritance and such */ /*The bitmask constants used for the flag field are as follows: */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 52fad16 s3: torture: Regression test case for permissions check on rename. via 91b5912 s3: smbd: Add missing permissions check on destination folder. via beb8a73 s3: smbd: Make check_parent_access() available to rename code. via 2bfad1c s3: smbd: rename - missing early error exit if source and destination prefixes are different. from 3aecad2 winbind: dom_sid_parse_endp always initializes "endp" when ok https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 52fad16f1c20109f352c25832d841ff778b2518a Author: Jeremy Allison <j...@samba.org> Date: Mon Dec 5 14:34:18 2016 -0800 s3: torture: Regression test case for permissions check on rename. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Wed Dec 7 11:52:03 CET 2016 on sn-devel-144 commit 91b591224ab7f8ea7b4594da9f61efef14353f7f Author: Jeremy Allison <j...@samba.org> Date: Mon Dec 5 14:32:55 2016 -0800 s3: smbd: Add missing permissions check on destination folder. Based on code from Michael Zeis <mzeis.quan...@gmail.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit beb8a73e95e768565760f79c2a16586bafb4e58c Author: Jeremy Allison <j...@samba.org> Date: Mon Dec 5 14:32:03 2016 -0800 s3: smbd: Make check_parent_access() available to rename code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 2bfad1c9d3237ad8d174b7dc2d1e6e3c53fdb8dc Author: Jeremy Allison <j...@samba.org> Date: Mon Dec 5 14:13:14 2016 -0800 s3: smbd: rename - missing early error exit if source and destination prefixes are different. Noticed by Michael Zeis <mzeis.quan...@gmail.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> --- Summary of changes: selftest/skip | 1 + source3/selftest/tests.py | 5 ++ source3/smbd/open.c | 2 +- source3/smbd/proto.h | 3 + source3/smbd/reply.c | 18 + source3/torture/torture.c | 192 ++ 6 files changed, 220 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/selftest/skip b/selftest/skip index ebef0e8..0893962 100644 --- a/selftest/skip +++ b/selftest/skip @@ -48,6 +48,7 @@ ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-EA # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-OFD-LOCK # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-STREAM-DELETE # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).RENAME-ACCESS # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).PIDHIGH # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).NTTRANS-FSCTL # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-NEGPROT # Fails against the s4 ntvfs server diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 7a4e2d7..a678c77 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -68,6 +68,11 @@ for t in tests: plantestsuite("samba3.smbtorture_s3.crypt_server(nt4_dc).%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"]) plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t, "ad_dc_ntvfs", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"]) +# +# RENAME-ACCESS needs to run against a special share - acl_xattr_ign_sysacl_windows +# +plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % "RENAME-ACCESS","nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), "RENAME-ACCESS", '//$SERVER_IP/acl_xattr_ign_sysacl_windows', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"]) +plantestsuite("samba3.smbtorture_s3.crypt_client(nt4_dc).%s&quo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e717ca6 vfs_gpfs: simplify stat_with_capability() ifdef via 2e8cdda vfs_gpfs: remove updating btime from stat VFS calls via adf4cea vfs_gpfs: update btime in vfs_gpfs_(f)get_dos_attributes from 1227065 idmap_autorid: Simplify idmap_autorid_loadconfig https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e717ca65cfb3d8fee28f3ccc1e96d765f637642d Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 15 18:10:22 2016 +0100 vfs_gpfs: simplify stat_with_capability() ifdef Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Sat Dec 17 12:58:07 CET 2016 on sn-devel-144 commit 2e8cdda78774d5ecd1b4c4e2e11edf3e0829b3b4 Author: Ralph Boehme <s...@samba.org> Date: Mon Nov 28 12:22:04 2016 +0100 vfs_gpfs: remove updating btime from stat VFS calls This is now handled by the vfs_gpfs_(f)get_dos_attributes. Getting rid of this in the stat VFS functions is a huge performance saver. perf report found that in a kernel copy workload smbd was spending considerable CPU time in vfs_gpfs_(f|l)stat -> gpfs_get_winattrs. Most of the time the VFS stat caller is not interested in the btime. The SMB frontend processing around btime is designed to fetch btime together with DOS attributes via dos_mode() in all places that need these attributes. That's the way it is implemented in the default VFS module and that's what vfs_gpfs now does as well for performance reasons. This makes vfs_gpfs_fstat a null op and I'm therefor removing it. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> commit adf4cea1db46f2898540c041003da5b4bd447f80 Author: Ralph Boehme <s...@samba.org> Date: Thu Dec 15 07:09:58 2016 +0100 vfs_gpfs: update btime in vfs_gpfs_(f)get_dos_attributes This paves the way for removing btime updates from the stat VFS functions. This way we behave like the default VFS module where DOS attributes and btime are fetched from the same backing store and the frontend is designed around using dos_mode() -> SMB_VFS_GET_ATTRIBUTES to update both attributes as necessary in the SMB processing. Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> --- Summary of changes: source3/modules/vfs_gpfs.c | 98 ++ 1 file changed, 12 insertions(+), 86 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 89ce3b7..f7434c9 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1565,6 +1565,9 @@ static NTSTATUS vfs_gpfs_get_dos_attributes(struct vfs_handle_struct *handle, } *dosmode |= vfs_gpfs_winattrs_to_dosmode(attrs.winAttrs); + smb_fname->st.st_ex_calculated_birthtime = false; + smb_fname->st.st_ex_btime.tv_sec = attrs.creationTime.tv_sec; + smb_fname->st.st_ex_btime.tv_nsec = attrs.creationTime.tv_nsec; return NT_STATUS_OK; } @@ -1597,6 +1600,9 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle, } *dosmode |= vfs_gpfs_winattrs_to_dosmode(attrs.winAttrs); + fsp->fsp_name->st.st_ex_calculated_birthtime = false; + fsp->fsp_name->st.st_ex_btime.tv_sec = attrs.creationTime.tv_sec; + fsp->fsp_name->st.st_ex_btime.tv_nsec = attrs.creationTime.tv_nsec; return NT_STATUS_OK; } @@ -1669,10 +1675,10 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -#if defined(HAVE_FSTATAT) static int stat_with_capability(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, int flag) { +#if defined(HAVE_FSTATAT) int fd = -1; bool b; char *dir_name; @@ -1706,15 +1712,14 @@ static int stat_with_capability(struct vfs_handle_struct *handle, } return ret; -} +#else + return -1; #endif +} static int vfs_gpfs_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { - struct gpfs_winattr attrs; - char *fname = NULL; - NTSTATUS status; int ret; struct gpfs_config_data *config; @@ -1723,73 +1728,17 @@ static int vfs_gpfs_stat(struct vfs_handle_struct *handle, return -1); ret = SMB_VFS_NEXT_STAT(handle, smb_fname); -#if defined(HAVE_FSTATAT) if (ret