[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 770edb6 s3:smbcacls add prompt for password from 1e7bec4 lib: Fix a comment https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 770edb6aab2a1c2cbd85b975511b33b5fc580f13 Author: Christian Ambach Date: Thu May 4 12:21:45 2017 +0200 s3:smbcacls add prompt for password if no password was given, ask for one BUG: https://bugzilla.samba.org/show_bug.cgi?id=12765 Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu May 4 20:36:50 CEST 2017 on sn-devel-144 --- Summary of changes: source3/utils/smbcacls.c | 1 + 1 file changed, 1 insertion(+) Changeset truncated at 500 lines: diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 255ff97..18fb8b0 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -903,6 +903,7 @@ int main(int argc, char *argv[]) poptFreeContext(pc); popt_burn_cmdline_password(argc, argv); + popt_common_credentials_post(); string_replace(path,'/','\\'); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 064d240 s4:samba_spnupdate: do not attempt to parse log level, use parsed value via 92178f0 python/join: do not attempt to parse log level, use parsed value via dd25aa1 python/drs_utils: do not attempt to parse log level, use parsed value via fa56dbf tests/param add a test for LoadParm.log_level via 7ba50a2 s4:param add log_level function to retrieve log level in Python code from e62ff6c unix_msg: Fix unix_dgram_send_queue_init https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 064d24032398c8896da15246be81fdd4b1588e18 Author: Christian Ambach Date: Tue Sep 13 10:49:47 2016 +0200 s4:samba_spnupdate: do not attempt to parse log level, use parsed value The log level parameter can contain debug class specific entries. Do not attempt to parse this as int, but use the values that the debugging system already parsed BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Sep 14 23:15:18 CEST 2016 on sn-devel-144 commit 92178f02bd09277f783eb68b476cfd1452c7f9ef Author: Christian Ambach Date: Tue Sep 13 10:49:47 2016 +0200 python/join: do not attempt to parse log level, use parsed value The log level parameter can contain debug class specific entries. Do not attempt to parse this as int, but use the values that the debugging system already parsed BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit dd25aa129b6d799853312134628402f77b492eab Author: Christian Ambach Date: Tue Sep 13 10:49:47 2016 +0200 python/drs_utils: do not attempt to parse log level, use parsed value The log level parameter can contain debug class specific entries. Do not attempt to parse this as int, but use the values that the debugging system already parsed BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit fa56dbf6706872c5287eab082bb6ba7b5bd3ccd2 Author: Christian Ambach Date: Tue Sep 13 11:22:38 2016 +0200 tests/param add a test for LoadParm.log_level Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit 7ba50a200924119ac1a66759e4c1419ece03ba41 Author: Christian Ambach Date: Tue Sep 13 10:48:03 2016 +0200 s4:param add log_level function to retrieve log level in Python code Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett --- Summary of changes: python/samba/drs_utils.py | 2 +- python/samba/join.py | 4 ++-- python/samba/tests/param.py | 6 ++ source4/param/pyparam.c | 9 + source4/scripting/bin/samba_spnupdate | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py index 6c8afae..07fc05a 100644 --- a/python/samba/drs_utils.py +++ b/python/samba/drs_utils.py @@ -44,7 +44,7 @@ def drsuapi_connect(server, lp, creds): """ binding_options = "seal" -if int(lp.get("log level")) >= 5: +if lp.log_level() >= 5: binding_options += ",print" binding_string = "ncacn_ip_tcp:%s[%s]" % (server, binding_options) try: diff --git a/python/samba/join.py b/python/samba/join.py index d1a1b08..a50a409 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -402,7 +402,7 @@ class dc_join(object): def drsuapi_connect(ctx): '''make a DRSUAPI connection to the naming master''' binding_options = "seal" -if int(ctx.lp.get("log level")) >= 4: +if ctx.lp.log_level() >= 4: binding_options += ",print" binding_string = "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options) ctx.drsuapi = drsuapi.drsuapi(binding_string, ctx.lp, ctx.creds) @@ -868,7 +868,7 @@ class dc_join(object): repl_creds = ctx.creds binding_options = "seal" -if int(ctx.lp.get("log level")) >= 5: +if ctx.lp.log_level() >= 5: binding_options += ",print" repl = drs_utils.drs_Replicate( "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options), diff --git a/python/samba/tests/param.py b/python/samba/tests/param.py index f539eba..684c17c 100644 --- a/python/samba/tests/param.py +++ b/python/samba/tests/param.py @@ -55,3 +55,9 @@ clas
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9b45ba5 gensec/spnego: work around missing server mechListMIC in SMB servers from a7735be kcc: Fix a -Werror,-Wformat-security error https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9b45ba5cd53bd513eb777590815a0b8408af64e2 Author: Stefan Metzmacher Date: Thu Sep 1 08:08:23 2016 +0200 gensec/spnego: work around missing server mechListMIC in SMB servers BUG: https://bugzilla.samba.org/show_bug.cgi?id=11994 Signed-off-by: Stefan Metzmacher Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Sep 2 18:10:44 CEST 2016 on sn-devel-144 --- Summary of changes: auth/gensec/spnego.c | 69 +++- 1 file changed, 68 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c index ef30ab7..5f5047a 100644 --- a/auth/gensec/spnego.c +++ b/auth/gensec/spnego.c @@ -55,9 +55,11 @@ struct spnego_state { DATA_BLOB mech_types; size_t num_targs; + bool downgraded; bool mic_requested; bool needs_mic_sign; bool needs_mic_check; + bool may_skip_mic_check; bool done_mic_check; bool simulate_w2k; @@ -434,6 +436,7 @@ static NTSTATUS gensec_spnego_parse_negTokenInit(struct gensec_security *gensec_ * Indicate the downgrade and request a * mic. */ + spnego_state->downgraded = true; spnego_state->mic_requested = true; break; } @@ -1078,7 +1081,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA DEBUG(3,("GENSEC SPNEGO: client preferred mech (%s) not accepted, server wants: %s\n", gensec_get_name_by_oid(gensec_security, spnego_state->neg_oid), gensec_get_name_by_oid(gensec_security, spnego.negTokenTarg.supportedMech))); - + spnego_state->downgraded = true; spnego_state->no_response_expected = false; talloc_free(spnego_state->sub_sec_security); nt_status = gensec_subcontext_start(spnego_state, @@ -1135,6 +1138,23 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA return NT_STATUS_INVALID_PARAMETER; } + if (spnego.negTokenTarg.mechListMIC.length == 0 + && spnego_state->may_skip_mic_check) { + /* +* In this case we don't require +* a mechListMIC from the server. +* +* This works around bugs in the Azure +* and Apple spnego implementations. +* +* See +* https://bugzilla.samba.org/show_bug.cgi?id=11994 +*/ + spnego_state->needs_mic_check = false; + nt_status = NT_STATUS_OK; + goto client_response; + } + nt_status = gensec_check_packet(spnego_state->sub_sec_security, spnego_state->mech_types.data, spnego_state->mech_types.length, @@ -1190,9 +1210,56 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA */ new_spnego = false; } + break; case SPNEGO_ACCEPT_INCOMPLETE: + if (spnego.negTokenTarg.mechListMIC.length > 0) { + new_spnego = true; + break; + } + + if (spnego_state->downgraded) { + /* +* A downgrade should be protected if +* supported +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6b232b2 smbd:close: only remove kernel share modes if they had been taken at open via 3564873 s3:vfs: add 'kernel_share_modes_taken' to files_struct from 1171fe6 s3-net: Cleanup the code of printing migration https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6b232b2720a3d71bc0b4b5603215b3f9d3de5ca6 Author: Michael Adam Date: Sun May 15 23:24:08 2016 +0200 smbd:close: only remove kernel share modes if they had been taken at open This avoids errors due to 'not implemented' for SMB_VFS_KERNEL_FLOCK on some file systems like glusterfs (with the vfs module). The only other code path where SMB_VFS_KERNEL_FLOCK is called, is already protected. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11919 Signed-off-by: Michael Adam Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu May 19 02:34:36 CEST 2016 on sn-devel-144 commit 356487345724ce5dffdddf9c60735b2c965f30bc Author: Michael Adam Date: Mon May 16 01:39:09 2016 +0200 s3:vfs: add 'kernel_share_modes_taken' to files_struct This will allow to track whether kernel share modes have been taken at open and correclty remove them again on close. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11919 Signed-off-by: Michael Adam Reviewed-by: Christian Ambach --- Summary of changes: source3/include/vfs.h | 2 ++ source3/smbd/close.c | 17 ++--- source3/smbd/open.c | 2 ++ 3 files changed, 14 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 9360802..a849443 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -259,6 +259,8 @@ typedef struct files_struct { uint32_t access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */ uint32_t share_access; /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */ + bool kernel_share_modes_taken; + bool update_write_time_triggered; struct tevent_timer *update_write_time_event; bool update_write_time_on_close; diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 0302c67..9d1f1a9 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -250,7 +250,6 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, const struct security_token *del_nt_token = NULL; bool got_tokens = false; bool normal_close; - int ret_flock; /* Ensure any pending write time updates are done. */ if (fsp->update_write_time_event) { @@ -474,12 +473,16 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, pop_sec_ctx(); } - /* remove filesystem sharemodes */ - ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); - if (ret_flock == -1) { - DEBUG(2, ("close_remove_share_mode: removing kernel flock for " - "%s failed: %s\n", fsp_str_dbg(fsp), - strerror(errno))); + if (fsp->kernel_share_modes_taken) { + int ret_flock; + + /* remove filesystem sharemodes */ + ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); + if (ret_flock == -1) { + DEBUG(2, ("close_remove_share_mode: removing kernel " + "flock for %s failed: %s\n", + fsp_str_dbg(fsp), strerror(errno))); + } } if (!del_share_mode(lck, fsp)) { diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d111254..af1c1de 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3102,6 +3102,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, return NT_STATUS_SHARING_VIOLATION; } + + fsp->kernel_share_modes_taken = true; } /* -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 39081af selftest: Add a blackbox test for smbget via 6ceba4d selftest: add a helper for the smbget binary via 2588cf3 selftest: Reduce code duplication via fcb56e0 s3:utils/smbget fix option parsing via dc0bd62 WHATSNEW: document removal of -P in smbget via 301c698 s3:utils/smbget update manpage with -P option removal via dfc3504 s3:utils/smbget remove -P option via 113f8dd s3:utils/smbget improve check of write() result via 01ba35dc s3:utils/smbget abort recursive download on error via c91dde9 s3:utils/smbget another int -> bool conversion from 0c74d62 s3:libads: setup the msDS-SupportedEncryptionTypes attribute on ldap_add https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 39081afbe5f79192f6b42aa5670ebb757c98e875 Author: Christian Ambach Date: Sat Feb 6 10:30:29 2016 +0100 selftest: Add a blackbox test for smbget Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Feb 26 14:40:55 CET 2016 on sn-devel-144 commit 6ceba4def6641c94c794bb62b4c470c0ac60b83a Author: Christian Ambach Date: Thu Feb 4 21:41:08 2016 +0100 selftest: add a helper for the smbget binary Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit 2588cf37c05d0247bb7a9ac9572b0ccf11c63ec0 Author: Christian Ambach Date: Thu Feb 18 00:48:04 2016 +0100 selftest: Reduce code duplication Factor out a createuser sub. Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit fcb56e0e1150f995823aff7dbcb0c09b87a39f6d Author: Christian Ambach Date: Sat Feb 20 21:11:51 2016 +0100 s3:utils/smbget fix option parsing * use proper values for val in poptOption * popt does not support bool, so set them via the switch statement * abort when option parsing reported errors Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit dc0bd62a236e9d58370fb6d2be668f6a75f2998a Author: Christian Ambach Date: Wed Feb 17 22:57:59 2016 +0100 WHATSNEW: document removal of -P in smbget Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit 301c69816c87c92184155a59814fd2d6652ea76e Author: Christian Ambach Date: Wed Feb 17 19:25:59 2016 +0100 s3:utils/smbget update manpage with -P option removal Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit dfc35044d81d413b03d5bf2b33c07c82a244ff57 Author: Christian Ambach Date: Mon Feb 15 22:25:11 2016 +0100 s3:utils/smbget remove -P option as agreed on samba-technical list. It does not really provide a useful function but can cause confusion Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit 113f8dd3d9e0d04b03b61f415b3c410ba75260f5 Author: Christian Ambach Date: Mon Feb 8 23:27:09 2016 +0100 s3:utils/smbget improve check of write() result check that all bytes in the buffer have been written Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit 01ba35dca2f721fa5b3c31da7fa991e7d1479cc7 Author: Christian Ambach Date: Mon Feb 8 23:25:04 2016 +0100 s3:utils/smbget abort recursive download on error Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider commit c91dde9caec39ac76d50602f8b32b6917dfeefba Author: Christian Ambach Date: Mon Feb 8 23:24:36 2016 +0100 s3:utils/smbget another int -> bool conversion Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider --- Summary of changes: WHATSNEW.txt| 1 + docs-xml/manpages/smbget.1.xml | 6 - selftest/selftesthelpers.py | 1 + selftest/target/Samba3.pm | 55 + source3/script/tests/test_smbget.sh | 236 source3/selftest/tests.py | 1 + source3/utils/smbget.c | 119 +- 7 files changed, 332 insertions(+), 87 deletions(-) create mode 100755 source3/script/tests/test_smbget.sh Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 7c748c2..d81e1ed6 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -71,6 +71,7 @@ The -u and -p options for user and password were replaced by the -U option that accepts username[%password] as in many other tools of the Samba suite. Similary, smbgetrc files do not accept username and password options any more, only a single "user" option which also accepts user%password combinations. +The -P option was removed. s4-rpc_server - diff --git a/docs-xml/manpages/smbget.1.xml b/docs-xml/manpages/smbget.1.x
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9df07e6 Group creation: Add msSFU30Name only when --nis-domain was given from 95fc7fb lib: ldap: Properly check talloc error returns. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9df07e6f1bcea55fcdab777c3f45a1a6ca88f69e Author: Marc Muehlfeld Date: Thu Jun 11 21:20:55 2015 +0200 Group creation: Add msSFU30Name only when --nis-domain was given This fixes a bug, that all new created groups automatically get an msSFU30Name attribute added. This should only be the case, when we also have a nis-domain (samba-tool --nis-domain=...). Bugreport: https://bugzilla.samba.org/show_bug.cgi?id=11315 Signed-off-by: Marc Muehlfeld Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Jun 16 11:58:02 CEST 2015 on sn-devel-104 --- Summary of changes: python/samba/samdb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/samdb.py b/python/samba/samdb.py index e74e823..e3a6292 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -191,8 +191,6 @@ pwdLastSet: 0 "sAMAccountName": groupname, "objectClass": "group"} -ldbmessage["msSFU30Name"] = groupname - if grouptype is not None: ldbmessage["groupType"] = normalise_int32(grouptype) @@ -209,6 +207,7 @@ pwdLastSet: 0 ldbmessage["gidNumber"] = normalise_int32(gidnumber) if nisdomain is not None: +ldbmessage["msSFU30Name"] = groupname ldbmessage["msSFU30NisDomain"] = nisdomain if sd is not None: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3b90bfb s3:utils/profiles fix a use after free via 4b41489 s3:registry/regfio fix some valgrind warnings via 217a018 s3:registry/regfio read SD from the correct location from 8c41795 s3-libsmb: Duplicate the memory before we free it. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3b90bfb1089e6a4b7e05e7ed62bb642521f57917 Author: Christian Ambach Date: Tue Nov 4 23:51:23 2014 +0100 s3:utils/profiles fix a use after free path is a talloc-child of subkeys, so subkeys should not be freed before calling verbose_output Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Dec 3 00:43:19 CET 2014 on sn-devel-104 commit 4b41489901b7f1a78ffd479128c3e0d309e53b53 Author: Christian Ambach Date: Tue Nov 4 23:50:07 2014 +0100 s3:registry/regfio fix some valgrind warnings Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher commit 217a0189c15761f6c7b24c9d7bfdbccf85de8e1d Author: Christian Ambach Date: Tue Nov 4 23:47:26 2014 +0100 s3:registry/regfio read SD from the correct location try to find the security descriptor at the data pointer, not at the beginning of the hbin Bug: https://bugzilla.samba.org/show_bug.cgi?id=9629 Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher --- Summary of changes: source3/registry/regfio.c | 10 ++ source3/utils/profiles.c | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index fe80094..e49de26 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -768,8 +768,10 @@ static bool hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_ if (!prs_copy_data_in(&hbin->ps, (const char *)blob.data, blob.length)) return False; } else { - blob = data_blob_const(prs_data_p(&hbin->ps), - prs_data_size(&hbin->ps)); + blob = data_blob_const( + prs_data_p(&hbin->ps) + prs_offset(&hbin->ps), + prs_data_size(&hbin->ps) - prs_offset(&hbin->ps) + ); status = unmarshall_sec_desc(mem_ctx, blob.data, blob.length, &sk->sec_desc); @@ -1739,7 +1741,7 @@ static bool create_vk_record(REGF_FILE *file, REGF_VK_REC *vk, /* make sure we don't try to copy from a NULL value pointer */ if ( vk->data_size != 0 ) - memcpy( &vk->data_off, regval_data_p(value), sizeof(uint32) ); + memcpy( &vk->data_off, regval_data_p(value), vk->data_size); vk->data_size |= VK_DATA_IN_OFFSET; } @@ -1804,7 +1806,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 ) REGF_HASH_REC *hash = &parent->subkeys.hashes[parent->subkey_index]; hash->nk_off = prs_offset( &nk->hbin->ps ) + nk->hbin->first_hbin_off - HBIN_HDR_SIZE; - memcpy( hash->keycheck, name, sizeof(uint32) ); + memcpy(hash->keycheck, name, MIN(strlen(name),sizeof(uint32))); hash->fullname = talloc_strdup( file->mem_ctx, name ); parent->subkey_index++; diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index 0f274ad..22c8f72 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -189,12 +189,12 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, } } - /* values is a talloc()'d child of subkeys here so just throw it all away */ - - TALLOC_FREE( subkeys ); verbose_output("[%s]\n", path); + /* values is a talloc()'d child of subkeys here so just throw it all away */ + TALLOC_FREE(subkeys); + return True; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2ee7d01 s3:vfs_afsacl fix compiler warnings via c3607d2 vfs_afsacl: remove unused includes via b7ce3f6 waf: fixup build with fake kaserver enabled via eafb7e3 waf: add --with-fake-kaserver option via 558850c s3:lib/afs move afs_settoken.c to common lib dir via 89961ca s3:lib/afs move afs.c to common lib dir from 62b4d44 s3-winbind: Use strlcpy to avoid log entry. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2ee7d017e88469f4d9fde2e7f7a062b27fb7df82 Author: Christian Ambach Date: Sun May 25 00:35:09 2014 +0200 s3:vfs_afsacl fix compiler warnings Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Jun 4 22:34:51 CEST 2014 on sn-devel-104 commit c3607d2edf9572e9170bc57f816068da3d1b5e04 Author: Christian Ambach Date: Wed May 14 15:39:44 2014 +0200 vfs_afsacl: remove unused includes * auth.h might cause collisions with the Heimdal headers * we should not include afs/afs.h directly, see https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1319336 http://rt.central.org/rt/Ticket/Display.html?id=131737 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit b7ce3f6ce3326df5c5dc1d20fed389f899a0f6f6 Author: Christian Ambach Date: Wed Apr 23 17:03:47 2014 +0200 waf: fixup build with fake kaserver enabled Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit eafb7e33bcb78e87dc3781fc2c9bf9a31f5281b2 Author: Christian Ambach Date: Wed Apr 16 00:36:25 2014 +0200 waf: add --with-fake-kaserver option This option was not added during the transition from autoconf to waf. Bring it back so that the code can be used again. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9916 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit 558850c495880a916fbc4285993e3adda590453f Author: Christian Ambach Date: Mon Apr 14 22:35:21 2014 +0200 s3:lib/afs move afs_settoken.c to common lib dir Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit 89961ca2972b087ae4a974ce223b75263ec1ee1f Author: Christian Ambach Date: Mon Apr 14 22:11:12 2014 +0200 s3:lib/afs move afs.c to common lib dir some of the code in afs.c is needed by wbinfo that lives in the toplevel nsswitch directory, so move the afs.c file to a new top-level lib/afs directory. Use the name afs_funcs to avoid collisions with the afs.h header from OpenAFS Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett --- Summary of changes: lib/afs/afs_funcs.c | 310 +++ lib/afs/afs_funcs.h | 42 ++ lib/afs/afs_settoken.c | 264 + lib/afs/afs_settoken.h | 21 +++ lib/afs/wscript_build | 10 ++ nsswitch/wbinfo.c |1 + source3/include/proto.h | 11 -- source3/lib/afs.c | 309 -- source3/lib/afs_settoken.c | 262 - source3/modules/vfs_afsacl.c|7 +- source3/smbd/service.c |1 + source3/utils/net_afs.c |5 + source3/winbindd/winbindd_pam.c |1 + source3/wscript | 13 ++ source3/wscript_build |9 +- wscript_build |1 + 16 files changed, 673 insertions(+), 594 deletions(-) create mode 100644 lib/afs/afs_funcs.c create mode 100644 lib/afs/afs_funcs.h create mode 100644 lib/afs/afs_settoken.c create mode 100644 lib/afs/afs_settoken.h create mode 100644 lib/afs/wscript_build delete mode 100644 source3/lib/afs.c delete mode 100644 source3/lib/afs_settoken.c Changeset truncated at 500 lines: diff --git a/lib/afs/afs_funcs.c b/lib/afs/afs_funcs.c new file mode 100644 index 000..8a3c90a --- /dev/null +++ b/lib/afs/afs_funcs.c @@ -0,0 +1,310 @@ +/* + * Unix SMB/CIFS implementation. + * Generate AFS tickets + * Copyright (C) Volker Lendecke 2003 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a581f23 smbd: Remove unused code for dos attributes in stat struct from 3f60f0e Fix selfetet environment user gid http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a581f23217b32a62768f651a371f40b02c00243d Author: Christof Schmitt Date: Thu Apr 17 13:46:38 2014 -0700 smbd: Remove unused code for dos attributes in stat struct This code is unused since the move to the waf build system. Signed-off-by: Christof Schmitt Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed May 14 01:35:41 CEST 2014 on sn-devel-104 --- Summary of changes: source3/smbd/dosmode.c | 139 ++-- 1 files changed, 4 insertions(+), 135 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index a99f6f2..6a6f673 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -552,115 +552,6 @@ uint32 dos_mode_msdfs(connection_struct *conn, return(result); } -#ifdef HAVE_STAT_DOS_FLAGS -/ - Convert dos attributes (FILE_ATTRIBUTE_*) to dos stat flags (UF_*) -/ - -int dos_attributes_to_stat_dos_flags(uint32_t dosmode) -{ - uint32_t dos_stat_flags = 0; - - if (dosmode & FILE_ATTRIBUTE_ARCHIVE) - dos_stat_flags |= UF_DOS_ARCHIVE; - if (dosmode & FILE_ATTRIBUTE_HIDDEN) - dos_stat_flags |= UF_DOS_HIDDEN; - if (dosmode & FILE_ATTRIBUTE_READONLY) - dos_stat_flags |= UF_DOS_RO; - if (dosmode & FILE_ATTRIBUTE_SYSTEM) - dos_stat_flags |= UF_DOS_SYSTEM; - if (dosmode & FILE_ATTRIBUTE_NONINDEXED) - dos_stat_flags |= UF_DOS_NOINDEX; - - return dos_stat_flags; -} - -/ - Gets DOS attributes, accessed via st_ex_flags in the stat struct. -/ - -static bool get_stat_dos_flags(connection_struct *conn, - const struct smb_filename *smb_fname, - uint32_t *dosmode) -{ - SMB_ASSERT(VALID_STAT(smb_fname->st)); - SMB_ASSERT(dosmode); - - if (!lp_store_dos_attributes(SNUM(conn))) { - return false; - } - - DEBUG(5, ("Getting stat dos attributes for %s.\n", - smb_fname_str_dbg(smb_fname))); - - if (smb_fname->st.st_ex_flags & UF_DOS_ARCHIVE) - *dosmode |= FILE_ATTRIBUTE_ARCHIVE; - if (smb_fname->st.st_ex_flags & UF_DOS_HIDDEN) - *dosmode |= FILE_ATTRIBUTE_HIDDEN; - if (smb_fname->st.st_ex_flags & UF_DOS_RO) - *dosmode |= FILE_ATTRIBUTE_READONLY; - if (smb_fname->st.st_ex_flags & UF_DOS_SYSTEM) - *dosmode |= FILE_ATTRIBUTE_SYSTEM; - if (smb_fname->st.st_ex_flags & UF_DOS_NOINDEX) - *dosmode |= FILE_ATTRIBUTE_NONINDEXED; - if (smb_fname->st.st_ex_flags & FILE_ATTRIBUTE_SPARSE) - *dosmode |= FILE_ATTRIBUTE_SPARSE; - if (S_ISDIR(smb_fname->st.st_ex_mode)) - *dosmode |= FILE_ATTRIBUTE_DIRECTORY; - - *dosmode |= set_link_read_only_flag(&smb_fname->st); - - return true; -} - -/ - Sets DOS attributes, stored in st_ex_flags of the inode. -/ - -static bool set_stat_dos_flags(connection_struct *conn, - const struct smb_filename *smb_fname, - uint32_t dosmode, - bool *attributes_changed) -{ - uint32_t new_flags = 0; - int error = 0; - - SMB_ASSERT(VALID_STAT(smb_fname->st)); - SMB_ASSERT(attributes_changed); - - *attributes_changed = false; - - if (!lp_store_dos_attributes(SNUM(conn))) { - return false; - } - - DEBUG(5, ("Setting stat dos attributes for %s.\n", - smb_fname_str_dbg(smb_fname))); - - new_flags = (smb_fname->st.st_ex_flags & ~UF_DOS_FLAGS) | -dos_attributes_to_stat_dos_flags(dosmode); - - /* Return early if no flags changed. */ - if (new_flags == smb_fname->st.st_ex_flags) - return true; - - DEBUG(5, ("Setting stat dos attributes=0x%x, prev=0x%x\n", new_flags, - smb_fname->
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via da891e2 waf:lib/replace gettext configure checks via 31db0c8 waf:lib/replace fix gettext detection via a83f491 waf:lib/replace change detection of gettext via df6ddcf waf:lib/replace fix up libintl related checks via 1a42ff7 waf:lib/replace correct detection of libiconv via 15b2d1a waf: improve iconv checks from c20753c selftest: Use the absolute path to libnss_winbind.so. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit da891e2101c568d2f0b9a2bda78702826ea68f3c Author: Christian Ambach Date: Thu Jul 25 19:41:02 2013 +0200 waf:lib/replace gettext configure checks Make sure we only try to work with gettext if we found the prototypes and were able to link Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104 commit 31db0c8acdd68f396417e1f6504a91a40295bc89 Author: Christian Ambach Date: Thu Dec 12 22:10:36 2013 +0100 waf:lib/replace fix gettext detection if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS so we can find it during configure and build Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit a83f491810d34cc8b6eb4b0f401440e0f84d Author: Christian Ambach Date: Thu Dec 12 22:12:07 2013 +0100 waf:lib/replace change detection of gettext convert this to an automatic check: if no option is given, try to find gettext and if found, use it if user has specified --with-gettext, then bail out if it could not be found in case of --without-gettext, skip all gettext related configure checks Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit df6ddcfbfcd33274c1b768ce26829b0ad9278cd0 Author: Christian Ambach Date: Thu Jan 2 22:23:16 2014 +0100 waf:lib/replace fix up libintl related checks on a default installation of AIX, libintl.a exists but libintl.h does not So check for the declarations of those functions as well to make sure that the build works. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit 1a42ff7d8db63b26e2beb43268a1c4664723358e Author: Christian Ambach Date: Thu Jan 2 23:28:20 2014 +0100 waf:lib/replace correct detection of libiconv add -liconv as a complete command line argument, not all characters on their own Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit 15b2d1a658b3fc428c20a7a461168f464951f40f Author: Christian Ambach Date: Wed Dec 4 22:50:11 2013 +0100 waf: improve iconv checks there are broken iconv implementations around (e.g. on AIX) that you can compile against but that refuse any mapping requests make sure we do the same as the autoconf-based build did and fall back to our own code Bug: https://bugzilla.samba.org/show_bug.cgi?id=10308 Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett --- Summary of changes: buildtools/wafsamba/wscript |3 +-- lib/replace/wscript | 28 +++- source3/build/charset.py|6 ++ 3 files changed, 30 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index fe2e515..7984227 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -80,8 +80,7 @@ def set_options(opt): match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h']) opt.add_option('--with-gettext', help='additional directory to search for gettext', - action='store', dest='gettext_location', default='/usr/local', - match = ['Checking for library intl', 'Checking for header libintl.h']) + action='store', dest='gettext_location', default='None') opt.add_option('--without-gettext', help=("Disable use of gettext"), action="store_true", dest='disable_gettext', default=False) diff --git a/lib/replace/wscript b/lib/replace/wscript index a316032..ab95018 100644 --- a/lib
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8eef4ab s3-lib: Fix %G substitution for domain users in smbd via 7393781 s3:winbindd fix use of uninitialized variables via a24c25b s3:lib/asys modify included headers from f98d10a smbd: Always use UCF_PREP_CREATEFILE for filename_convert calls to resolve a path for open. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8eef4ab79ec5fb7e96ad2f2ad6c9bf30db13a50d Author: Andreas Schneider Date: Wed Nov 27 17:21:01 2013 +0100 s3-lib: Fix %G substitution for domain users in smbd BUG: https://bugzilla.samba.org/show_bug.cgi?id=10286 Signed-off-by: Andreas Schneider Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Dec 10 16:39:43 CET 2013 on sn-devel-104 commit 7393781a57891687b464762b0954e6c936f750bb Author: Christian Ambach Date: Mon Sep 16 13:18:17 2013 +0200 s3:winbindd fix use of uninitialized variables Bug: https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher commit a24c25bddeafefe7de713dbbd26ac3ee6d50a61f Author: Christian Ambach Date: Fri Nov 22 05:12:05 2013 +0100 s3:lib/asys modify included headers use the headers from libreplace, not the system ones Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- Summary of changes: source3/lib/asys/asys.h |6 ++ source3/lib/substitute.c | 12 +++- source3/winbindd/winbindd_cache.c | 13 + 3 files changed, 26 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/asys/asys.h b/source3/lib/asys/asys.h index 73f1051..10805bd 100644 --- a/source3/lib/asys/asys.h +++ b/source3/lib/asys/asys.h @@ -19,10 +19,8 @@ #ifndef __ASYS_H__ #define __ASYS_H__ -#include -#include -#include -#include +#include "replace.h" +#include "system/filesys.h" /** * @defgroup asys The async syscall library diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index ca2ac79..937f02c 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -499,10 +499,20 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx, break; case 'G' : { struct passwd *pass; - r = talloc_strdup(tmp_ctx, smb_name); + + if (domain_name != NULL && domain_name[0] != '\0') { + r = talloc_asprintf(tmp_ctx, + "%s%c%s", + domain_name, + *lp_winbind_separator(), + smb_name); + } else { + r = talloc_strdup(tmp_ctx, smb_name); + } if (r == NULL) { goto error; } + pass = Get_Pwnam_alloc(tmp_ctx, r); if (pass != NULL) { a_string = realloc_string_sub( diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 276ec8e..b9cfd82 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -2126,6 +2126,19 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain, old_status) { have_mapped = have_unmapped = false; + *names = talloc_array(mem_ctx, char *, num_rids); + if (*names != NULL) { + result = NT_STATUS_NO_MEMORY; + goto error; + } + + *types = talloc_array(mem_ctx, enum lsa_SidType, + num_rids); + if (*types != NULL) { + result = NT_STATUS_NO_MEMORY; + goto error; + } + for (i=0; i
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5390ff5 lib/ntdb optimize includes in ntdb tools via 0f41792 lib/ntdb optimize includes in ntdb tests via 7be0e91 lib/ntdb correct includes in private header via 794db9e lib/ntdb fix compilation when libreplace is not around via 100f324 lib/socket_wrapper fix compilation when libreplace is not around via 5e2f59d s3:vfs_btrfs change includes via ade52f6 s3:pam_smbpass change includes from 2eda479 s3:vfs fix a compile warning http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5390ff5a26f7868336d8136b0361943080dd7f5b Author: Christian Ambach Date: Fri Nov 22 05:19:16 2013 +0100 lib/ntdb optimize includes in ntdb tools use the private header (which will use libreplace or system headers) instead of direct includes of system includes Signed-off-by: Christian Ambach Reviewed-by: Rusty Russell Autobuild-User(master): Christian Ambach Autobuild-Date(master): Sat Dec 7 18:38:21 CET 2013 on sn-devel-104 commit 0f41792dc597854f0d53c25c2975f542dd812711 Author: Christian Ambach Date: Fri Nov 22 05:18:36 2013 +0100 lib/ntdb optimize includes in ntdb tests use the private header (which will use libreplace or system headers) instead of direct includes of system includes Signed-off-by: Christian Ambach Reviewed-by: Rusty Russell commit 7be0e91ddecf019bf1d7247abc16397a0f80c911 Author: Christian Ambach Date: Fri Nov 22 05:17:38 2013 +0100 lib/ntdb correct includes in private header include all necessary headers when libreplace is not around Signed-off-by: Christian Ambach Reviewed-by: Jelmer Vernooij Reviewed-by: Rusty Russell commit 794db9ea31eabc23a85aeb34fd1d2f227c6682a8 Author: Christian Ambach Date: Fri Nov 22 05:15:59 2013 +0100 lib/ntdb fix compilation when libreplace is not around Signed-off-by: Christian Ambach Reviewed-by: Jelmer Vernooij Reviewed-by: Rusty Russell commit 100f324fcd0db19e3db9a9776377a0391e82f775 Author: Christian Ambach Date: Fri Nov 22 05:15:13 2013 +0100 lib/socket_wrapper fix compilation when libreplace is not around Signed-off-by: Christian Ambach Reviewed-by: Jelmer Vernooij commit 5e2f59dce350822495ac59dbf852cdf06ff8e897 Author: Christian Ambach Date: Fri Nov 22 05:13:17 2013 +0100 s3:vfs_btrfs change includes use the ones from libreplace instead of system ones Signed-off-by: Christian Ambach Reviewed-by: Jelmer Vernooij commit ade52f60343dca96678d24ad12dacab5da000fec Author: Christian Ambach Date: Fri Nov 22 05:13:56 2013 +0100 s3:pam_smbpass change includes use the ones from libreplace instead of system ones Signed-off-by: Christian Ambach Reviewed-by: Jelmer Vernooij --- Summary of changes: lib/ntdb/ntdb.c |1 - lib/ntdb/ntdb.h | 10 ++ lib/ntdb/private.h|5 + lib/ntdb/test/api-12-store.c |4 +--- lib/ntdb/test/api-13-delete.c |3 --- lib/ntdb/test/api-14-exists.c |4 +--- lib/ntdb/test/api-16-wipe_all.c |4 +--- lib/ntdb/test/api-20-alloc-attr.c |4 +--- lib/ntdb/test/api-21-parse_record.c |4 +--- lib/ntdb/test/api-55-transaction.c|3 --- lib/ntdb/test/api-60-noop-transaction.c |3 --- lib/ntdb/test/api-80-tdb_fd.c |4 +--- lib/ntdb/test/api-81-seqnum.c |4 +--- lib/ntdb/test/api-82-lockattr.c |3 --- lib/ntdb/test/api-83-openhook.c |8 +--- lib/ntdb/test/api-91-get-stats.c |6 +- lib/ntdb/test/api-92-get-set-readonly.c |4 +--- lib/ntdb/test/api-93-repack.c |4 +--- lib/ntdb/test/api-94-expand-during-parse.c|3 --- lib/ntdb/test/api-95-read-only-during-parse.c |4 +--- lib/ntdb/test/api-add-remove-flags.c |3 --- lib/ntdb/test/api-check-callback.c|4 +--- lib/ntdb/test/api-firstkey-nextkey.c |5 + lib/ntdb/test/api-fork-test.c |8 +--- lib/ntdb/test/api-locktimeout.c |7 +-- lib/ntdb/test/api-missing-entries.c |4 +--- lib/ntdb/test/api-open-multiple-times.c |3 --- lib/ntdb/test/api-record-expand.c |5 + lib/ntdb/test/api-simple-delete.c |4 +--- lib/ntdb/test/api-summary.c |5 + lib/ntdb/tools/growtdb-bench.c|3 --- lib/ntdb/tools/ntdbbackup.c |2 +- lib/ntdb/tools/ntdbdump.c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via de55856 lib/replace remove orphaned code via 90df45a s3:utils remove orphaned code from a8cb1b1 smbd: Avoid calling notify_filter_string for low debuglevels http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit de55856745da2bae4b3d9cb4b293b4ebfb4a67ef Author: Christian Ambach Date: Fri Nov 22 05:11:01 2013 +0100 lib/replace remove orphaned code this is not compiled and used anymore Signed-off-by: Christian Ambach Reviewed-By: Jelmer Vernooij Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Dec 4 22:55:12 CET 2013 on sn-devel-104 commit 90df45a67a1dfcdacea310e7c3d060bf76c62a9c Author: Christian Ambach Date: Fri Nov 22 05:09:08 2013 +0100 s3:utils remove orphaned code this does not even compile at all.. looks like a real orphan Signed-off-by: Christian Ambach Reviewed-By: Jelmer Vernooij --- Summary of changes: lib/replace/repdir_getdents.c | 166 lib/replace/repdir_getdirentries.c | 183 source3/utils/smbw_sample.c| 96 --- 3 files changed, 0 insertions(+), 445 deletions(-) delete mode 100644 lib/replace/repdir_getdents.c delete mode 100644 lib/replace/repdir_getdirentries.c delete mode 100644 source3/utils/smbw_sample.c Changeset truncated at 500 lines: diff --git a/lib/replace/repdir_getdents.c b/lib/replace/repdir_getdents.c deleted file mode 100644 index afc634a..000 --- a/lib/replace/repdir_getdents.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - Copyright (C) Andrew Tridgell 2005 - - ** NOTE! The following LGPL license applies to the replace - ** library. This does NOT imply that all of Samba is released - ** under the LGPL - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see <http://www.gnu.org/licenses/>. -*/ -/* - a replacement for opendir/readdir/telldir/seekdir/closedir for BSD systems - - This is needed because the existing directory handling in FreeBSD - and OpenBSD (and possibly NetBSD) doesn't correctly handle unlink() - on files in a directory where telldir() has been used. On a block - boundary it will occasionally miss a file when seekdir() is used to - return to a position previously recorded with telldir(). - - This also fixes a severe performance and memory usage problem with - telldir() on BSD systems. Each call to telldir() in BSD adds an - entry to a linked list, and those entries are cleaned up on - closedir(). This means with a large directory closedir() can take an - arbitrary amount of time, causing network timeouts as millions of - telldir() entries are freed - - Note! This replacement code is not portable. It relies on getdents() - always leaving the file descriptor at a seek offset that is a - multiple of DIR_BUF_SIZE. If the code detects that this doesn't - happen then it will abort(). It also does not handle directories - with offsets larger than can be stored in a long, - - This code is available under other free software licenses as - well. Contact the author. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#define DIR_BUF_BITS 9 -#define DIR_BUF_SIZE (1<fd = open(dname, O_RDONLY); - if (d->fd == -1) { - free(d); - return NULL; - } - if (fstat(d->fd, &sb) < 0) { - close(d->fd); - free(d); - return NULL; - } - if (!S_ISDIR(sb.st_mode)) { - close(d->fd); - free(d); - errno = ENOTDIR; - return NULL; - } - d->ofs = 0; - d->seekpos = 0; - d->nbytes = 0; - return (DIR *)d; -} - -struct dirent *readdir(DIR *dir) -{ - struct dir_buf *d = (struct dir_buf *)dir; - struct dirent *de; - - if (d->ofs >= d->nbytes) { - d->seekpos = lseek(d->fd, 0, SEEK_CUR); - d->nbytes = getdents(d->fd, d->buf, DIR_BUF_SIZE); - d->ofs = 0; - } - if (d->ofs >=
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4ea9284 lib/util: use proper include for struct stat from addabf1 torture: test printing using "XPS_PASS" datatype http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4ea92841b72a7b701a7c0fadf63430a7d0a3fac8 Author: Christian Ambach Date: Mon Nov 18 20:02:41 2013 +0100 lib/util: use proper include for struct stat use instead of forward declaring it This fixes the build on AIX Bug: https://bugzilla.samba.org/show_bug.cgi?id=10276 Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu Nov 21 22:12:45 CET 2013 on sn-devel-104 --- Summary of changes: lib/util/samba_util.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index 243ed3e..f52347e 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -27,6 +27,9 @@ /* for TALLOC_CTX */ #include +/* for struct stat */ +#include + /** * @file * @brief Helpful macros @@ -627,7 +630,6 @@ _PUBLIC_ bool directory_exist(const char *dname); /** Check file permissions. **/ -struct stat; _PUBLIC_ bool file_check_permissions(const char *fname, uid_t uid, mode_t file_perms, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 20b64ea waf: replace dependency to libintl with samba_intl via 07b3a04 waf: consolidate libintl related checks via a742e87 waf: add --without-gettext option via ce8fbdf waf: fix build on AIX7 from 9177a0d libcli/auth: add more const to spnego_negTokenInit->mechTypes http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 20b64eae75b8809d67b8c2824616996bb4722612 Author: Christian Ambach Date: Thu Aug 1 23:00:21 2013 +0200 waf: replace dependency to libintl with samba_intl Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Aug 12 00:46:34 CEST 2013 on sn-devel-104 commit 07b3a048724a6b41282e1f673aea5ce2c1202a5e Author: Christian Ambach Date: Thu Aug 1 22:28:05 2013 +0200 waf: consolidate libintl related checks consolidate the dealing with functions from libintl and the handling of checking if libiconv is required or not to a common place in lib/replace also add a new samba_intl subsystem that has dependencies on the appropriate set of libraries (libintl, libintl+libiconv or none) that can be used as a general dependency by code that depends on the internationalization libraries Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit a742e87b39bed97ac59f5ec8bff9bf3cedf8b68a Author: Christian Ambach Date: Tue Jun 25 18:37:35 2013 +0200 waf: add --without-gettext option Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett commit ce8fbdf76ee2792d011d9da4d0116f04d9656886 Author: Christian Ambach Date: Thu Jun 20 18:26:04 2013 +0200 waf: fix build on AIX7 the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did) Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett --- Summary of changes: buildtools/wafsamba/wscript |5 +++- lib/replace/wscript | 46 --- nsswitch/wscript_build |2 +- source3/wscript |9 +++--- source3/wscript_build |2 +- source4/heimdal_build/wscript_build |4 +- source4/heimdal_build/wscript_configure |4 +-- 7 files changed, 49 insertions(+), 23 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 17aef27..fe2e515 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -82,6 +82,9 @@ def set_options(opt): help='additional directory to search for gettext', action='store', dest='gettext_location', default='/usr/local', match = ['Checking for library intl', 'Checking for header libintl.h']) +opt.add_option('--without-gettext', + help=("Disable use of gettext"), + action="store_true", dest='disable_gettext', default=False) gr = opt.option_group('developer options') @@ -322,7 +325,7 @@ def configure(conf): else: conf.env.HAVE_LD_VERSION_SCRIPT = False -if sys.platform == "aix5" or sys.platform == "aix6": +if sys.platform.startswith('aix'): conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) diff --git a/lib/replace/wscript b/lib/replace/wscript index 2117f56..b6fb10b 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -89,7 +89,7 @@ struct foo bar = { .y = 'X', .x = 1 }; sys/sockio.h sys/un.h''', together=True) conf.CHECK_HEADERS('sys/uio.h ifaddrs.h direct.h dirent.h') conf.CHECK_HEADERS('windows.h winsock2.h ws2tcpip.h') -conf.CHECK_HEADERS('libintl.h errno.h') +conf.CHECK_HEADERS('errno.h') conf.CHECK_HEADERS('gcrypt.h getopt.h iconv.h') conf.CHECK_HEADERS('sys/inotify.h memory.h nss.h sasl/sasl.h') conf.CHECK_HEADERS('security/pam_appl.h zlib.h asm/unistd.h') @@ -363,17 +363,41 @@ removeea setea headers='netinet/in.h arpa/nameser.h resolv.h') -if not conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h'): -# Some hosts need lib iconv for linking with lib intl -# So we try with flags just in case it helps. -oldflags = conf.env['LDFLAGS_INTL
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9b2aa35 s3: Remove old mode special substitution. via 4a9e5d2 s3:idmap_autorid: Add a NULL check in idmap_autorid_preallocate_wellknown via ca90681 s3:idmap_autorid: Don't zero in idmap_autorid_preallocate_wellknown via a061b6f s3:idmap_autorid: Use ARRAY_SIZE where appropriate from 0529b59 s3-winbind: Do not delete an existing valid credential cache. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9b2aa351ceb756d6ea63f3158f0e983ae7262da8 Author: Alexander Werth Date: Tue Jul 9 17:14:08 2013 +0200 s3: Remove old mode special substitution. The mode special substitution now happens in a separate function. The substitution at this point is unnecessary. Reviewed-by: Andrew Bartlett Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Jul 16 00:52:26 CEST 2013 on sn-devel-104 commit 4a9e5d24749f7d8571f107c20ee66092ce7ab21d Author: Volker Lendecke Date: Thu Jul 11 13:10:25 2013 +0200 s3:idmap_autorid: Add a NULL check in idmap_autorid_preallocate_wellknown Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach commit ca9068189e00ce1714790933250080ab1c310ee5 Author: Volker Lendecke Date: Thu Jul 11 13:08:39 2013 +0200 s3:idmap_autorid: Don't zero in idmap_autorid_preallocate_wellknown We initialize everything later anyway Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach commit a061b6fe43f3e00dadb5c23244c68e5bc241dfce Author: Volker Lendecke Date: Thu Jul 11 13:07:52 2013 +0200 s3:idmap_autorid: Use ARRAY_SIZE where appropriate Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach --- Summary of changes: source3/modules/nfs4_acls.c | 15 ++- source3/winbindd/idmap_autorid.c |8 ++-- 2 files changed, 8 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 255741c..dab1a2a 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -739,20 +739,9 @@ static bool smbacl4_fill_ace4( if (sid_to_gid(&ace_nt->trustee, &gid)) { ace_v4->aceFlags |= SMB_ACE4_IDENTIFIER_GROUP; - - if (params->mode==e_special && gid==ownerGID) { - ace_v4->flags |= SMB_ACE4_ID_SPECIAL; - ace_v4->who.special_id = SMB_ACE4_WHO_GROUP; - } else { - ace_v4->who.gid = gid; - } + ace_v4->who.gid = gid; } else if (sid_to_uid(&ace_nt->trustee, &uid)) { - if (params->mode==e_special && uid==ownerUID) { - ace_v4->flags |= SMB_ACE4_ID_SPECIAL; - ace_v4->who.special_id = SMB_ACE4_WHO_OWNER; - } else { - ace_v4->who.uid = uid; - } + ace_v4->who.uid = uid; } else { DEBUG(1, ("nfs4_acls.c: file [%s]: could not " "convert %s to uid or gid\n", diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 391a314..16f609d 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -834,15 +834,19 @@ static NTSTATUS idmap_autorid_preallocate_wellknown(struct idmap_domain *dom) return NT_STATUS_OK; } - num = sizeof(groups)/sizeof(char*); + num = ARRAY_SIZE(groups); - maps = talloc_zero_array(talloc_tos(), struct id_map*, num+1); + maps = talloc_array(talloc_tos(), struct id_map*, num+1); if (!maps) { return NT_STATUS_NO_MEMORY; } for (i = 0; i < num; i++) { maps[i] = talloc(maps, struct id_map); + if (maps[i] == NULL) { + talloc_free(maps); + return NT_STATUS_NO_MEMORY; + } maps[i]->xid.type = ID_TYPE_GID; maps[i]->sid = dom_sid_parse_talloc(maps, groups[i]); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4ee73fd s3:smbd/close remove filesystem lock before removing sharemode via 935992f s3:smbd/close use common exit path via 245b5ff s3:lib add mapping for ETXTBSY via 526f0df s3-ctdb: Fix auto-enabling of CTDB readonly support via c9924eb s3:smbd/aio mark file as modified in the SMB2 case via e65c532 nsswitch: fix a comment from 48ae86f heimdal_build: Add missing dep on samba4kgetcred http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4ee73fd97b63c65cdb8d4fcbe3287a746d667de0 Author: Christian Ambach Date: Thu Jun 13 15:23:07 2013 +0200 s3:smbd/close remove filesystem lock before removing sharemode otherwise we are open for a race condition: opener 1 opens file and closes it - during the close, the share mode entry will be removed from locking.tdb, but share mode in the file system will be dropped later after delete_on_close and write time updates have been done opener 2 requests open of same file with file overwrite - locking.tdb does not list original entry, but file system share mode is still around - VFS_FTRUNCATE will fail and error was converted to STATUS_ACCESS_DENIED Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Jun 25 14:48:44 CEST 2013 on sn-devel-104 commit 935992fc5502ac63cc0c1ebf00089e7f39558c82 Author: Christian Ambach Date: Fri Jun 21 15:11:55 2013 +0200 s3:smbd/close use common exit path do not return early here, but use the common exit path that will remove the share mode from the record Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke commit 245b5ffddef945e071ea1b5d26de1da80a0b7ae8 Author: Christian Ambach Date: Tue Jun 11 18:20:20 2013 +0200 s3:lib add mapping for ETXTBSY add ETXTBSY to the errno->STATUS conversion table. It will be mapped to STATUS_SHARING_VIOLATION Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke commit 526f0dff9635ed1572152a61672013d5f96ddd74 Author: Daniel Gan-Levi Date: Mon Jun 17 19:39:09 2013 +0300 s3-ctdb: Fix auto-enabling of CTDB readonly support This fixes Bug 9957 Bug: https://bugzilla.samba.org/show_bug.cgi?id=9957 Signed-off-by: Daniel Gan-Levi Reviewed-by: Christian Ambach Reviewed-by: Volker Lendecke commit c9924ebccd4953bc61ebcce9187a54c48ec67962 Author: Christian Ambach Date: Thu Jun 20 18:27:39 2013 +0200 s3:smbd/aio mark file as modified in the SMB2 case Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke commit e65c53226c21877e99879e4483d9b515dfe87672 Author: Christian Ambach Date: Fri Jun 21 13:26:18 2013 +0200 nsswitch: fix a comment the beginning if is only ifdef LINUX now, not the long list this comment refers to Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- Summary of changes: nsswitch/pam_winbind.h|2 +- source3/lib/errmap_unix.c |3 +++ source3/smbd/aio.c|2 ++ source3/smbd/close.c | 20 +++- source3/wscript | 28 5 files changed, 45 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/pam_winbind.h b/nsswitch/pam_winbind.h index 0d9529e..2a9dd0e 100644 --- a/nsswitch/pam_winbind.h +++ b/nsswitch/pam_winbind.h @@ -93,7 +93,7 @@ #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR #endif -#endif /* defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD) || defined(AIX) */ +#endif /* (!)LINUX */ #if defined(HAVE_SECURITY_PAM_MODULES_H) #include diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c index 28f527e..c5e190c 100644 --- a/source3/lib/errmap_unix.c +++ b/source3/lib/errmap_unix.c @@ -111,6 +111,9 @@ static const struct { #ifdef ENOTSUP { ENOTSUP, NT_STATUS_NOT_SUPPORTED}, #endif +#ifdef ETXTBSY + { ETXTBSY, NT_STATUS_SHARING_VIOLATION }, +#endif }; /* diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index e8be408..24a822e 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -959,6 +959,8 @@ static void aio_pwrite_smb2_done(struct tevent_req *req) /* Unlock now we're done. */ SMB_VFS_STRICT_UNLOCK(fsp->conn, fsp, &aio_ex->lock); + mark_file_modified(fsp); + status = smb2_write_complete_nosync(subreq, nwritten, err); DEBUG(10, ("smb2: scheduled aio_write completed " diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 64faf98..2bd588b 10064
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d544d17 build: Remove the struct MD5Context conf file check. from 9b88166 lsa4: Fix a set but unused variable warning http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d544d178f0f114613701821ed23ab37431ebb089 Author: Andrew Bartlett Date: Fri Jun 21 12:06:16 2013 -0700 build: Remove the struct MD5Context conf file check. Fix the build. Reviewed-by: Jeremy Allison Tested-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Jun 24 14:11:09 CEST 2013 on sn-devel-104 --- Summary of changes: lib/crypto/wscript_configure |1 - 1 files changed, 0 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure index b7a012f..21ec566 100644 --- a/lib/crypto/wscript_configure +++ b/lib/crypto/wscript_configure @@ -4,6 +4,5 @@ if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', checklibc=True) conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h', checklibc=True) -conf.CHECK_TYPE('MD5_CTX', 'struct MD5Context', headers='sys/md5.h') conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h', checklibc=True) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b238008 s3:lib/ctdb_packet use sys_send in packet_fd_write from 8a6743e Bug 8997: change libreplace GPL source to LGPL http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b2380081e23c68d515bd0c257d56ba4a593f991b Author: Christian Ambach Date: Mon Jun 3 16:18:03 2013 +0200 s3:lib/ctdb_packet use sys_send in packet_fd_write use the signal safe variant here to prevent spurious errors when running with CTDB and a signal comes in Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Jun 3 20:01:22 CEST 2013 on sn-devel-104 --- Summary of changes: source3/lib/ctdb_packet.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdb_packet.c b/source3/lib/ctdb_packet.c index 49ade4e..5ea1c25 100644 --- a/source3/lib/ctdb_packet.c +++ b/source3/lib/ctdb_packet.c @@ -182,7 +182,7 @@ NTSTATUS ctdb_packet_fd_write(struct ctdb_packet_context *ctx) { ssize_t sent; - sent = send(ctx->fd, ctx->out.data, ctx->out.length, 0); + sent = sys_send(ctx->fd, ctx->out.data, ctx->out.length, 0); if (sent == -1) { DEBUG(0, ("send failed: %s\n", strerror(errno))); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c29447f s3:lib/ctdb_conn make sure we are root before connecting to CTDB via d67e614 lib: Add before/after hooks to async_connect via 272a58a waf: build vfs_aixacl2 module by default on AIX via 162ec83 waf: only use -fstack-protector when both compiler and linker support it from 355f78f docs/rpcdaemon: some formating fixes http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c29447f2b8705630a24d3d73f76661af296a4c4d Author: Christian Ambach Date: Thu May 16 15:07:44 2013 +0200 s3:lib/ctdb_conn make sure we are root before connecting to CTDB CTDB socket is only reachable for root, make sure we are root when trying to connect to it Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri May 17 13:16:37 CEST 2013 on sn-devel-104 commit d67e614a07cbf143293436d380aba9a022c0e31b Author: Volker Lendecke Date: Thu May 16 16:11:54 2013 +0200 lib: Add before/after hooks to async_connect This will facilitiate [un]become_root for smbd to connect safely to ctdbd. Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach commit 272a58afff69f52704bcc9a62947853b638420d5 Author: Christian Ambach Date: Tue May 7 09:08:07 2013 +0200 waf: build vfs_aixacl2 module by default on AIX Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher commit 162ec83f68efc89c46630f6842700bca8f16b201 Author: Christian Ambach Date: Tue May 7 09:06:50 2013 +0200 waf: only use -fstack-protector when both compiler and linker support it otherwise build with xlc on AIX fails because the compiler silently ignores the parameter but the linker does not like it Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher --- Summary of changes: lib/async_req/async_sock.c | 35 +++ lib/async_req/async_sock.h | 10 ++ lib/replace/wscript |2 +- source3/lib/ctdb_conn.c | 15 ++- source3/lib/util_sock.c |4 ++-- source3/libsmb/unexpected.c |2 +- source3/torture/wbc_async.c |2 +- source3/wscript |2 +- 8 files changed, 57 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index 9909bc6..59dde88 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -217,6 +217,10 @@ struct async_connect_state { long old_sockflags; socklen_t address_len; struct sockaddr_storage address; + + void (*before_connect)(void *private_data); + void (*after_connect)(void *private_data); + void *private_data; }; static void async_connect_connected(struct tevent_context *ev, @@ -236,10 +240,12 @@ static void async_connect_connected(struct tevent_context *ev, * connect in an async state. This will be reset when the request is finished. */ -struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - int fd, const struct sockaddr *address, - socklen_t address_len) +struct tevent_req *async_connect_send( + TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd, + const struct sockaddr *address, socklen_t address_len, + void (*before_connect)(void *private_data), + void (*after_connect)(void *private_data), + void *private_data) { struct tevent_req *result; struct async_connect_state *state; @@ -258,6 +264,9 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, state->fd = fd; state->sys_errno = 0; + state->before_connect = before_connect; + state->after_connect = after_connect; + state->private_data = private_data; state->old_sockflags = fcntl(fd, F_GETFL, 0); if (state->old_sockflags == -1) { @@ -273,7 +282,16 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, set_blocking(fd, false); + if (state->before_connect != NULL) { + state->before_connect(state->private_data); + } + state->result = connect(fd, address, address_len); + + if (state->after_connect != NULL) { + state->after_connect(state->private_data); + } + if (state->result == 0) { tevent_req_done(result); goto done; @@ -328,8 +346,17 @@ static void async_connect_connected(struct tevent_context *ev, tevent_req_data(req, struct async_connect_state); int ret
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6c5158e s3:rpc_server/srvsvc check access before doing work via 1cd2044 torture: Remove some unused code via 11f467d tdb: include information about hash function being used in tdbtool info output from 7d8a1b1 smbd: Remove a pointless variable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6c5158e3de26cd6e911f740a1c36789d77ea1c70 Author: Shekhar Amlekar Date: Tue May 7 17:58:16 2013 +0530 s3:rpc_server/srvsvc check access before doing work Before doing the (potentially) costly enumerations, check if the user has necessary privileges first Signed-off-by: Shekhar Amlekar Reviewed-by: Christian Ambach Reviewed-by: Volker Lendecke Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue May 14 16:22:24 CEST 2013 on sn-devel-104 commit 1cd20441a76bde78196124b925a67183614103d8 Author: Volker Lendecke Date: Sat May 11 10:51:22 2013 +0200 torture: Remove some unused code Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach commit 11f467d0bd8e2264f311d82f3299443b99526bb3 Author: Christian Ambach Date: Sat May 11 00:45:15 2013 +0200 tdb: include information about hash function being used in tdbtool info output makes it possible to easily determine if the tdb under examination uses jenkins hash or not Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- Summary of changes: lib/tdb/common/summary.c |2 ++ source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 20 ++-- source3/torture/test_idmap_tdb_common.c |5 - 3 files changed, 12 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c index f4e6d2c..ef2c49a 100644 --- a/lib/tdb/common/summary.c +++ b/lib/tdb/common/summary.c @@ -20,6 +20,7 @@ #define SUMMARY_FORMAT \ "Size of file/data: %u/%zu\n" \ "Number of records: %zu\n" \ + "Incompatible hash: %s\n" \ "Smallest/average/largest keys: %zu/%zu/%zu\n" \ "Smallest/average/largest data: %zu/%zu/%zu\n" \ "Smallest/average/largest padding: %zu/%zu/%zu\n" \ @@ -171,6 +172,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb) snprintf(ret, len, SUMMARY_FORMAT, tdb->map_size, keys.total+data.total, keys.num, +(tdb->hash_fn == tdb_jenkins_hash)?"yes":"no", keys.min, tally_mean(&keys), keys.max, data.min, tally_mean(&data), data.max, extra.min, tally_mean(&extra), extra.max, diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 2d58466..011d41f 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -1226,16 +1226,6 @@ WERROR _srvsvc_NetSessDel(struct pipes_struct *p, bool not_root = False; WERROR werr; - username = r->in.user; - machine = r->in.client; - - /* strip leading backslashes if any */ - if (machine && machine[0] == '\\' && machine[1] == '\\') { - machine += 2; - } - - num_sessions = list_sessions(p->mem_ctx, &session_list); - DEBUG(5,("_srvsvc_NetSessDel: %d\n", __LINE__)); werr = WERR_ACCESS_DENIED; @@ -1249,6 +1239,16 @@ WERROR _srvsvc_NetSessDel(struct pipes_struct *p, goto done; } + username = r->in.user; + machine = r->in.client; + + /* strip leading backslashes if any */ + if (machine && machine[0] == '\\' && machine[1] == '\\') { + machine += 2; + } + + num_sessions = list_sessions(p->mem_ctx, &session_list); + for (snum = 0; snum < num_sessions; snum++) { if ((strequal(session_list[snum].username, username) || username[0] == '\0' ) && diff --git a/source3/torture/test_idmap_tdb_common.c b/source3/torture/test_idmap_tdb_common.c index 5681eef..6f5f3c5 100644 --- a/source3/torture/test_idmap_tdb_common.c +++ b/source3/torture/test_idmap_tdb_common.c @@ -62,11 +62,6 @@ bool idmap_is_online(void) return true; } -NTSTATUS idmap_backends_sid_to_unixid(const char *domain, struct id_map *id) -{ - return NT_STATUS_OK; -} - NTSTATUS idmap_backends_unixid_to_sid(const char *domname, struct id_map *id) { return NT_STATUS_OK; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8d34f2f docs: update the description of the formulas in the idmap_autorid manpage via 7bc9563 s3:idmap:autorid: add a comment block explaining the calculations via 9c6594d s3:idmap:autorid: simplify the id->sid calculation via 7b9a567 s3:idmap:autorid: calculate the range's low_id in idmap_autorid_get_domainrange() via 30a27ba s3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious via a0ea6c2 s3:idmap:autorid: rename range.multiplier to domain_range_index via 196aa1d s3:idmap:autorid: rename autorid_range_config.sid to domsid, along with instances via 2a25874 s3:idmap:autorid: rename autorid_domain_config --> autorid_range_config and instances to "range" via 11b9b7d s3:idmap:autorid: rename domainnum to rangenum via 5190e4d docs-xml: manpage update for autorid multirange support via b384c55 s3:winbindd/autorid multiple range support via e0a0280 s3:utils fix wrong usage of PRIu64 in sscanf via 24ce31a s3:lib fix wrong usage of PRIu64 in sscanf via a4cc41d lib/replace: add SCNx macros via d68e676 lib/replace: prefer inttypes.h over stdint.h from bbf6221 selftest: do not run doc tests if we don't build manpages http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8d34f2fe1e219a0be28bc6b8ce9f93620d39a5b2 Author: Michael Adam Date: Fri Apr 26 01:06:58 2013 +0200 docs: update the description of the formulas in the idmap_autorid manpage Signed-off-by: Michael Adam Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon May 6 18:23:56 CEST 2013 on sn-devel-104 commit 7bc9563c96c0b91628ec501f8226c1adc24d083d Author: Michael Adam Date: Fri Apr 26 00:52:49 2013 +0200 s3:idmap:autorid: add a comment block explaining the calculations Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit 9c6594dadbdd800470d4b217f1351fbba87989ba Author: Michael Adam Date: Thu Apr 25 20:24:36 2013 +0200 s3:idmap:autorid: simplify the id->sid calculation To make it more intutive. rid = reduced_rid + domain_range_index * range_size where reduced_rid = (id - id_low) % range_size Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit 7b9a567b8943e0c3d0b6fa97bea72f1b89aea4ab Author: Michael Adam Date: Thu Apr 25 20:12:39 2013 +0200 s3:idmap:autorid: calculate the range's low_id in idmap_autorid_get_domainrange() This way, the calculation needs to be don only in one central place and the formulas get simpler. Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit 30a27ba428f346ff2fd56f9727ce0f1fb18a5a41 Author: Michael Adam Date: Thu Apr 25 19:47:00 2013 +0200 s3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious This is my attempt to make the sid->unix-id calculation much more obvious. Especially with the introduction of the multi-range support an the originally named "multiplier", the calculation id = low_id + range_size * domain_number + rid - range_size * multiplier was rather opaque to me. What really happens here is this: The rid is split into a reduced_rid part that is < rangesize and a multiple of rangesize. This is given by the formula rid = rid % range_size + (rid / range_size) * range_size We define reduced_rid := rid % range_size and domain_range_index := rid / range_size ( == the original multiplier) and the original formula is equivalent to: id = reduced_rid + low_id + range_number * range_size; and reads id = reduced_rid + range_minvalue if we set range_minvalue := low_id + range_number * range_size. Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit a0ea6c2536b6b07f2fee799518b5f84da36e53ba Author: Michael Adam Date: Thu Apr 25 19:18:27 2013 +0200 s3:idmap:autorid: rename range.multiplier to domain_range_index The name multiplier is very confusing (at least for me). This is an index that is used to reference the various per-domain ranges. Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit 196aa1dea76b894ebdcf4322bb52edeac57d68ce Author: Michael Adam Date: Thu Apr 25 19:13:45 2013 +0200 s3:idmap:autorid: rename autorid_range_config.sid to domsid, along with instances Signed-off-by: Michael Adam Reviewed-by: Christian Ambach commit 2a258747b6ec67e9e5d4aa97ffeeabeab0e94d6c Author: Michael Adam Date: Thu Apr 25 19:04:56 2013 +0200 s3:idmap:autorid: rename autorid_domain_config --> autorid
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bbb4068 dbwrap: Use tdb_null in db_ctdb_delete from 30adf0c scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bbb4068c933ecc043025633a13c62bf04eaf6d49 Author: Volker Lendecke Date: Sat Nov 24 14:51:02 2012 + dbwrap: Use tdb_null in db_ctdb_delete Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Mar 25 19:42:30 CET 2013 on sn-devel-104 --- Summary of changes: source3/lib/dbwrap/dbwrap_ctdb.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index a6f49b8..399c850 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -912,7 +912,6 @@ static NTSTATUS db_ctdb_send_schedule_for_deletion(struct db_record *rec) static NTSTATUS db_ctdb_delete(struct db_record *rec) { - TDB_DATA data; NTSTATUS status; /* @@ -920,9 +919,7 @@ static NTSTATUS db_ctdb_delete(struct db_record *rec) * tdb-level cleanup */ - ZERO_STRUCT(data); - - status = db_ctdb_store(rec, data, 0); + status = db_ctdb_store(rec, tdb_null, 0); if (!NT_STATUS_IS_OK(status)) { return status; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1f139ae s3:waf fix build on AIX from 599a699 s4:torture: let raw.read accept larger reads than 0x1 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1f139ae2d162ebb045ce4eabb76a138baedfe44a Author: Stefan Metzmacher Date: Mon Mar 18 11:52:50 2013 + s3:waf fix build on AIX AIX acl code needs to be built by default on AIX, otherwise smbd will fail to start because of missing symbols This fixes Bug 9557 - build succeeds, but binaries don't run Signed-off-by: Stefan Metzmacher Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu Mar 21 16:31:19 CET 2013 on sn-devel-104 --- Summary of changes: source3/modules/wscript_build |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build index ef5748c..8f08d52 100644 --- a/source3/modules/wscript_build +++ b/source3/modules/wscript_build @@ -63,7 +63,7 @@ bld.SAMBA3_LIBRARY('non_posix_acls', bld.SAMBA3_SUBSYSTEM('VFS_AIXACL_UTIL', source='vfs_aixacl_util.c', -enabled=False) #fixme +enabled=(bld.SAMBA3_IS_ENABLED_MODULE('vfs_aixacl') or bld.SAMBA3_IS_ENABLED_MODULE('vfs_aixacl2'))) bld.SAMBA3_SUBSYSTEM('vfs', source='', -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f7564ca s3:registry accept windows like long hivenames via 4490e72 s3:include bump profile memory area version number from 05a7a10 wkssvc: Fix bug 9727, NULL pointer dereference http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f7564cae4cdd1e2629404c5a1229978451584257 Author: Gregor Beck Date: Wed Mar 20 13:00:26 2013 +0100 s3:registry accept windows like long hivenames Signed-off-by: Gregor Beck Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Mar 20 17:08:52 CET 2013 on sn-devel-104 commit 4490e72426bc55a5680df84fce344aa509219219 Author: Christian Ambach Date: Thu Mar 14 23:19:25 2013 +0100 s3:include bump profile memory area version number forgot to bump this earlier when removing the counters for setdir Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- Summary of changes: source3/include/smbprofile.h |2 +- source3/registry/reg_api.c | 12 +--- 2 files changed, 10 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 9bcee42..69df2ca 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -26,7 +26,7 @@ #define PROF_SHMEM_KEY ((key_t)0x07021999) #define PROF_SHM_MAGIC 0x6349985 -#define PROF_SHM_VERSION 12 +#define PROF_SHM_VERSION 13 /* time values in the following structure are in microseconds */ diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index c263174..ca990e2 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -70,6 +70,7 @@ #include "reg_dispatcher.h" #include "reg_objects.h" #include "../librpc/gen_ndr/ndr_security.h" +#include "reg_parse_internal.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_REGISTRY @@ -232,12 +233,17 @@ WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive, const struct security_token *token, struct registry_key **pkey) { + const struct hive_info *hi; SMB_ASSERT(hive != NULL); - SMB_ASSERT(hive[0] != '\0'); SMB_ASSERT(strchr(hive, '\\') == NULL); - return regkey_open_onelevel(mem_ctx, NULL, hive, token, desired_access, - pkey); + hi = hive_info(hive); + if (hi == NULL) { + return WERR_BADFILE; + } + + return regkey_open_onelevel(mem_ctx, NULL, hi->short_name, token, + desired_access, pkey); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0796a17 s3:lib/charcnv fix typo in pull_ascii_base_talloc() via 9755541 s3:libnet increase timeout for machine password change from 68698b4 tdb: Slightly simplify tdb_expand_file http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0796a17aa6915be039d6f71ae2575ef525ffb6db Author: Ralph Wuerthner Date: Tue Feb 26 12:32:32 2013 +0100 s3:lib/charcnv fix typo in pull_ascii_base_talloc() Signed-off-by: Ralph Wuerthner Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Mar 5 15:56:56 CET 2013 on sn-devel-104 commit 9755541ed156d71df98607375ee3b925266c3c74 Author: Christian Ambach Date: Tue Mar 5 11:44:03 2013 +0100 s3:libnet increase timeout for machine password change DCs might run password filter modules that can delay the setting of the machine password for a significant amount of time use the same timeout as in the other paths of domain join (e.g. rpccli_netlogon_set_trust_password) Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- Summary of changes: source3/lib/charcnv.c|2 +- source3/libnet/libnet_join.c |9 + 2 files changed, 10 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 407a209..71d2c3a 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -173,7 +173,7 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx, } if (src_len == (size_t)-1) { - smb_panic("sec_len == -1 in pull_ascii_base_talloc"); + smb_panic("src_len == -1 in pull_ascii_base_talloc"); } if (flags & STR_TERMINATE) { diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 2b4ab0b..dfe7283 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -863,6 +863,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx, struct samr_Ids name_types; union samr_UserInfo user_info; struct dcerpc_binding_handle *b = NULL; + unsigned int old_timeout = 0; DATA_BLOB session_key = data_blob_null; struct samr_CryptPassword crypt_pwd; @@ -1087,6 +1088,12 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx, /* Set password on machine account - first try level 26 */ + /* +* increase the timeout as password filter modules on the DC +* might delay the operation for a significant amount of time +*/ + old_timeout = rpccli_set_timeout(pipe_hnd, 60); + init_samr_CryptPasswordEx(r->in.machine_password, &session_key, &crypt_pwd_ex); @@ -1118,6 +1125,8 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx, &result); } + old_timeout = rpccli_set_timeout(pipe_hnd, old_timeout); + if (!NT_STATUS_IS_OK(status)) { dcerpc_samr_DeleteUser(b, mem_ctx, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3d29bb2 s3:rpc_client fix a crash from 2f4b21b ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb' http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3d29bb2d37b02909ecb500e864f3c13e06957a86 Author: Christian Ambach Date: Wed Feb 20 16:59:05 2013 +0100 s3:rpc_client fix a crash state->cli->dc does not have to be set (e.g. when running net rpc join against an older Samba PDC), so check it before dereferencing it This fixes Bug 9669 - net rpc join crashes against a Samba 3.0.33 PDC Bug: https://bugzilla.samba.org/show_bug.cgi?id=9669 Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Feb 20 19:00:52 CET 2013 on sn-devel-104 --- Summary of changes: source3/rpc_client/cli_pipe.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 2743a07..2e978ef 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1805,7 +1805,7 @@ static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq) status = dcerpc_netr_LogonGetCapabilities_r_recv(subreq, talloc_tos()); TALLOC_FREE(subreq); if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) { - if (state->cli->dc->negotiate_flags & + if (state->cli->dc && state->cli->dc->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) { DEBUG(5, ("AES is not supported and the error was %s\n", nt_errstr(status))); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7b0b1d6 smbd: Fix a typo via fa06414 smbd: Fix a typo from 394622e s3:winbindd: change getpwsid() to return a passwd struct for a group sid id-mapped with ID_TYPE_BOTH http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7b0b1d6d48d31a729f0ad176a8b53f8c3a8d2d16 Author: Volker Lendecke Date: Wed Jan 30 15:53:27 2013 +0100 smbd: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Jan 30 18:21:19 CET 2013 on sn-devel-104 commit fa064140edf13c16085acf061d781fa06abfce3b Author: Volker Lendecke Date: Tue Jan 15 13:17:00 2013 +0100 smbd: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach --- Summary of changes: source3/lib/server_mutex.c |2 +- source3/smbd/process.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 619fbd0..41da0a1 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -29,7 +29,7 @@ may (in certain situations) cause connections to be reset, or access to be denied. - This locking allows smbd's mutlithread architecture to look + This locking allows smbd's multithread architecture to look like the single-connection that NT makes. */ struct named_mutex { diff --git a/source3/smbd/process.c b/source3/smbd/process.c index a02aeda..0d815f1 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -88,7 +88,7 @@ static bool smbd_lock_socket_internal(struct smbd_server_connection *sconn) return false; } - DEBUG(10,("pid[%d] got for socket lock\n", (int)getpid())); + DEBUG(10,("pid[%d] got socket lock\n", (int)getpid())); return true; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0fa3129 s3: Fix clear_if_first for the async echo handler from f8056b7 s4:dsdb/password_hash: Honor password complexity settings. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0fa31296864cd2b0c64c33ac74d55178ad542f90 Author: Volker Lendecke Date: Thu Dec 6 15:51:55 2012 +0100 s3: Fix clear_if_first for the async echo handler A worker smbd is as not long-lived as the main smbd, but as the async echo handler exits when the worker smbd does, passing "true" here is the right thing to do and fixes our clear_if_first handling when the async echo handler is active. Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Dec 7 11:29:36 CET 2012 on sn-devel-104 --- Summary of changes: source3/smbd/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/process.c b/source3/smbd/process.c index eeda6f9..f89ca02 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3068,7 +3068,7 @@ bool fork_echo_handler(struct smbd_server_connection *sconn) status = reinit_after_fork(sconn->msg_ctx, sconn->ev_ctx, - false); + true); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("reinit_after_fork failed: %s\n", nt_errstr(status))); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d6983f4 s3:smbd/aio do not mark file modified during reads from 611675f s3: Fix some blank line endings http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d6983f470410b0befc02e43580d9b9d74d8f5d23 Author: Christian Ambach Date: Tue Nov 20 14:24:13 2012 +0100 s3:smbd/aio do not mark file modified during reads this causes each file that is potentially just opened for reading to be marked as modified and lots of file change notifications will be send Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke Autobuild-User(master): Christian Ambach Autobuild-Date(master): Tue Nov 20 21:02:34 CET 2012 on sn-devel-104 --- Summary of changes: source3/smbd/aio.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 3b12879..3f553eb 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -791,8 +791,6 @@ static void aio_pread_smb2_done(struct tevent_req *req) /* Unlock now we're done. */ SMB_VFS_STRICT_UNLOCK(fsp->conn, fsp, &aio_ex->lock); - mark_file_modified(fsp); - /* Common error or success code processing for async or sync read returns. */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 01f188a build: add DMAPI configure option and checks via 3712de7 build(waf): support AIX 6.1 from 5205747 doc: list arguments for rpcclient FSRVP commands http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 01f188a3f0725f42ce4f17621985abe4ab5a54c2 Author: Christian Ambach Date: Wed Nov 7 18:40:07 2012 +0100 build: add DMAPI configure option and checks the waf build was missing the --with-dmapi option and configure checks that are necessary to build the source3 parts that need DMAPI (e.g. vfs_tsmsm) Bug: https://bugzilla.samba.org/show_bug.cgi?id=9178 Signed-off-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Nov 9 20:57:31 CET 2012 on sn-devel-104 commit 3712de7b9c494f6e01782e837f369e8beb5a054e Author: Christian Ambach Date: Fri Nov 9 18:58:43 2012 -0600 build(waf): support AIX 6.1 on AIX6.1, we need to define _ALL_SOURCE as well, otherwise system headers with BSD types like u_int cannot be used --- Summary of changes: buildtools/wafsamba/wscript |2 +- source3/wscript | 64 +++ source3/wscript_build |2 +- 3 files changed, 66 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 441e727..17aef27 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -322,7 +322,7 @@ def configure(conf): else: conf.env.HAVE_LD_VERSION_SCRIPT = False -if sys.platform == "aix5": +if sys.platform == "aix5" or sys.platform == "aix6": conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) diff --git a/source3/wscript b/source3/wscript index 96ab4de..92dcd18 100644 --- a/source3/wscript +++ b/source3/wscript @@ -41,6 +41,7 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('syslog') opt.SAMBA3_ADD_OPTION('automount') opt.SAMBA3_ADD_OPTION('aio-support') +opt.SAMBA3_ADD_OPTION('dmapi', default=False, help="build with DMAPI support") opt.SAMBA3_ADD_OPTION('profiling-data', default=False) opt.SAMBA3_ADD_OPTION('cluster-support', default=None) @@ -162,6 +163,69 @@ main() { }''', 'HAVE_KERNEL_SHARE_MODES', addmain=False, execute=True, msg="Checking for krenel share modes") +# check for DMAPI libs +Logs.info("Checking for DMAPI library existence") +conf.env['dmapi_lib'] = '' +samba_dmapi_lib = '' +if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dm'): +samba_dmapi_lib = 'dm' +else: +if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'jfsdm'): +samba_dmapi_lib = 'jfsdm' +else: +if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dmapi'): +samba_dmapi_lib = 'dmapi' +else: +if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'xdsm'): +samba_dmapi_lib = 'xdsm' +# only bother to test headers and compilation when a candidate +# library has been found +if Options.options.with_dmapi == True and samba_dmapi_lib == '': +conf.fatal('DMAPI support requested, but no suitable DMAPI library found') +else: +conf.CHECK_HEADERS('sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h') +conf.CHECK_CODE(''' +#include /* needed by Tru64 */ +#include /* needed by AIX */ +#ifdef HAVE_XFS_DMAPI_H +#include +#elif defined(HAVE_SYS_DMI_H) +#include +#elif defined(HAVE_SYS_JFSDMAPI_H) +#include +#elif defined(HAVE_SYS_DMAPI_H) +#include +#elif defined(HAVE_DMAPI_H) +#include +#endif + +/* This link test is designed to fail on IRI 6.4, but should + * succeed on Linux, IRIX 6.5 and AIX. + */ +int main(int argc, char **argv) +{ + char * version; + dm_eventset_t events; + /* This doesn't take an argument on IRIX 6.4. */ + dm_init_service(&version); + /* IRIX 6.4 expects events to be a pointer. */ + DMEV_ISSET(DM_EVENT_READ, events); + + return 0; +} +''', +'USE_DMAPI', +addmain=False, +execute=False, +lib=samba_dmapi_lib, +msg='Checking whether DMAPI lib '+samba_dmapi_lib+' can be used') + +if conf.CONFIG_SE
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3d93616 s3:smbd: pass the current time to make_connection[_smb1]() via 157de6c s3:utils fix a whitespace error from c2ca9e0 s3:vfs_default: optimize vfswrap_asys_finished() and read as much as we can http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3d9361612d30725a3d14fa4d3a085256a91800db Author: Stefan Metzmacher Date: Thu Nov 1 13:53:27 2012 +0100 s3:smbd: pass the current time to make_connection[_smb1]() Otherwise smbstatus reports the wrong time for tree connects. Signed-off-by: Stefan Metzmacher Reviewed-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Nov 5 20:43:23 CET 2012 on sn-devel-104 commit 157de6c9878e804b963df3c7c834aa38d1fa7ac3 Author: Christian Ambach Date: Fri Nov 2 08:42:28 2012 +0100 s3:utils fix a whitespace error --- Summary of changes: source3/smbd/proto.h |1 + source3/smbd/reply.c |5 +++-- source3/smbd/service.c |9 + source3/utils/smbcontrol.c |2 +- 4 files changed, 10 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index c80ef14..221499c 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -985,6 +985,7 @@ connection_struct *make_connection_smb2(struct smbd_server_connection *sconn, const char *pdev, NTSTATUS *pstatus); connection_struct *make_connection(struct smbd_server_connection *sconn, + NTTIME now, const char *service_in, const char *pdev, uint64_t vuid, NTSTATUS *status); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 4423e8e..8db9c62 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -666,6 +666,7 @@ void reply_tcon(struct smb_request *req) const char *p; TALLOC_CTX *ctx = talloc_tos(); struct smbd_server_connection *sconn = req->sconn; + NTTIME now = timeval_to_nttime(&req->request_time); START_PROFILE(SMBtcon); @@ -695,7 +696,7 @@ void reply_tcon(struct smb_request *req) service = service_buf; } - conn = make_connection(sconn,service,dev, + conn = make_connection(sconn, now, service, dev, req->vuid,&nt_status); req->conn = conn; @@ -911,7 +912,7 @@ void reply_tcon_and_X(struct smb_request *req) session_key_updated = true; } - conn = make_connection(sconn, service, client_devicetype, + conn = make_connection(sconn, now, service, client_devicetype, req->vuid, &nt_status); req->conn =conn; diff --git a/source3/smbd/service.c b/source3/smbd/service.c index bb28fbf..2214ac0 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -922,13 +922,13 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn, / static connection_struct *make_connection_smb1(struct smbd_server_connection *sconn, + NTTIME now, int snum, struct user_struct *vuser, const char *pdev, NTSTATUS *pstatus) { struct smbXsrv_tcon *tcon; NTSTATUS status; - NTTIME now = 0; struct connection_struct *conn; status = smb1srv_tcon_create(sconn->conn, now, &tcon); @@ -1025,6 +1025,7 @@ connection_struct *make_connection_smb2(struct smbd_server_connection *sconn, / connection_struct *make_connection(struct smbd_server_connection *sconn, + NTTIME now, const char *service_in, const char *pdev, uint64_t vuid, NTSTATUS *status) @@ -1078,7 +1079,7 @@ connection_struct *make_connection(struct smbd_server_connection *sconn, } DEBUG(5, ("making a connection to [homes] service " "created at session setup time\n")); - return make_connection_smb1(sconn, + return make_connection_smb1(sconn, now, vuser->homes_snum, vuser, dev, status); @@
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bddd118 s3:smb2_getinfo ensure proper error for not yet present quota support via 6d1be1c s3:vfs_gpfs re-indent run-away lines via fa728d1 s3:vfs_gpfs fix the build via e4946cf s3:vfs_gpfs remove a trailing space via 12ae181 s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled from ff82afb selftest: Move more tests to common list script. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bddd1182ea44875f28e12cf15fd07a86f43d8716 Author: Christian Ambach Date: Thu Sep 27 22:09:23 2012 -0700 s3:smb2_getinfo ensure proper error for not yet present quota support non-existing quota support needs to be signaled by NT_STATUS_NOT_SUPPORTED, not NT_STATUS_INVALID_PARAMETER Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Oct 12 13:37:37 CEST 2012 on sn-devel-104 commit 6d1be1caf925f80badabcbca3a2676398647f4a3 Author: Christian Ambach Date: Fri Oct 12 11:47:04 2012 +0200 s3:vfs_gpfs re-indent run-away lines some lines added by the acl_blob additions were longer than 80 chars commit fa728d1c0b6583c7d11b5540a8d13942a14701f4 Author: Christian Ambach Date: Fri Oct 12 11:45:59 2012 +0200 s3:vfs_gpfs fix the build make it compile again after the recent (untested) additions of the acl_blob functions commit e4946cf10cdc112aaa61291442ce29690fe1c105 Author: Christian Ambach Date: Fri Oct 12 10:32:20 2012 +0200 s3:vfs_gpfs remove a trailing space commit 12ae1812d0f123b6b988f597efaabf610f352d30 Author: Christian Ambach Date: Fri Oct 12 10:31:10 2012 +0200 s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled no sense in calling local flock when clustered sharemodes should be disabled --- Summary of changes: source3/modules/vfs_gpfs.c | 39 +++ source3/smbd/smb2_getinfo.c |4 2 files changed, 31 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b3cdca5..8e8c694 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -50,7 +50,7 @@ struct gpfs_config_data { }; -static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, +static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, uint32 share_mode, uint32 access_mask) { @@ -61,12 +61,15 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data, return -1); + if(!config->sharemodes) { + return 0; + } + START_PROFILE(syscall_kernel_flock); kernel_flock(fsp->fh->fd, share_mode, access_mask); - if (config->sharemodes - && !set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { + if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { ret = -1; } @@ -362,7 +365,8 @@ static NTSTATUS gpfsacl_fget_nt_acl(vfs_handle_struct *handle, return NT_STATUS_INTERNAL_ERROR); if (!config->acl) { - return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc); + return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, + mem_ctx, ppdesc); } result = gpfs_get_nfs4_acl(fsp->fsp_name->base_name, &pacl); @@ -395,7 +399,8 @@ static NTSTATUS gpfsacl_get_nt_acl(vfs_handle_struct *handle, return NT_STATUS_INTERNAL_ERROR); if (!config->acl) { - return SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc); + return SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, + mem_ctx, ppdesc); } result = gpfs_get_nfs4_acl(name, &pacl); @@ -709,22 +714,28 @@ static SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle, GPFS_ACL_TYPE_ACCESS, mem_ctx); } -static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, +static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle, + const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob) { struct gpfs_config_data *config; + SMB4ACL_T *pacl = NULL; + int result; SMB_VFS_HANDLE_GET_DATA(handle, config,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 965a2fb Revert "smb.conf(5): Remove 'idmap config' documentation - the parameter has" via 1947164 s3:nfs4acls filter away inheritance flags on files via 19631e8 s3:nfs4acls pass down fsp instead of just the filename via 43606bc s3:passdb formatting changes from ee0012d samba-tool domain provision: DNS forwarder default http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 965a2fb6b6bd0401baf273b28d0a5560cde6ebcc Author: Christian Ambach Date: Wed Sep 26 18:30:37 2012 -0700 Revert "smb.conf(5): Remove 'idmap config' documentation - the parameter has" This reverts commit e809abf55f6a2e6d93bcb5678142f56c49aea397. This parameter still exists, it is just only used as parametric option in the code and not easy to spot when looking out for lp_xxx Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu Sep 27 06:18:38 CEST 2012 on sn-devel-104 commit 1947164feb41710842277874cae0c35bfc97e3ab Author: Christian Ambach Date: Tue Sep 25 03:25:36 2012 +0200 s3:nfs4acls filter away inheritance flags on files While it is possible to define inheritance flags on files on Windows, this will be denied by GPFS and UFS (and potentially others). So it will be better to strip of these bits when being set for files instead of failing to set the ACL completely (this is current behavior). Users that want to retain the full SD will have to use acl_xattr (acl_tdb), as other pieces of the SD are also lost when translating to NFSv4. So this should not be a too intrusive change, but allow users to migrate data with such flags instead of failing to migrate the ACL completely. commit 19631e8e7e7d871261642340ffdcec3f73dccca6 Author: Christian Ambach Date: Tue Sep 25 01:34:04 2012 +0200 s3:nfs4acls pass down fsp instead of just the filename commit 43606bcbbfe237990ab0b100cf322c0c80e90eb2 Author: Christian Ambach Date: Mon Sep 24 03:03:26 2012 +0200 s3:passdb formatting changes fix some trailing whitespace and a typo --- Summary of changes: docs-xml/smbdotconf/winbind/idmapconfig.xml | 124 +++ source3/modules/nfs4_acls.c | 21 - source3/passdb/machine_sid.c| 14 ++-- 3 files changed, 148 insertions(+), 11 deletions(-) create mode 100644 docs-xml/smbdotconf/winbind/idmapconfig.xml Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/winbind/idmapconfig.xml b/docs-xml/smbdotconf/winbind/idmapconfig.xml new file mode 100644 index 000..53af31f --- /dev/null +++ b/docs-xml/smbdotconf/winbind/idmapconfig.xml @@ -0,0 +1,124 @@ +http://www.samba.org/samba/DTD/samba-doc";> + + + + ID mapping in Samba is the mapping between Windows SIDs and Unix user + and group IDs. This is performed by Winbindd with a configurable plugin + interface. Samba's ID mapping is configured by options starting with the +prefix. + An idmap option consists of the + prefix, followed by a domain name or the asterisk character (*), + a colon, and the name of an idmap setting for the chosen domain. + + + + The idmap configuration is hence divided into groups, one group + for each domain to be configured, and one group with the the + asterisk instead of a proper domain name, which specifies the + default configuration that is used to catch all domains that do + not have an explicit idmap configuration of their own. + + + + There are three general options available: + + + + + backend = backend_name + + This specifies the name of the idmap plugin to use as the + SID/uid/gid backend for this domain. The standard backends are + tdb + (idmap_tdb 8 ), + tdb2 + (idmap_tdb2 8), + ldap + (idmap_ldap 8), + , + rid + (idmap_rid 8), + , + hash + (idmap_hash 8), + , + autorid + (idmap_autorid 8), + , + ad + (idmap_ad 8), + , + and nss. + (idmap_nss 8), + The corresponding manual pages contain the details, but + here is a summary. + + + The first three of these create mappings of their own using + internal unixid counters and store the mappings in a database. + These ar
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f767059 s3:winbindd fix a compiler warning via 9f589ea s3:printing only do printing_subsystem_update when printing is enabled from 5f97363 s4:dns_server - introduce the wildcard binding feature http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f767059911460c0944d5e9289148a0776aeb97e5 Author: Christian Ambach Date: Sat Sep 22 20:44:41 2012 -0700 s3:winbindd fix a compiler warning about type potentially being used uninitialized Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104 commit 9f589ea4066099ed50e7f2323f572b3a8c98c60e Author: Christian Ambach Date: Sun Sep 23 08:39:49 2012 +0200 s3:printing only do printing_subsystem_update when printing is enabled no point in calling this if printing was disabled and no spoolss service was started this hurts CTDB clusters as the smbds on the cluster nodes will fight for the single record in the TDB This fixes Bug 9197 - Disabling printing still makes smbd create and access printer_list.tdb --- Summary of changes: source3/smbd/server.c|5 - source3/winbindd/winbindd_sids_to_xids.c |2 +- 2 files changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/server.c b/source3/smbd/server.c index d53b19a..15762d8 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1529,7 +1529,10 @@ extern void build_options(bool screen); /* do a printer update now that all messaging has been set up, * before we allow clients to start connecting */ - printing_subsystem_update(ev_ctx, msg_ctx, false); + if (!lp__disable_spoolss() && + (rpc_spoolss_daemon() != RPC_DAEMON_DISABLED)) { + printing_subsystem_update(ev_ctx, msg_ctx, false); + } TALLOC_FREE(frame); /* make sure we always have a valid stackframe */ diff --git a/source3/winbindd/winbindd_sids_to_xids.c b/source3/winbindd/winbindd_sids_to_xids.c index ad02189..f500f24 100644 --- a/source3/winbindd/winbindd_sids_to_xids.c +++ b/source3/winbindd/winbindd_sids_to_xids.c @@ -239,7 +239,7 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req, num_non_cached = 0; for (i=0; inum_sids; i++) { - char type; + char type = '\0'; uint32_t unix_id = UINT32_MAX; bool found = true; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0319903 s3:vfs_fake_acls fix a compiler warning via 1b5256c s3:winbindd fix a compiler warning from f339c1f script/autobuild.py: add --log-base option http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0319903b31474575baa78abac30004693f574158 Author: Christian Ambach Date: Sat Sep 22 13:33:02 2012 -0700 s3:vfs_fake_acls fix a compiler warning about acl being potentially uninitialized Autobuild-User(master): Christian Ambach Autobuild-Date(master): Sun Sep 23 01:08:39 CEST 2012 on sn-devel-104 commit 1b5256c184ec378783e6219b34b5a3e512c4df99 Author: Christian Ambach Date: Sat Sep 22 13:32:00 2012 -0700 s3:winbindd fix a compiler warning about result being potentially uninitialized --- Summary of changes: source3/modules/vfs_fake_acls.c |2 +- source3/winbindd/winbindd_sids_to_xids.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index 258cb19..6390b67 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -269,7 +269,7 @@ static SMB_ACL_T fake_acls_sys_acl_get_fd(struct vfs_handle_struct *handle, file DATA_BLOB blob = data_blob_null; ssize_t length; const char *name = FAKE_ACL_ACCESS_XATTR; - struct smb_acl_t *acl; + struct smb_acl_t *acl = NULL; TALLOC_CTX *frame = talloc_stackframe(); do { diff --git a/source3/winbindd/winbindd_sids_to_xids.c b/source3/winbindd/winbindd_sids_to_xids.c index 09d9a9b..ad02189 100644 --- a/source3/winbindd/winbindd_sids_to_xids.c +++ b/source3/winbindd/winbindd_sids_to_xids.c @@ -223,7 +223,7 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req, struct winbindd_sids_to_xids_state *state = tevent_req_data( req, struct winbindd_sids_to_xids_state); NTSTATUS status; - char *result; + char *result = NULL; uint32_t i, num_non_cached; if (tevent_req_is_nterror(req, &status)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 83ed9b5 s3:pdb_ldap remove unused function via 8df92a4 s3:rpcclient fix a compiler warning via f480b44 s3:utils/net fix a compiler warning from d59688a auth/kerberos: add HAVE_KRB5 guard to fix non-krb5 build after winbindd pac changes http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 83ed9b52e75215e7590f842fa7c1ec1a4e4aa6bc Author: Christian Ambach Date: Fri Sep 21 13:54:47 2012 -0700 s3:pdb_ldap remove unused function Autobuild-User(master): Christian Ambach Autobuild-Date(master): Sat Sep 22 04:28:37 CEST 2012 on sn-devel-104 commit 8df92a44fcf96a8950a1ba500dbe8febfe91b3de Author: Christian Ambach Date: Fri Sep 21 14:00:53 2012 -0700 s3:rpcclient fix a compiler warning commit f480b44430520f998fea867aa4c2cf9e93cb8d51 Author: Christian Ambach Date: Fri Sep 21 13:58:29 2012 -0700 s3:utils/net fix a compiler warning ret might be used uninitialized in out-of-memory condition --- Summary of changes: source3/passdb/pdb_ldap.c | 23 --- source3/rpcclient/rpcclient.c |2 ++ source3/utils/net_connections.c |2 +- 3 files changed, 3 insertions(+), 24 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index b41f58b..a5b8f0b 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -347,29 +347,6 @@ int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state, } /*** - Run the search by rid. -**/ - -static int ldapsam_search_suffix_by_rid (struct ldapsam_privates *ldap_state, -uint32_t rid, LDAPMessage ** result, -const char **attr) -{ - char *filter = NULL; - int rc; - - filter = talloc_asprintf(talloc_tos(), "(&(rid=%i)%s)", rid, - get_objclass_filter(ldap_state->schema_ver)); - if (!filter) { - return LDAP_NO_MEMORY; - } - - rc = smbldap_search_suffix(ldap_state->smbldap_state, - filter, attr, result); - TALLOC_FREE(filter); - return rc; -} - -/*** Run the search by SID. **/ diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 7b31e15..0dad971 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -704,6 +704,8 @@ static NTSTATUS do_cmd(struct cli_state *cli, case PIPE_AUTH_TYPE_SPNEGO_KRB5: oid = GENSEC_OID_KERBEROS5; break; + case PIPE_AUTH_TYPE_SPNEGO_NONE: + break; } ntresult = cli_rpc_pipe_open_spnego( cli, cmd_entry->table, diff --git a/source3/utils/net_connections.c b/source3/utils/net_connections.c index b713ed9..a74d53f 100644 --- a/source3/utils/net_connections.c +++ b/source3/utils/net_connections.c @@ -194,7 +194,7 @@ static int delete_orphans(struct cclean_ctx *ctx) static int cclean(bool verbose, bool dry_run, bool automatic) { - int ret; + int ret = -1; struct cclean_ctx *ctx = talloc_zero(talloc_tos(), struct cclean_ctx); if (ctx == NULL) { d_printf("Out of memory\n"); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b06dbfb s3:libsmb fix a double free error from e7a58bc docs-xml: fix build of winbindd- and krb5 locator-related manpages http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b06dbfbba6bf62fd99067675dd9818d6314fd2d0 Author: Christian Ambach Date: Sun Sep 16 21:45:56 2012 -0700 s3:libsmb fix a double free error t refers to self->thread_state that is freed a few lines below Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Sep 17 22:04:13 CEST 2012 on sn-devel-104 --- Summary of changes: source3/libsmb/pylibsmb.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 611d07a..d31409c 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -213,7 +213,6 @@ fail: close(t->shutdown_pipe[1]); t->shutdown_pipe[1] = -1; } - TALLOC_FREE(t); } TALLOC_FREE(self->thread_state); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 57990cb s3:libsmb fix a potential crash via 7a61829 s3:vfs_gpfs: fix build after recent VFS changes via 99b5c75 s3:auth fix a compiler warning from c0d4f24 s4-python: Formatting fixes, break lines. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 57990cbcbbdf83d7b9997ac1fd33528c63c96226 Author: Christian Ambach Date: Sun Sep 16 00:15:21 2012 +0200 s3:libsmb fix a potential crash Signed-off-by: Volker Lendecke Autobuild-User(master): Christian Ambach Autobuild-Date(master): Sun Sep 16 22:31:38 CEST 2012 on sn-devel-104 commit 7a6182962966e5edb42728c8d0a4d471a69c83d7 Author: Christian Ambach Date: Sat Sep 15 22:57:51 2012 +0200 s3:vfs_gpfs: fix build after recent VFS changes commit 99b5c75974dd904644054433a3c3ad46a4ffc498 Author: Christian Ambach Date: Sat Sep 15 22:47:06 2012 +0200 s3:auth fix a compiler warning --- Summary of changes: source3/auth/token_util.c |5 ++--- source3/libsmb/pylibsmb.c | 21 - source3/modules/vfs_gpfs.c | 10 +- 3 files changed, 19 insertions(+), 17 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index aad34cb..a618e21 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -858,7 +858,7 @@ bool user_sid_in_group_sid(const struct dom_sid *sid, const struct dom_sid *grou gid_t gid; char *found_username; struct security_token *token; - bool result; + bool result = false; enum lsa_SidType type; TALLOC_CTX *mem_ctx = talloc_stackframe(); @@ -880,8 +880,7 @@ bool user_sid_in_group_sid(const struct dom_sid *sid, const struct dom_sid *grou if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("could not create token for %s\n", dom_sid_string(mem_ctx, sid))); - TALLOC_FREE(mem_ctx); - return False; + goto done; } result = security_token_has_sid(token, group_sid); diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index d8e64b3..611d07a 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -166,7 +166,7 @@ static int py_cli_thread_destructor(struct py_cli_thread *t) static bool py_cli_state_setup_ev(struct py_cli_state *self) { - struct py_cli_thread *t; + struct py_cli_thread *t = NULL; int ret; self->ev = tevent_context_init_byname(NULL, "poll_mt"); @@ -202,15 +202,18 @@ static bool py_cli_state_setup_ev(struct py_cli_state *self) return true; fail: - TALLOC_FREE(t->shutdown_fde); + if (t != NULL) { + TALLOC_FREE(t->shutdown_fde); - if (t->shutdown_pipe[0] != -1) { - close(t->shutdown_pipe[0]); - t->shutdown_pipe[0] = -1; - } - if (t->shutdown_pipe[1] != -1) { - close(t->shutdown_pipe[1]); - t->shutdown_pipe[1] = -1; + if (t->shutdown_pipe[0] != -1) { + close(t->shutdown_pipe[0]); + t->shutdown_pipe[0] = -1; + } + if (t->shutdown_pipe[1] != -1) { + close(t->shutdown_pipe[1]); + t->shutdown_pipe[1] = -1; + } + TALLOC_FREE(t); } TALLOC_FREE(self->thread_state); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a39187e..8959fe6 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -554,7 +554,7 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl) SMB_ACL_T result; gpfs_aclCount_t i; - result = sys_acl_init(pacl->acl_nace); + result = sys_acl_init(); if (result == NULL) { errno = ENOMEM; return NULL; @@ -573,14 +573,14 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl) switch (g_ace->ace_type) { case GPFS_ACL_USER: ace->a_type = SMB_ACL_USER; - ace->uid = (uid_t)g_ace->ace_who; + ace->info.user.uid = (uid_t)g_ace->ace_who; break; case GPFS_ACL_USER_OBJ: ace->a_type = SMB_ACL_USER_OBJ; break; case GPFS_ACL_GROUP: ace->a_type = SMB_ACL_GROUP; - ace->gid = (gid_t)g_ace->ace_who; + ace->info.group.gid = (gid_t)g_ace->ace_who; break; case GPFS_ACL_GRO
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 624e51a s3:smbd Bump the smbd vfs interface version to 30 via 5765d73 s3:vfs/time_audit: Add back pointer for sys_acl_delete_def_file_fn via dc9b622 s3:vfs/time_audit: add path names to log messages via cf7f685 s3:client use more access bits for snapshot display from ab33691 docs:build: make target "manpages" .PHONY, so manpages do get built... http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 624e51a21a9dd371dae63ebbcb4c8d3a9ec15953 Author: Christian Ambach Date: Mon Sep 10 17:24:57 2012 +0200 s3:smbd Bump the smbd vfs interface version to 30 that is what Samba 4.0.0 will ship with Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Sep 10 19:40:01 CEST 2012 on sn-devel-104 commit 5765d73f72e25f53bd899e17c5ebd6a3aada1686 Author: Christof Schmitt Date: Fri Aug 31 10:33:57 2012 -0700 s3:vfs/time_audit: Add back pointer for sys_acl_delete_def_file_fn Commit e25830dcd87387a237b96f0d70deb204a5bf0a54 removed the function pointer from the time_audit module, although the VFS function still exists. Add the function pointer again in time_audit as this seems to be an accidentally deletion. Signed-off-by: Christian Ambach commit dc9b622d75d85c48441db5034136e6ff90c19811 Author: Ralph Wuerthner Date: Wed Jul 25 18:39:57 2012 +0200 s3:vfs/time_audit: add path names to log messages Signed-off-by: Christian Ambach commit cf7f68503de06c2dad5f7b65a9001bceaab542ef Author: Christian Ambach Date: Wed Sep 5 15:07:54 2012 +0200 s3:client use more access bits for snapshot display otherwise Windows server will reject the request for shadow copy enumeration with access denied --- Summary of changes: source3/client/client.c |3 +- source3/include/vfs.h|3 +- source3/modules/vfs_time_audit.c | 251 ++ 3 files changed, 175 insertions(+), 82 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/client/client.c b/source3/client/client.c index 2c949ac..1ee9856 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1757,7 +1757,8 @@ static int do_allinfo(const char *name) } status = cli_ntcreate(cli, name, 0, - CREATE_ACCESS_READ, 0, + SEC_FILE_READ_DATA | SEC_FILE_READ_ATTRIBUTE | + SEC_STD_SYNCHRONIZE, 0, FILE_SHARE_READ|FILE_SHARE_WRITE |FILE_SHARE_DELETE, FILE_OPEN, 0x0, 0x0, &fnum); diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 3e4eefe..17ec262 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -143,7 +143,8 @@ /* Leave at 29 - not yet released. Remove sys_acl functions other than set and get - abartlet */ /* Leave at 29 - not yet released. Added backup_intent bool to files_struct - JRA */ /* Leave at 29 - not yet released. Add durable handle functions - metze/obnox */ -#define SMB_VFS_INTERFACE_VERSION 29 +/* Bump to version 30 - Samba 4.0.0 will ship with interface version 30 */ +#define SMB_VFS_INTERFACE_VERSION 30 /* All intercepted VFS operations must be declared as static functions inside module source diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 4a400bd..c80fc8a 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -35,12 +35,88 @@ static double audit_timeout; -static void smb_time_audit_log(const char *syscallname, double elapsed) +static void smb_time_audit_log_msg(const char *syscallname, double elapsed, + const char *msg) { - DEBUG(0, ("WARNING: System call \"%s\" took unexpectedly long " - "(%.2f seconds) -- Validate that file and storage " + DEBUG(0, ("WARNING: VFS call \"%s\" took unexpectedly long " + "(%.2f seconds) %s%s-- Validate that file and storage " "subsystems are operating normally\n", syscallname, - elapsed)); + elapsed, (msg != NULL) ? msg : "", + (msg != NULL) ? " " : "")); +} + +static void smb_time_audit_log(const char *syscallname, double elapsed) +{ + smb_time_audit_log_msg(syscallname, elapsed, NULL); +} + +static void smb_time_audit_log_fsp(const char *syscallname, double elapsed, + const struct files_struct *fsp) +{ + char *base_name = NULL; + char *connectpath = NULL; + char *msg = NULL; + + if (fsp == N
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2eb606b s3:build fix autoconf build on RHEL5 via 3dfd179 s3:doc Fix name of timeout parameter in documentation via 424492a s3:dbwrap_ctdb: Add DB name and key to warning message from 7204dc9 s4 dns: Negotiate GSSAPI-based TKEYs http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2eb606bfa907aea0a93f3eef550316fb1d663084 Author: Christian Ambach Date: Fri Aug 31 11:00:23 2012 +0200 s3:build fix autoconf build on RHEL5 RHEL5 only has autoconf 2.59, so autogen.sh still needs to find autoconf-2.60.m4 somewhere, but it was removed with 5f58359 Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Aug 31 12:50:03 CEST 2012 on sn-devel-104 commit 3dfd179638a821e83a18476dc607fe34e7e5ec57 Author: Christof Schmitt Date: Thu Aug 30 15:42:51 2012 -0700 s3:doc Fix name of timeout parameter in documentation The name is time_audit:timeout, not time_audit:audit_timeout. Signed-off-by: Christian Ambach commit 424492a96358dd52b8cc48ec26b25b97ae809e57 Author: Christof Schmitt Date: Thu Aug 30 13:16:24 2012 -0700 s3:dbwrap_ctdb: Add DB name and key to warning message When a operation takes too long, it is useful for debugging to know the DB and the key. Signed-off-by: Christian Ambach --- Summary of changes: docs-xml/manpages-3/vfs_time_audit.8.xml |6 +- source3/lib/dbwrap/dbwrap_ctdb.c |9 +- source3/m4/autoconf-2.60.m4 | 236 ++ 3 files changed, 247 insertions(+), 4 deletions(-) create mode 100644 source3/m4/autoconf-2.60.m4 Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/vfs_time_audit.8.xml b/docs-xml/manpages-3/vfs_time_audit.8.xml index fc71e28..d79acc8 100644 --- a/docs-xml/manpages-3/vfs_time_audit.8.xml +++ b/docs-xml/manpages-3/vfs_time_audit.8.xml @@ -31,7 +31,7 @@ The time_audit VFS module logs system calls that take longer than the number of milliseconds defined by the variable - time_audit:audit_timeout. It will log the calls and + time_audit:timeout. It will log the calls and the time spent in it. @@ -51,7 +51,7 @@ - time_audit:audit_timeout = number of milliseconds + time_audit:timeout = number of milliseconds VFS calls that take longer than the defined number of milliseconds that should be logged. The default is 1 (10s). @@ -74,7 +74,7 @@ /test/sample_share time_audit - 3000 + 3000 diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 0a57997..6d46586 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -996,7 +996,14 @@ static int db_ctdb_record_destr(struct db_record* data) if (threshold != 0) { double timediff = timeval_elapsed(&crec->lock_time); if ((timediff * 1000) > threshold) { - DEBUG(0, ("Held tdb lock %f seconds\n", timediff)); + const char *key; + + key = hex_encode_talloc(data, + (unsigned char *)data->key.dptr, + data->key.dsize); + DEBUG(0, ("Held tdb lock on db %s, key %s %f seconds\n", + tdb_name(crec->ctdb_ctx->wtdb->tdb), key, + timediff)); } } diff --git a/source3/m4/autoconf-2.60.m4 b/source3/m4/autoconf-2.60.m4 new file mode 100644 index 000..b2694fd --- /dev/null +++ b/source3/m4/autoconf-2.60.m4 @@ -0,0 +1,236 @@ +# AC_GNU_SOURCE +# -- +AC_DEFUN([AC_GNU_SOURCE], +[AH_VERBATIM([_GNU_SOURCE], +[/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif])dnl +AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl +AC_DEFINE([_GNU_SOURCE]) +]) + +# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, +# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) +# -- +# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') +# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, +# try again with each compiler option in the space-separated OPTION-LIST; if one +# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, +# else ACTION-IF-UNAVAILABLE. +AC_DEFUN([_AC_C_STD_TRY], +[AC_MSG_CHECKING([for $CC option to accept ISO ]m4
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 02aacb1 s3:libsmb correctly set isFsctl for snapshot list from 4612092 selftest: Remove spoolss tests from knownfail. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 02aacb17d18f1bb47575b473a9468ff05403e67c Author: Christian Ambach Date: Thu Aug 30 16:43:33 2012 +0200 s3:libsmb correctly set isFsctl for snapshot list FSCTL_GET_SHADOW_COPY_DATA is a FSCTL, so set the isFsctl marker otherwise smbclient allinfo will not report snapshots any more with the changes made for Bug #8311 Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu Aug 30 18:57:24 CEST 2012 on sn-devel-104 --- Summary of changes: source3/libsmb/clifile.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 1ee7fff..ca9b867 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -5490,7 +5490,7 @@ struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx, SIVAL(state->setup + 0, 0, FSCTL_GET_SHADOW_COPY_DATA); SSVAL(state->setup + 2, 0, fnum); - SCVAL(state->setup + 3, 0, 0); /* isFsctl */ + SCVAL(state->setup + 3, 0, 1); /* isFsctl */ SCVAL(state->setup + 3, 1, 0); /* compfilter, isFlags (WSSP) */ subreq = cli_trans_send( -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6678907 s3:vfs_gpfs: Use directory not file to get fileset id from f31d0d0 vfs_media_harmony: fix some compile warnings with llvm http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6678907fae43e0d25b578b4e649a2fbd9c5e9d71 Author: Christof Schmitt Date: Thu Aug 16 12:47:52 2012 -0700 s3:vfs_gpfs: Use directory not file to get fileset id The query of the fileset quota needs to determine the file set id first. With the currently available interface, this requires opening the file to get a file descriptor. For files, this open can fail when a share mode is set. Workaround this by querying the fileset id on the directory instead. The proper solution would be getting an interface for getting the fileset id that does not require opening the file. Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Aug 29 18:58:34 CEST 2012 on sn-devel-104 --- Summary of changes: source3/modules/gpfs.c | 16 +--- source3/modules/vfs_gpfs.c | 24 ++-- 2 files changed, 35 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index db60256..9730d3a 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -253,8 +253,11 @@ int get_gpfs_fset_id(const char *pathname, int *fset_id) arg.fsn.structType = GPFS_FCNTL_GET_FILESETNAME; fd = open(pathname, O_RDONLY); - if (fd == -1) + if (fd == -1) { + DEBUG(1, ("Could not open %s: %s\n", + pathname, strerror(errno))); return fd; + } err = gpfs_fcntl_fn(fd, &arg); errno_fcntl = errno; @@ -262,11 +265,18 @@ int get_gpfs_fset_id(const char *pathname, int *fset_id) if (err) { errno = errno_fcntl; + DEBUG(1, ("GPFS_FCNTL_GET_FILESETNAME for %s failed: %s\n", + pathname, strerror(errno))); return err; } - return gpfs_getfilesetid_fn(discard_const_p(char, pathname), - arg.fsn.buffer, fset_id); + err = gpfs_getfilesetid_fn(discard_const_p(char, pathname), + arg.fsn.buffer, fset_id); + if (err) { + DEBUG(1, ("gpfs_getfilesetid for %s failed: %s\n", + pathname, strerror(errno))); + } + return err; } void smbd_gpfs_lib_init() diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 7a01257..a39187e 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1541,10 +1541,30 @@ static int vfs_gpfs_get_quotas(const char *path, uid_t uid, gid_t gid, struct gpfs_quotaInfo *qi_fset) { int err; + char *dir_path; + bool b; - err = get_gpfs_fset_id(path, fset_id); + /* +* We want to always use the directory to get the fileset id, +* because files might have a share mode. We also do not want +* to get the parent directory when there is already a +* directory to avoid stepping in a different fileset. The +* path passed here is currently either "." or a filename, so +* this is ok. The proper solution would be having a way to +* query the fileset id without opening the file. +*/ + b = parent_dirname(talloc_tos(), path, &dir_path, NULL); + if (!b) { + errno = ENOMEM; + return -1; + } + + DEBUG(10, ("path %s, directory %s\n", path, dir_path)); + + err = get_gpfs_fset_id(dir_path, fset_id); if (err) { - DEBUG(0, ("Get fset id failed, errno %d.\n", errno)); + DEBUG(0, ("Get fset id failed path %s, dir %s, errno %d.\n", + path, dir_path, errno)); return err; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f46c4df s3:vfs_tsmsm only send notifications when file was offline before via dda4c5d s3: Adapt the tsmsm module to the new aio routines via d1e1f82 s3-vfs: Fix calls of lp_parm_talloc_string via 3755a41 s3: Remove the gpfs_hsm_notify module via 2c3a58d s3: Merge vfs_gpfs_hsm_notify into vfs_gpfs.c from 2e1ab13 s4-dsdb: Use tmp_ctx in kccsrv_check_deleted to avoid leaking memory onto part->dn http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f46c4dfe28831a6e8d610589c0d45193070c4864 Author: Christian Ambach Date: Fri Aug 17 17:40:24 2012 +0200 s3:vfs_tsmsm only send notifications when file was offline before Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Aug 17 20:05:30 CEST 2012 on sn-devel-104 commit dda4c5d7945e5538588b9a59a456a4e5eb63daf6 Author: Volker Lendecke Date: Fri Aug 10 11:33:54 2012 +0200 s3: Adapt the tsmsm module to the new aio routines Signed-off-by: Christian Ambach commit d1e1f8224f578c9b92e81db6b93f4fb7af135138 Author: Volker Lendecke Date: Wed Aug 8 11:23:12 2012 +0200 s3-vfs: Fix calls of lp_parm_talloc_string Signed-off-by: Christian Ambach commit 3755a418ccee85d633aaac5047c007893ce63c73 Author: Volker Lendecke Date: Wed Aug 8 10:38:36 2012 +0200 s3: Remove the gpfs_hsm_notify module The functionality has been merged into vfs_gpfs Signed-off-by: Christian Ambach commit 2c3a58db9e2149785486e6b6398615f2d226dc23 Author: Volker Lendecke Date: Wed Aug 8 00:32:35 2012 +0200 s3: Merge vfs_gpfs_hsm_notify into vfs_gpfs.c It was separated out because formerly our async I/O was not properly stackable. aio_fork could for example catch aio and not get aio_return get through to vfs_gpfs Signed-off-by: Christian Ambach --- Summary of changes: packaging/RHEL-CTDB/configure.rpm |2 +- packaging/RHEL-CTDB/samba.spec.tmpl |3 +- source3/Makefile.in |5 - source3/configure.in |2 - source3/modules/vfs_gpfs.c| 190 + source3/modules/vfs_gpfs_hsm_notify.c | 110 --- source3/modules/vfs_tsmsm.c | 147 +++--- source3/modules/wscript_build |8 -- source3/wscript |2 +- 9 files changed, 326 insertions(+), 143 deletions(-) delete mode 100644 source3/modules/vfs_gpfs_hsm_notify.c Changeset truncated at 500 lines: diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm index c2a0302..5e2b88e 100755 --- a/packaging/RHEL-CTDB/configure.rpm +++ b/packaging/RHEL-CTDB/configure.rpm @@ -51,7 +51,7 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \ --without-smbwrapper \ --with-pam \ --with-quotas \ - --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm,vfs_gpfs_hsm_notify \ + --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \ --with-syslog \ --with-utmp \ --with-cluster-support \ diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl index a9111d2..80237e7 100644 --- a/packaging/RHEL-CTDB/samba.spec.tmpl +++ b/packaging/RHEL-CTDB/samba.spec.tmpl @@ -186,7 +186,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ --without-smbwrapper \ --with-pam \ --with-quotas \ - --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm,vfs_gpfs_hsm_notify \ + --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \ --with-syslog \ --with-utmp \ --with-cluster-support \ @@ -416,7 +416,6 @@ exit 0 %{_libarchdir}/samba/vfs/fileid.so %{_libarchdir}/samba/vfs/full_audit.so %{_libarchdir}/samba/vfs/gpfs.so -%{_libarchdir}/samba/vfs/gpfs_hsm_notify.so %{_libarchdir}/samba/vfs/linux_xfs_sgid.so %{_libarchdir}/samba/vfs/netatalk.so %{_libarchdir}/samba/vfs/preopen.so diff --git a/source3/Makefile.in b/source3/Makefile.in index b8b055a..57c6c1d 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -882,7 +882,6 @@ VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o VFS_PREALLOC_OBJ = modules/vfs_prealloc.o VFS_COMMIT_OBJ = modules/vfs_commit.o VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o -VFS_GPFS_HSM_NOTIFY_OBJ = modules/vfs_gpfs_hsm_notify.o VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o VFS_READAHEAD_OBJ = modules/vfs_readahead.o VFS_TSMSM_OBJ = modules/vfs_tsmsm.o @@ -2849,10 +2848,6 @@ bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ) @echo "Building plugin $@" @$(SHLD_MODULE) $(VFS
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cbe2510 s3-g_lock: Make g_lock_lock more robust via b83cd05 s3-msg: For msg_channel, correct the talloc hierarchy via 8e50ff0 s3-msg: Rename msg_channel_init_destructor via c2b29de s3-autoconf: Fix deps for dbwrap_torture via 494003f s3-g_lock: Properly free "rec" on retry to avoid deadlock via 7c56d80 s3:brlock: give traverse_fn a proper name via 6e39011 s3:vfs_gpfs: make sure parameters are set correctly for leases via a8b5830 s3:vfs_gpfs: Fix compile error in gpfs module from 56fc7bc libcli/smb: support broken OS/2 error responses bug #9096 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cbe25105c7fc51b178bf4df217812ccf48c472a1 Author: Volker Lendecke Date: Fri Aug 10 17:00:38 2012 +0200 s3-g_lock: Make g_lock_lock more robust If for some reason the cleanup of dbwrap_watch_send does not work properly, we might starve indefinitely. Make the lock routine more robust by retrying every 5-10 seconds. g_lock_trylock will clean up orphaned entries. Signed-off-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Thu Aug 16 19:44:00 CEST 2012 on sn-devel-104 commit b83cd05ce1ff3357428cbc789ac4dbd08aa706ec Author: Volker Lendecke Date: Fri Aug 10 15:24:23 2012 +0200 s3-msg: For msg_channel, correct the talloc hierarchy talloc_free() of a channel must free all immediate requests that have piled up Signed-off-by: Christian Ambach commit 8e50ff02f1e0b1b95418d80ab61ffeb474de13eb Author: Volker Lendecke Date: Fri Aug 10 14:54:37 2012 +0200 s3-msg: Rename msg_channel_init_destructor Signed-off-by: Christian Ambach commit c2b29de2b1b0456cb21c64bf394149c652837c69 Author: Volker Lendecke Date: Fri Aug 10 14:29:44 2012 +0200 s3-autoconf: Fix deps for dbwrap_torture Signed-off-by: Christian Ambach commit 494003fb67ea433b1da07898a3bf6c5e0c3152ce Author: Volker Lendecke Date: Fri Aug 10 13:42:51 2012 +0200 s3-g_lock: Properly free "rec" on retry to avoid deadlock Signed-off-by: Christian Ambach commit 7c56d80bee60895391fdec3f8f3f11d38a492190 Author: Christian Ambach Date: Wed Aug 8 17:46:59 2012 +0200 s3:brlock: give traverse_fn a proper name commit 6e3901194bbd74e2f5e7a0f0928c52da92e729c1 Author: Christian Ambach Date: Tue Aug 7 18:42:39 2012 +0200 s3:vfs_gpfs: make sure parameters are set correctly for leases gpfs:leases requires kernel oplocks = yes and level2 oplocks = no to work properly make sure those are set correctly for a share commit a8b583089bfa2d4f7f9f4d0aba0f0640ef1ad959 Author: Christof Schmitt Date: Mon Oct 24 16:52:50 2011 -0700 s3:vfs_gpfs: Fix compile error in gpfs module Fix this compile error by adding fcntl.h as a include that defines F_RDLCK and F_WRLCK: modules/gpfs.c: In function ‘set_gpfs_lease’: modules/gpfs.c:102: error: ‘F_RDLCK’ undeclared (first use in this function) modules/gpfs.c:102: error: (Each undeclared identifier is reported only once modules/gpfs.c:102: error: for each function it appears in.) modules/gpfs.c:105: error: ‘F_WRLCK’ undeclared (first use in this function) --- Summary of changes: source3/Makefile.in|2 +- source3/lib/g_lock.c | 25 + source3/lib/msg_channel.c |8 source3/locking/brlock.c |4 ++-- source3/modules/gpfs.c |1 + source3/modules/vfs_gpfs.c | 25 + 6 files changed, 58 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index 38e8bb1..b8b055a 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -3018,7 +3018,7 @@ bin/dbwrap_tool: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) $(LIBTDB) install-dbwrap_tool:: bin/dbwrap_tool @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $< -bin/dbwrap_torture: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB) +bin/dbwrap_torture: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB) $(POPT_LIBS) @echo "Linking $@" @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\ $(LDFLAGS) $(DYNEXP) $(LIBS) \ diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index d505b6b..4535b35 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -227,6 +227,12 @@ struct tevent_req *g_lock_lock_send(TALLOC_CTX *mem_ctx, if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } + if (!tevent_req_set_endtime( + subreq, state->ev, + timeval_current_ofs(5 + sys_random() % 5, 0)))
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b20fb15 s4:libcli/smb2/write correct error checking via 4e91ccf smbXcli: add some includes to fix compiler warnings via 0dfc330 lib/socket_wrapper: writev returns ssize_t, not int via 18c152f lib/param: move enum dns_update_settings to lib/param from efe28b1 s4:libcli/pyerrors: add PyErr_NTSTATUS_NOT_OK_RAISE() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b20fb153e1f20a2c6bdbf71d91858e8d2b1c4712 Author: Christian Ambach Date: Fri Jul 27 15:09:18 2012 +0200 s4:libcli/smb2/write correct error checking Server might return STATUS_BUFFER_OVERFLOW, which is not caught by NT_STATUS_IS_ERR Autobuild-User(master): Christian Ambach Autobuild-Date(master): Mon Aug 6 20:01:01 CEST 2012 on sn-devel-104 commit 4e91ccf16de6db8fdfdec65717b95f0e072f42da Author: Christian Ambach Date: Tue Jul 24 13:16:57 2012 +0200 smbXcli: add some includes to fix compiler warnings if smbXcli_base.h is included on its own, there are various compiler warnings about implicitly declared struct iovec and smb2_create_blobs commit 0dfc33026e1445327954b8822afe4e44e82185ef Author: Christian Ambach Date: Fri Jul 27 15:08:05 2012 +0200 lib/socket_wrapper: writev returns ssize_t, not int commit 18c152f8aa5ab7b5463fa1f6daf72fbbe32eaddb Author: Christian Ambach Date: Fri Aug 3 17:59:17 2012 +0200 lib/param: move enum dns_update_settings to lib/param --- Summary of changes: lib/param/loadparm.c|1 - lib/param/loadparm.h|3 +++ lib/socket_wrapper/socket_wrapper.c |2 +- lib/socket_wrapper/socket_wrapper.h |2 +- libcli/smb/smbXcli_base.h |3 +++ source3/param/loadparm.c|1 - source4/dns_server/dns_update.c |2 +- source4/dns_server/dns_update.h | 25 - source4/libcli/smb2/write.c |2 +- 9 files changed, 10 insertions(+), 31 deletions(-) delete mode 100644 source4/dns_server/dns_update.h Changeset truncated at 500 lines: diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 80733b4..4751a06 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -66,7 +66,6 @@ #include "lib/param/s3_param.h" #include "lib/util/bitmap.h" #include "libcli/smb/smb_constants.h" -#include "source4/dns_server/dns_update.h" #define standard_sub_basic talloc_strdup diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h index 8c4a7b1..591e6e5 100644 --- a/lib/param/loadparm.h +++ b/lib/param/loadparm.h @@ -176,6 +176,9 @@ enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX, #define ADS_AUTH_SASL_FORCE 0x0080 #define ADS_AUTH_USER_CREDS 0x0100 +/* DNS update settings */ +enum dns_update_settings {DNS_UPDATE_OFF, DNS_UPDATE_ON, DNS_UPDATE_SIGNED}; + /* LDAP SSL options */ enum ldap_ssl_types {LDAP_SSL_OFF, LDAP_SSL_START_TLS}; diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index 44d21fb..3c9d0f1 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -2506,7 +2506,7 @@ int swrap_readv(int s, const struct iovec *vector, size_t count) return ret; } -int swrap_writev(int s, const struct iovec *vector, size_t count) +ssize_t swrap_writev(int s, const struct iovec *vector, size_t count) { struct msghdr msg; struct iovec tmp; diff --git a/lib/socket_wrapper/socket_wrapper.h b/lib/socket_wrapper/socket_wrapper.h index 32c9de6..bd8cdca 100644 --- a/lib/socket_wrapper/socket_wrapper.h +++ b/lib/socket_wrapper/socket_wrapper.h @@ -56,7 +56,7 @@ ssize_t swrap_recv(int s, void *buf, size_t len, int flags); ssize_t swrap_read(int s, void *buf, size_t len); ssize_t swrap_send(int s, const void *buf, size_t len, int flags); int swrap_readv(int s, const struct iovec *vector, size_t count); -int swrap_writev(int s, const struct iovec *vector, size_t count); +ssize_t swrap_writev(int s, const struct iovec *vector, size_t count); int swrap_close(int); int swrap_dup(int oldfd); int swrap_dup2(int oldfd, int newfd); diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index 689369e..2c0410b 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -21,6 +21,9 @@ #ifndef _SMBXCLI_BASE_H_ #define _SMBXCLI_BASE_H_ +#include +#include "libcli/smb/smb2_create_blob.h" + struct smbXcli_conn; struct smbXcli_session; struct smbXcli_tcon; diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index dc23868..1b766c3 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -68,7 +68,6 @@ #include "dbwrap/dbwrap.h" #include "dbwrap/dbwrap_rbt.h" #include "../
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 764f2f9 s3-ctdb: return proper exit code via 0a45e9c s3-ctdb: adjust a loglevel via 6cfe6e9 s3-ctdb: Fix ctdb_serverids_exist for target nodes that died via 6d83e35 s3-ctdb: Add debugs to ctdb_serverids_exist from cff3ad4 lib/dbwrap: rewrite lock order check to ease debugging http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 764f2f99e0a5df0112031bc6f13f8d752a6a302d Author: Christian Ambach Date: Fri Aug 3 12:42:41 2012 +0200 s3-ctdb: return proper exit code do not loose the result from ctdbd_messaging_send_blob() Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Aug 3 14:49:01 CEST 2012 on sn-devel-104 commit 0a45e9c4d2333192945eb7ba3100b78c1f1c07f0 Author: Christian Ambach Date: Fri Aug 3 12:29:10 2012 +0200 s3-ctdb: adjust a loglevel commit 6cfe6e92a1f962040a22f107086b19159bb7c605 Author: Volker Lendecke Date: Mon Jul 16 16:18:19 2012 +0200 s3-ctdb: Fix ctdb_serverids_exist for target nodes that died Signed-off-by: Christian Ambach commit 6d83e35410eb852b36678277085726992dc32f98 Author: Volker Lendecke Date: Mon Jul 16 15:50:06 2012 +0200 s3-ctdb: Add debugs to ctdb_serverids_exist Signed-off-by: Christian Ambach --- Summary of changes: source3/lib/ctdbd_conn.c | 54 ++ 1 files changed, 40 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 4bad3f0..84f26e0 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -760,7 +760,7 @@ NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn, status = ctdbd_messaging_send_blob(conn, dst_vnn, dst_srvid, blob.data, blob.length); TALLOC_FREE(blob.data); - return NT_STATUS_OK; + return status; } NTSTATUS ctdbd_messaging_send_blob(struct ctdbd_connection *conn, @@ -1055,6 +1055,7 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx, vnn_indexes = talloc_array(mem_ctx, unsigned, num_pids); if (vnn_indexes == NULL) { + DEBUG(1, ("talloc_array failed\n")); goto fail; } @@ -1079,6 +1080,7 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx, vnns = talloc_realloc(mem_ctx, vnns, struct ctdb_vnn_list, num_vnns+1); if (vnns == NULL) { + DEBUG(1, ("talloc_realloc failed\n")); goto fail; } vnns[num_vnns].vnn = vnn; @@ -1091,11 +1093,13 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx, vnn->srvids = talloc_array(vnns, uint64_t, vnn->num_srvids); if (vnn->srvids == NULL) { + DEBUG(1, ("talloc_array failed\n")); goto fail; } vnn->pid_indexes = talloc_array(vnns, unsigned, vnn->num_srvids); if (vnn->pid_indexes == NULL) { + DEBUG(1, ("talloc_array failed\n")); goto fail; } } @@ -1130,6 +1134,7 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn, if (!ctdb_collect_vnns(talloc_tos(), pids, num_pids, &vnns, &num_vnns)) { + DEBUG(1, ("ctdb_collect_vnns failed\n")); goto fail; } @@ -1166,16 +1171,16 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn, data)), data_blob_const(vnn->srvids, req.datalen)); if (!NT_STATUS_IS_OK(status)) { - DEBUG(10, ("ctdb_packet_send failed: %s\n", - nt_errstr(status))); + DEBUG(1, ("ctdb_packet_send failed: %s\n", + nt_errstr(status))); goto fail; } } status = ctdb_packet_flush(conn->pkt); if (!NT_STATUS_IS_OK(status)) { - DEBUG(10, ("ctdb_packet_flush failed: %s\n", - nt_errstr(status))); + DEBUG(1, ("ctdb_packet_flush failed: %s\n", + nt_errstr(status))); goto fail; } @@ -1185,16 +1190,18 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn, struct ctdb_reply_control *reply = NULL; struct ctdb_vnn_list *vnn; uint32_t
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 24f7085 s3:Really ignore unknown special ids in NFSv4 ACLs. via 9dd0510 docs-xml: document smbstatus --notify via 35a4a57 docs-xml: document smbstatus --fast via a01a93a s3:smbstatus add --fast option via 07412b5 s3:smbstatus don't check if process exists twice via 36432621 s3:smbstatus rename a function to make its purpose more clear via 31f0d30 s3:smbstatus fix a compiler warning from d0d05f8 s4-lib/tls: Try socket_send() multiple times to send partial packets http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 24f7085e4ff3523cad4594e554386f8a332523f3 Author: Alexander Werth Date: Wed Apr 25 15:10:54 2012 +0200 s3:Really ignore unknown special ids in NFSv4 ACLs. Signed-off-by: Christian Ambach Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Jul 18 17:45:05 CEST 2012 on sn-devel-104 commit 9dd0510c20d6844148eafd7d4494c80045d217c9 Author: Christian Ambach Date: Mon Jul 16 17:09:24 2012 +0200 docs-xml: document smbstatus --notify commit 35a4a57367a7e53517c569b70ae28d3e59f28ee1 Author: Christian Ambach Date: Mon Jul 16 17:06:11 2012 +0200 docs-xml: document smbstatus --fast commit a01a93a1f1dd88d733d30a78f502b72f2ac4ce5b Author: Christian Ambach Date: Fri Jul 13 17:24:02 2012 +0200 s3:smbstatus add --fast option this option skips all checks if the process for the record is still there using it gives a huge performance benefit on busy systems and clusters while it might display stale data if a smbd crashed commit 07412b56bd3b93cf0d242f5692ee31ee5f0901b5 Author: Christian Ambach Date: Fri Jul 13 17:10:05 2012 +0200 s3:smbstatus don't check if process exists twice is_valid_share_mode_entry() already calls serverid_exists which calls process_exists() commit 364326212646047af8870ac78bd734449cadee89 Author: Christian Ambach Date: Fri Jul 13 17:14:09 2012 +0200 s3:smbstatus rename a function to make its purpose more clear traverse_fn1 does not really intuitively make clear that it is used to traverse connections commit 31f0d304f178620f3928b7642b571ee27c37de85 Author: Christian Ambach Date: Fri Jul 13 17:32:19 2012 +0200 s3:smbstatus fix a compiler warning about comparison of signed with unsigned --- Summary of changes: docs-xml/manpages-3/smbstatus.1.xml | 18 ++ source3/modules/nfs4_acls.c |1 + source3/utils/status.c | 29 - 3 files changed, 35 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/smbstatus.1.xml b/docs-xml/manpages-3/smbstatus.1.xml index 150e3d0..e3bc251 100644 --- a/docs-xml/manpages-3/smbstatus.1.xml +++ b/docs-xml/manpages-3/smbstatus.1.xml @@ -27,6 +27,8 @@ -B -p -S + -N + -f -s <configuration file> -u <username> @@ -95,6 +97,22 @@ + + -N|--notify + causes smbstatus to display registered file + notifications + + + + + -f|--fast + causes smbstatus to not check if the status data + is valid by checking if the processes that the status data refer to all still + exist. This speeds up execution on busy systems and clusters but + might display stale data of processes that died without cleaning up properly. + + + &stdarg.help; diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index bd3c7fa..bcc7937 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -317,6 +317,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *theacl, /* in */ default: DEBUG(8, ("invalid special who id %d " "ignored\n", ace->who.special_id)); + continue; } } else { if (ace->aceFlags & SMB_ACE4_IDENTIFIER_GROUP) { diff --git a/source3/utils/status.c b/source3/utils/status.c index 3d16f8e..0cb46a5 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -56,6 +56,7 @@ static bool locks_only;/* Added by RJS */ static bool processes_only; static bool show_brl; static bool numeric_only; +static bool do_checks = true; const char *username = NULL; @@ -120,11 +121,7 @@ static
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 73ede32 s3:vfs_gpfs: fix ACL length calculation via 35ab9be s3:vfs_gpfs: Check softquota before gracetime from 149cae8 build: fix some indentation (tabs/vs spaces) in source3/wscript http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 73ede3241e3d8c26f50fbc7bd0762c742dfb3348 Author: Ralph Wuerthner Date: Tue Jul 3 11:39:24 2012 +0200 s3:vfs_gpfs: fix ACL length calculation GPFS 3.5 introduces ACL enhancements which are breaking our ACL length calculations. Signed-off-by: Ralph Wuerthner Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Jul 11 21:28:23 CEST 2012 on sn-devel-104 commit 35ab9bea0f15d66a6b0e827804e1fc66192d0068 Author: Christof Schmitt Date: Mon Jun 18 16:13:06 2012 -0700 s3:vfs_gpfs: Check softquota before gracetime gpfs_quotactl can return a non-zero softquota gracetime even when no softquota has been set. This could lead to "disk full" being reported to a client. The easiest fix is to check for a valid softquota before checking the softquota gracetime. --- Summary of changes: source3/modules/vfs_gpfs.c | 16 ++-- 1 files changed, 6 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a165cfa..4e4df22 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -417,8 +417,8 @@ static bool gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) struct gpfs_acl *gacl; TALLOC_CTX *mem_ctx = talloc_tos(); - gacl_len = sizeof(struct gpfs_acl) + - (smb_get_naces(smbacl)-1)*sizeof(gpfs_ace_v4_t); + gacl_len = offsetof(gpfs_acl_t, ace_v4) + smb_get_naces(smbacl) * + sizeof(gpfs_ace_v4_t); gacl = (struct gpfs_acl *)TALLOC_SIZE(mem_ctx, gacl_len); if (gacl == NULL) { @@ -706,16 +706,11 @@ static struct gpfs_acl *smb2gpfs_acl(const SMB_ACL_T pacl, gpfs_aclLen_t len; struct gpfs_acl *result; int i; - union gpfs_ace_union - { - gpfs_ace_v1_t ace_v1[1]; /* when GPFS_ACL_VERSION_POSIX */ - gpfs_ace_v4_t ace_v4[1]; /* when GPFS_ACL_VERSION_NFS4 */ - }; DEBUG(10, ("smb2gpfs_acl: Got ACL with %d entries\n", pacl->count)); - len = sizeof(struct gpfs_acl) - sizeof(union gpfs_ace_union) + - (pacl->count)*sizeof(gpfs_ace_v1_t); + len = offsetof(gpfs_acl_t, ace_v1) + (pacl->count) * + sizeof(gpfs_ace_v1_t); result = (struct gpfs_acl *)SMB_MALLOC(len); if (result == NULL) { @@ -1562,7 +1557,8 @@ static void vfs_gpfs_disk_free_quota(struct gpfs_quotaInfo qi, time_t cur_time, * When the grace time for the exceeded soft block quota has been * exceeded, the soft block quota becomes an additional hard limit. */ - if (qi.blockGraceTime && cur_time > qi.blockGraceTime) { + if (qi.blockSoftLimit && + qi.blockGraceTime && cur_time > qi.blockGraceTime) { /* report disk as full */ *dfree = 0; *dsize = MIN(*dsize, usage); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 088436d s3:winbindd:autorid check that transaction start did work via 09494ed s3:smbd fix some compiler warnings via e8c2f81 s3:vfs/gpfs: Have inherited deny ACE's show up in ACLs from d36aecc s4:libcli:raw: fix a comment typo in smb_setfileinfo() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 088436dff3fb12ec0b82f15fa971a48d798bd9b6 Author: Christian Ambach Date: Tue May 8 17:16:49 2012 +0200 s3:winbindd:autorid check that transaction start did work this fixes Coverity #700172 CHECKED_RETURN Autobuild-User: Christian Ambach Autobuild-Date: Wed May 9 00:27:08 CEST 2012 on sn-devel-104 commit 09494ed6133fd4d71161969249adf187732e2709 Author: Christian Ambach Date: Tue May 8 16:03:13 2012 +0200 s3:smbd fix some compiler warnings commit e8c2f81ef3e44fdd31047582f933276a48192e89 Author: Alexander Werth Date: Fri Jan 20 19:17:21 2012 +0100 s3:vfs/gpfs: Have inherited deny ACE's show up in ACLs Don't use the mode for the get_acl call that surpresses inherited deny ACE's. This is now possible since the inherited ACE flag exists now in GPFS and Samba. --- Summary of changes: source3/modules/vfs_gpfs.c |4 ++-- source3/smbd/notify_internal.c |4 ++-- source3/winbindd/idmap_autorid.c |6 +- 3 files changed, 9 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 80f6d6e..4b0f9eb 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -232,7 +232,7 @@ static struct gpfs_acl *gpfs_getacl_alloc(const char *fname, gpfs_aclType_t type acl->acl_version = 0; acl->acl_type = type; - ret = smbd_gpfs_getacl((char *)fname, GPFS_GETACL_STRUCT | GPFS_ACL_SAMBA, acl); + ret = smbd_gpfs_getacl((char *)fname, GPFS_GETACL_STRUCT, acl); if ((ret != 0) && (errno == ENOSPC)) { struct gpfs_acl *new_acl = (struct gpfs_acl *)TALLOC_SIZE( mem_ctx, acl->acl_len + sizeof(struct gpfs_acl)); @@ -247,7 +247,7 @@ static struct gpfs_acl *gpfs_getacl_alloc(const char *fname, gpfs_aclType_t type new_acl->acl_type = acl->acl_type; acl = new_acl; - ret = smbd_gpfs_getacl((char *)fname, GPFS_GETACL_STRUCT | GPFS_ACL_SAMBA, acl); + ret = smbd_gpfs_getacl((char *)fname, GPFS_GETACL_STRUCT, acl); } if (ret != 0) { diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index aa02e32..9af3b45 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -513,8 +513,8 @@ static void notify_trigger_index_parser(TDB_DATA key, TDB_DATA data, static int vnn_cmp(const void *p1, const void *p2) { - uint32_t *vnn1 = (uint32_t *)p1; - uint32_t *vnn2 = (uint32_t *)p2; + const uint32_t *vnn1 = (const uint32_t *)p1; + const uint32_t *vnn2 = (const uint32_t *)p2; if (*vnn1 < *vnn2) { return -1; diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 08dcc65..df63fa9 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -435,7 +435,11 @@ static NTSTATUS idmap_autorid_map_sid_to_id(struct idmap_domain *dom, sid_string_dbg(map->sid))); /* create new mapping */ - dbwrap_transaction_start(ctx->db); + res = dbwrap_transaction_start(ctx->db); + if (res != 0) { + DEBUG(2, ("transaction_start failed\n")); + return NT_STATUS_INTERNAL_DB_CORRUPTION; + } ret = idmap_tdb_common_new_mapping(dom, map); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2ae02ef s3:vfs/shadow_copy2 fix some compiler warnings via 617b636 s3:vfs/shadow_copy2 make descending sort order the default via a7df061 docs:autorid document ignore builtin parameter via 0bedec7 s3:winbindd/autorid add ignore builtin parameter via da97234 docs:autorid document read-only parameter via 2997f2f s3:winbindd/autorid add support for read-only mode via 6bda0f6 docs:autorid document how well-known SIDs will be mapped via 920e3e3 s3:winbindd/autorid preallocate well-known SIDs from e8e5afd krb5samba: Add smb_krb5_make_pac_checksum. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2ae02efabd5151c849ea079851607e7f45cf7a6f Author: Christian Ambach Date: Tue May 8 09:15:12 2012 +0200 s3:vfs/shadow_copy2 fix some compiler warnings about unused variables Autobuild-User: Christian Ambach Autobuild-Date: Tue May 8 11:15:07 CEST 2012 on sn-devel-104 commit 617b63658b02957422359a76fd8b8e4748d228ee Author: Christian Ambach Date: Tue May 8 09:11:36 2012 +0200 s3:vfs/shadow_copy2 make descending sort order the default otherwise Explorer won't work correctly when trying to restore a folder commit a7df061ddfc9cdb8ea41cf770ce9c28523246d45 Author: Christian Ambach Date: Mon May 7 19:17:18 2012 +0200 docs:autorid document ignore builtin parameter commit 0bedec7abea5f8dea5d6bd1fbb600f7beebabef9 Author: Christian Ambach Date: Mon May 7 19:14:56 2012 +0200 s3:winbindd/autorid add ignore builtin parameter BUILTIN should be handled by passdb, however if passdb does not know about a SID, autorid creates a range for BUILTIN and does deterministic mapping make it possible to turn off this behavior commit da9723478321565fc552cced964d3e72c69f634b Author: Christian Ambach Date: Mon May 7 19:02:23 2012 +0200 docs:autorid document read-only parameter commit 2997f2fe807cde8d22eaf4f253f9a64a8aca833a Author: Christian Ambach Date: Mon May 7 14:19:26 2012 +0200 s3:winbindd/autorid add support for read-only mode make it possible to set read-only = yes for the backend so users can replicate an autorid.tdb to another server to use the same mappings without risking that updates are done on both sides commit 6bda0f6f88d381c93d1a46b46ad7fce7bed2d2de Author: Christian Ambach Date: Mon May 7 19:08:10 2012 +0200 docs:autorid document how well-known SIDs will be mapped they consume space of the allocation pool and a list of most known well-known SIDs is preallocated to create a deterministic mapping commit 920e3e301d066d1307f2ca7f21248891e484842e Author: Christian Ambach Date: Fri May 4 17:56:26 2012 +0200 s3:winbindd/autorid preallocate well-known SIDs preallocate the list of well-known SIDs that Win2008R2 reports to be groups and that are on the list in KB243330 This will allow for deterministic mapping of these SIDs, even if they are stored in the allocation pool as this is the first thing that autorid will allocate from the pool during module initialization --- Summary of changes: docs-xml/manpages-3/idmap_autorid.8.xml | 18 +- source3/modules/vfs_shadow_copy2.c |9 +-- source3/winbindd/idmap_autorid.c| 99 +-- 3 files changed, 114 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/idmap_autorid.8.xml b/docs-xml/manpages-3/idmap_autorid.8.xml index e563cdd..498ef68 100644 --- a/docs-xml/manpages-3/idmap_autorid.8.xml +++ b/docs-xml/manpages-3/idmap_autorid.8.xml @@ -52,7 +52,11 @@ plan accordingly for your expected number of users in a domain with safety margins. - One range will be used for local users and groups. + One range will be used for local users and groups and for + non-domain well-known SIDs like Everyone (S-1-1-0) or Creator Owner (S-1-3-0). + A chosen list of well-known SIDs will be preallocated on first start + to create deterministic mappings for those. + Thus the number of local users and groups that can be created is limited by this option as well. If you plan to create a large amount of local users or groups, you will need set this parameter accordingly. @@ -60,6 +64,18 @@ The default value is 10. + + read only = [ yes | no ] + Turn the module into read-only mode. No new ranges wi
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 299c13b s3:passdb fix a compiler warning via a9c981e s3:vfs fix compiler warning via 1d069ed s3:lib fix compiler warnings from d3b4c2c UTIL_TDB: lowercase name. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 299c13b7f60f2e3faaf73d6b3370acf99021963d Author: Christian Ambach Date: Thu May 3 18:34:32 2012 +0200 s3:passdb fix a compiler warning this one could have caused crashes Autobuild-User: Christian Ambach Autobuild-Date: Thu May 3 23:22:05 CEST 2012 on sn-devel-104 commit a9c981ec0be93f0072250ba6b92a53dc5636f422 Author: Christian Ambach Date: Thu May 3 18:32:06 2012 +0200 s3:vfs fix compiler warning vfs_default.c:1875:10: warning: no previous prototype for 'vfswrap_audit_file' commit 1d069ed80696452b1a78298d8aff22e6c22e2c3c Author: Christian Ambach Date: Thu May 3 18:30:38 2012 +0200 s3:lib fix compiler warnings g_lock.c:182:20: warning: no previous prototype for ‘g_lock_lock_send’ g_lock.c:270:10: warning: no previous prototype for ‘g_lock_lock_recv’ --- Summary of changes: source3/include/g_lock.h |6 ++ source3/include/vfs.h|5 + source3/passdb/pdb_ads.c |2 +- 3 files changed, 12 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/g_lock.h b/source3/include/g_lock.h index 1ac8418..004c452 100644 --- a/source3/include/g_lock.h +++ b/source3/include/g_lock.h @@ -32,6 +32,12 @@ enum g_lock_type { struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx, struct messaging_context *msg); +struct tevent_req *g_lock_lock_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct g_lock_ctx *ctx, + const char *name, + enum g_lock_type type); +NTSTATUS g_lock_lock_recv(struct tevent_req *req); NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, enum g_lock_type lock_type, struct timeval timeout); NTSTATUS g_lock_unlock(struct g_lock_ctx *ctx, const char *name); diff --git a/source3/include/vfs.h b/source3/include/vfs.h index b5f234a..92f6ecd 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -749,6 +749,11 @@ NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 security_info_sent, const struct security_descriptor *psd); +NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle, +struct smb_filename *file, +struct security_acl *sacl, +uint32_t access_requested, +uint32_t access_denied); int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle, const char *name, mode_t mode); int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle, diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index f88ad75..df9b7b3 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -2258,7 +2258,7 @@ static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid, } else { gid_t gid; id->type = ID_TYPE_GID; - if (!tldap_pull_uint32(msg[0], "gidNumber", gid)) { + if (!tldap_pull_uint32(msg[0], "gidNumber", &gid)) { DEBUG(10, ("Did not find gidNumber\n")); goto fail; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d7f3c00 s3:torture fix flakey testcase from b985c67 s3:selftest run LOCAL-IDMAP-TDB-COMMON in make test http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d7f3c00b853761d929c3a21a6d64feff334944ce Author: Christian Ambach Date: Tue May 1 21:21:40 2012 +0200 s3:torture fix flakey testcase don't put database into /tmp, use lp_private_dir() to put it into the selftest prefix Autobuild-User: Christian Ambach Autobuild-Date: Wed May 2 00:57:05 CEST 2012 on sn-devel-104 --- Summary of changes: source3/torture/test_idmap_tdb_common.c | 26 -- 1 files changed, 20 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/torture/test_idmap_tdb_common.c b/source3/torture/test_idmap_tdb_common.c index e24fc21..7e7c5dd 100644 --- a/source3/torture/test_idmap_tdb_common.c +++ b/source3/torture/test_idmap_tdb_common.c @@ -36,8 +36,6 @@ #define LOW_ID 100 #define HIGH_ID 199 -#define TESTDB "/tmp/idmap_test.tdb" - #define DOM_SID1 "S-1-5-21-1234-5678-9012" #define DOM_SID2 "S-1-5-21-0123-5678-9012" #define DOM_SID3 "S-1-5-21-0012-5678-9012" @@ -77,18 +75,29 @@ NTSTATUS idmap_backends_unixid_to_sid(const char *domname, struct id_map *id) static bool open_db(struct idmap_tdb_common_context *ctx) { NTSTATUS status; + char *db_path; if(ctx->db) { /* already open */ return true; } - unlink(TESTDB); + db_path = talloc_asprintf(talloc_tos(), "%s/idmap_test.tdb", + lp_private_dir()); + if(!db_path) { + DEBUG(0, ("Out of memory!\n")); + return false; + } - ctx->db = db_open(ctx, TESTDB, 0, TDB_DEFAULT, - O_RDWR | O_CREAT | O_EXCL, 0600, + ctx->db = db_open(ctx, db_path, 0, TDB_DEFAULT | TDB_CLEAR_IF_FIRST, + O_RDWR | O_CREAT, 0600, DBWRAP_LOCK_ORDER_1); + if(!ctx->db) { + DEBUG(0, ("Failed to open database: %s\n", strerror(errno))); + return false; + } + if(dbwrap_transaction_start(ctx->db) != 0) { DEBUG(0, ("Failed to start transaction!\n")); return false; @@ -128,7 +137,9 @@ static struct idmap_tdb_common_context *createcontext(TALLOC_CTX *memctx) ret->rw_ops->get_new_id = idmap_tdb_common_get_new_id; ret->rw_ops->set_mapping = idmap_tdb_common_set_mapping; - open_db(ret); + if (!open_db(ret)) { + return NULL; + }; return ret; } @@ -974,6 +985,9 @@ bool run_idmap_tdb_common_test(int dummy) TALLOC_CTX *stack = talloc_stackframe(); ctx = createcontext(memctx); + if(!ctx) { + return false; + } dom = createdomain(memctx); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b985c67 s3:selftest run LOCAL-IDMAP-TDB-COMMON in make test via 55870b0 s3:torture: add idmap_tdb_common test code via 0e06d94 s3:winbindd/idmap_tdb: use idmap_tdb_common code via 15b12cb s3:winbindd/idmap_tdb2: fix logic error in set_mapping_action via 627f46c s3:winbindd/idmap_tdb2: use idmap_tdb_common code via e7576e8 s3:winbindd/autorid use idmap_tdb_common code in autorid via c673237 s3:winbindd add idmap_tdb_common file to store common code of TDB idmap backends via 7a07ce2 s3:util add sid_check_is_wellknown_builtin() from 9705a70 move VERSION to alpha21 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b985c672bf7b6f2b9e2b8b4757dad0cf4b3cd45c Author: Christian Ambach Date: Mon Apr 30 17:02:46 2012 +0200 s3:selftest run LOCAL-IDMAP-TDB-COMMON in make test Autobuild-User: Christian Ambach Autobuild-Date: Tue May 1 11:07:08 CEST 2012 on sn-devel-104 commit 55870b0bf9496a56dcbd3b439959b7347e61a088 Author: Christian Ambach Date: Wed Feb 22 15:44:27 2012 +0100 s3:torture: add idmap_tdb_common test code commit 0e06d944bc87c212713eee3c2d651321deb1c18c Author: Christian Ambach Date: Mon Feb 20 12:13:56 2012 +0100 s3:winbindd/idmap_tdb: use idmap_tdb_common code commit 15b12cbc8ab31f4f8a547f27985f24d72c1f0055 Author: Christian Ambach Date: Sun Feb 26 17:49:23 2012 +0100 s3:winbindd/idmap_tdb2: fix logic error in set_mapping_action fix an endless loop commit 627f46cf1f48d7f742f0cf3405dc7c4cab5349d6 Author: Christian Ambach Date: Fri Feb 17 17:34:03 2012 +0100 s3:winbindd/idmap_tdb2: use idmap_tdb_common code commit e7576e85c9ecb79c40d927733253a844c219064d Author: Christian Ambach Date: Wed Jan 25 19:06:16 2012 +0100 s3:winbindd/autorid use idmap_tdb_common code in autorid - use common logic for the allocation pool - add a idmap_tdb style 1on1 mapping for non-domain SIDs like Everyone (S-1-1-0) commit c673237785ad76c1638e8612218036f1080f4f3f Author: Christian Ambach Date: Mon Jan 16 17:21:38 2012 +0100 s3:winbindd add idmap_tdb_common file to store common code of TDB idmap backends commit 7a07ce268038c51c0c8a219e21d657bae68d40cd Author: Christian Ambach Date: Tue Jan 17 13:59:56 2012 +0100 s3:util add sid_check_is_wellknown_builtin() --- Summary of changes: source3/Makefile.in | 10 +- source3/include/proto.h |1 + source3/lib/util_builtin.c | 27 + source3/selftest/tests.py |1 + source3/torture/proto.h |1 + source3/torture/test_idmap_tdb_common.c | 1028 +++ source3/torture/torture.c |1 + source3/winbindd/idmap_autorid.c| 313 +++--- source3/winbindd/idmap_tdb.c| 576 +- source3/winbindd/idmap_tdb2.c | 450 +++--- source3/winbindd/idmap_tdb_common.c | 654 source3/winbindd/idmap_tdb_common.h | 137 source3/winbindd/wscript_build |2 +- source3/wscript_build |2 + 14 files changed, 2198 insertions(+), 1005 deletions(-) create mode 100644 source3/torture/test_idmap_tdb_common.c create mode 100644 source3/winbindd/idmap_tdb_common.c create mode 100644 source3/winbindd/idmap_tdb_common.h Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index 37419de..8b02d64 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1281,6 +1281,7 @@ SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/uta torture/test_msg.o \ torture/test_notify.o \ torture/test_dbwrap_watch.o \ + torture/test_idmap_tdb_common.o \ torture/t_strappend.o SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \ @@ -1374,7 +1375,12 @@ PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_ IDMAP_RW_OBJ = winbindd/idmap_rw.o -IDMAP_OBJ = winbindd/idmap.o winbindd/idmap_util.o $(IDMAP_RW_OBJ) @IDMAP_STATIC@ +IDMAP_TDB_COMMON_OBJ = winbindd/idmap_tdb_common.o + +IDMAP_UTIL_OBJ = winbindd/idmap_util.o $(IDMAP_RW_OBJ) \ +$(IDMAP_TDB_COMMON_OBJ) + +IDMAP_OBJ = winbindd/idmap.o $(IDMAP_UTIL_OBJ) @IDMAP_STATIC@ NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@ @@ -1965,7 +1971,7 @@ bin/nmblookup: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LI bin/smbtorture: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @echo Linking $@ - @$(CC) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \ + @$(CC) -o
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 92c5e80 docs:man:vfs_gpfs: Remove itemized list to fix indentation via d642afa s3: switch off kernel oplocks by default from a8e9242 s3: Fix smbclient notify against Windows http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 92c5e80f46083885048c45d1203e656720b24cb3 Author: Christof Schmitt Date: Wed Mar 28 12:57:11 2012 -0700 docs:man:vfs_gpfs: Remove itemized list to fix indentation The indentation in the man page is wrong after the itemized list. An easy fix is to put the text in the paragraph instead. Autobuild-User: Christian Ambach Autobuild-Date: Mon Apr 16 23:00:37 CEST 2012 on sn-devel-104 commit d642afa7f16ba481ae89278ca00c01357c0b8c45 Author: Christian Ambach Date: Mon Apr 16 17:37:17 2012 +0200 s3: switch off kernel oplocks by default as discussed on samba-technical, turn kernel oplocks off by default to not leave users without the benefits of Level II oplocks --- Summary of changes: docs-xml/manpages-3/vfs_gpfs.8.xml| 15 --- docs-xml/smbdotconf/locking/kerneloplocks.xml |7 +++ source3/param/loadparm.c |2 +- 3 files changed, 8 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml b/docs-xml/manpages-3/vfs_gpfs.8.xml index 4ea8c4d..3635143 100644 --- a/docs-xml/manpages-3/vfs_gpfs.8.xml +++ b/docs-xml/manpages-3/vfs_gpfs.8.xml @@ -227,19 +227,12 @@ Adjust reporting of the size and free space of a share according to quotas. If this setting is "yes", a request for size and free space will also evaluate the - following quotas: + user quota of the user requesting the data, the group + quota of the primary group of the user and the fileset + quota for the fileset containing the top level + directory of the share. - - The user quota of the user requesting - the data. - The group quota of the primary group - of the user. - The fileset quota for the fileset - containing the top level directory of the share. - - - If any of the soft or hard quota limits has been reached, the free space will be reported as 0. If a diff --git a/docs-xml/smbdotconf/locking/kerneloplocks.xml b/docs-xml/smbdotconf/locking/kerneloplocks.xml index 9ac7256..8e3bba5 100644 --- a/docs-xml/smbdotconf/locking/kerneloplocks.xml +++ b/docs-xml/smbdotconf/locking/kerneloplocks.xml @@ -19,12 +19,11 @@ parameter on Linux and IRIX to get Level II oplocks and the associated performance benefit. - This parameter defaults to on, but is translated - to a no-op on systems that no not have the necessary kernel support. - You should never need to touch this parameter. + This parameter defaults to no and is translated + to a no-op on systems that do not have the necessary kernel support. oplocks level2 oplocks -yes +no diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 2fa70db..dbf47c0 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -230,7 +230,7 @@ static struct loadparm_service sDefault = .bPosixLocking = true, .bShareModes = true, .bOpLocks = true, - .bKernelOplocks = true, + .bKernelOplocks = false, .bLevel2OpLocks = true, .bOnlyUser = false, .bMangledNames = true, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8718c7b s3:vfs_gpfs: fix some compiler warnings via 0a37ca5 s3:vfs_gpfs: remove fallback to linux_setlease via a551ee5 s3:vfs_gpfs: correct use of profiling macros via 0a89609 s3:vfs_gpfs: Implement fallocate callback for GPFS via 6261678 s3:vfs_gpfs: Report disk space and usage on GPFS share according to quotas via a9cfd80 s3:vfs_gpfs: add GPFS api calls for quota and free space reporting via 4262eb4 s3:vfs_gpfs: Export disk_norm function via 80cb6e8 s3:client correct a wording from ffe884c s3: Fix smbd -i http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8718c7b88de993cef66c2a26ff1addd52b30b05c Author: Christian Ambach Date: Thu Mar 22 18:12:07 2012 +0100 s3:vfs_gpfs: fix some compiler warnings Autobuild-User: Christian Ambach Autobuild-Date: Thu Mar 22 20:14:34 CET 2012 on sn-devel-104 commit 0a37ca5210c8591fc12a6560d3c5fc3ccdeceede Author: Christian Ambach Date: Thu Mar 22 18:11:47 2012 +0100 s3:vfs_gpfs: remove fallback to linux_setlease if setting the lease in GPFS failed, there is not much sense in trying to set a lease just locally that would not inform us of openers on other cluster nodes commit a551ee5f64d26e8eb02ecaf90b828433bab8 Author: Christian Ambach Date: Thu Mar 22 18:00:17 2012 +0100 s3:vfs_gpfs: correct use of profiling macros under certain conditions START_PROFILE could have been called, but no END_PROFILE commit 0a896094c61fa1eec7dbb5bb35485747cdc1549d Author: Christof Schmitt Date: Thu Mar 8 13:57:12 2012 -0800 s3:vfs_gpfs: Implement fallocate callback for GPFS GPFS provides the gpfs_prealloc call. Implement the fallocate callback with mode VFS_FALLOCATE_EXTEND_SIZE using this call. There is no support for VFS_FALLOCATE_KEEP_SIZE, so report this mode as not available. commit 62616784ae5460bfd8f68ccfe596f80f55727b87 Author: Christof Schmitt Date: Fri Mar 2 14:26:24 2012 -0700 s3:vfs_gpfs: Report disk space and usage on GPFS share according to quotas When a client requests the information about free space and space used, adjust the reported values according to quotas in the GPFS file system: - Retrieve quotas for the current user, current group and fileset for the top level of the share. - If the soft block quota grace time has expired, report disk as full. - If a hard block quota has been exceeded, report disk as full. - If none of the hard block quotas been exceeded, report share size and free space according to the lowest limits found in the quotas. - If no applicable hard block quota has been set, report the information from the statfs call. This feature is disabled by default and has to be enabled by setting the option gpfs:dfreequota. commit a9cfd80d8722f9af7fc18ea70115a6b1b1033168 Author: Christof Schmitt Date: Fri Mar 2 14:26:19 2012 -0700 s3:vfs_gpfs: add GPFS api calls for quota and free space reporting Add the GPFS api calls for reporting the quotas and free space: - get_gpfs_quota for querying a quota - get_gpfs_fset_id for mapping a path to a fileset id commit 4262eb401fac0a6f9f0f76bff390041ad6600536 Author: Christof Schmitt Date: Fri Mar 2 14:26:10 2012 -0700 s3:vfs_gpfs: Export disk_norm function vfs modules implementing the disk_free callback need access to the function disk_norm for normalizing the data if the parameter small query is true. commit 80cb6e84de0fa5c713bf1ba4c5866cdb1aea15f5 Author: Christian Ambach Date: Thu Mar 22 16:49:30 2012 +0100 s3:client correct a wording --- Summary of changes: docs-xml/manpages-3/vfs_gpfs.8.xml | 72 ++ source3/client/client.c|2 +- source3/modules/gpfs.c | 88 + source3/modules/vfs_gpfs.c | 189 +--- source3/modules/vfs_gpfs.h |7 +- source3/smbd/dfree.c |2 +- source3/smbd/proto.h |1 + 7 files changed, 346 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml b/docs-xml/manpages-3/vfs_gpfs.8.xml index 2107b74..4ea8c4d 100644 --- a/docs-xml/manpages-3/vfs_gpfs.8.xml +++ b/docs-xml/manpages-3/vfs_gpfs.8.xml @@ -221,6 +221,78 @@ + gpfs:dfreequota = [ yes | no ] + + + Adjust reporting of the size and free space of a share + according to quotas. If this setting is "yes", a + request for size and free space will also evaluate the + follow
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a5ddc2d s3:smb2_server: fix a compiler warning from a3e2151 s3:smbd: also create ncalrpc/np directory before forking rpc daemons http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a5ddc2da1032561d57bc8adbb3bb60e133154b65 Author: Christian Ambach Date: Tue Mar 13 13:08:50 2012 +0100 s3:smb2_server: fix a compiler warning Autobuild-User: Christian Ambach Autobuild-Date: Wed Mar 14 16:06:48 CET 2012 on sn-devel-104 --- Summary of changes: source3/smbd/smb2_server.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 6170818..3cee931 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -1308,8 +1308,8 @@ NTSTATUS smbd_smb2_request_verify_creditcharge(struct smbd_smb2_request *req, needed_charge = (data_length - 1)/ 65536 + 1; DEBUG(10, ("mid %llu, CreditCharge: %d, NeededCharge: %d\n", - BVAL(inhdr, SMB2_HDR_MESSAGE_ID), credit_charge, - needed_charge)); + (unsigned long long) BVAL(inhdr, SMB2_HDR_MESSAGE_ID), + credit_charge, needed_charge)); if (needed_charge > credit_charge) { DEBUG(2, ("CreditCharge too low, given %d, needed %d\n", -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dc24e22 smb2_constants: fix a typo via a1ac670 s3:smb2_server: use SMB2_WATCH_TREE via 583a538 smb2_constants: add SMB2_WATCH_TREE via 8b25bc8 s3:smb2_server fix a typo from 197c185 s3: Fix some blank line endings http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dc24e229a55d07dfc199e302d9cea5377b627e8c Author: Christian Ambach Date: Fri Mar 2 21:35:22 2012 -0800 smb2_constants: fix a typo Autobuild-User: Christian Ambach Autobuild-Date: Sat Mar 3 09:04:40 CET 2012 on sn-devel-104 commit a1ac670a8c69fff47bf120acdee4820081b54bc3 Author: Christian Ambach Date: Fri Mar 2 21:34:32 2012 -0800 s3:smb2_server: use SMB2_WATCH_TREE it makes the code easier to understand if it uses the names specified in MS-SMB2 instead of just the underlying values commit 583a53835b1709327c96f47466ca3db39a0b3d50 Author: Christian Ambach Date: Fri Mar 2 21:33:28 2012 -0800 smb2_constants: add SMB2_WATCH_TREE commit 8b25bc80c95ff79ac87b3db034203369dea959a5 Author: Christian Ambach Date: Mon Feb 27 17:52:21 2012 -0800 s3:smb2_server fix a typo --- Summary of changes: libcli/smb/smb2_constants.h |5 - source3/smbd/smb2_notify.c |2 +- source3/smbd/smb2_server.c |2 +- 3 files changed, 6 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/smb/smb2_constants.h b/libcli/smb/smb2_constants.h index 6699dd7..b8180ce 100644 --- a/libcli/smb/smb2_constants.h +++ b/libcli/smb/smb2_constants.h @@ -113,7 +113,7 @@ #define SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM 0x0800 #define SMB2_SHAREFLAG_ALL 0x0F33 -/* SMB2 share capafilities */ +/* SMB2 share capabilities */ #define SMB2_SHARE_CAP_DFS 0x8 /* SMB2 create security flags */ @@ -161,6 +161,9 @@ #define SMB2_CREATE_TAG_QFID "QFid" #define SMB2_CREATE_TAG_RQLS "RqLs" +/* SMB2 notify flags */ +#define SMB2_WATCH_TREE 0x0001 + /* SMB2 Create ignore some more create_options */ #define SMB2_CREATE_OPTIONS_NOT_SUPPORTED_MASK (NTCREATEX_OPTIONS_TREE_CONNECTION | \ NTCREATEX_OPTIONS_OPFILTER) diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c index 49051bf..be56b18 100644 --- a/source3/smbd/smb2_notify.c +++ b/source3/smbd/smb2_notify.c @@ -192,7 +192,7 @@ static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx, struct smb_request *smbreq; connection_struct *conn = smb2req->tcon->compat_conn; files_struct *fsp; - bool recursive = (in_flags & 0x0001) ? true : false; + bool recursive = (in_flags & SMB2_WATCH_TREE) ? true : false; NTSTATUS status; req = tevent_req_create(mem_ctx, &state, diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 7233e09..8533157 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -1288,7 +1288,7 @@ NTSTATUS smbd_smb2_request_verify_sizes(struct smbd_smb2_request *req, /* * Now check the expected body size, * where the last byte might be in the -* dynnamic section.. +* dynamic section.. */ if (req->in.vector[i+1].iov_len != (expected_body_size & 0xFFFE)) { return NT_STATUS_INVALID_PARAMETER; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ad2a2c4 s4:torture: add another SMB2 rename test from e34e95f libndr: Add ndr_map_error2errno http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ad2a2c4e3a7ee402755c2b83d2af6dccd256fa93 Author: Christian Ambach Date: Mon Feb 13 16:47:41 2012 +0100 s4:torture: add another SMB2 rename test this mimics Word 2010 saving a file Autobuild-User: Christian Ambach Autobuild-Date: Mon Feb 13 18:33:43 CET 2012 on sn-devel-104 --- Summary of changes: selftest/knownfail|1 + source4/torture/smb2/rename.c | 130 + 2 files changed, 131 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/knownfail b/selftest/knownfail index b838ee7..40c3995 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -68,6 +68,7 @@ ^samba4.smb2.rename.no_share_delete_but_delete_access$ ^samba4.smb2.rename.share_delete_no_delete_access$ ^samba4.smb2.rename.no_share_delete_no_delete_access$ +^samba4.smb2.rename.msword ^samba4.smb2.persistent.handles1 ^samba4.winbind.struct.*.show_sequence # Not yet working in winbind ^samba4.*base.delaywrite.*update of write time and SMBwrite truncate$ diff --git a/source4/torture/smb2/rename.c b/source4/torture/smb2/rename.c index aced971..a452acd 100644 --- a/source4/torture/smb2/rename.c +++ b/source4/torture/smb2/rename.c @@ -803,6 +803,132 @@ done: } /* + * this is a replay of how Word 2010 saves a file + * this should pass + */ + +static bool torture_smb2_rename_msword(struct torture_context *torture, + struct smb2_tree *tree1) +{ + bool ret = true; + NTSTATUS status; + union smb_open io; + union smb_close cl; + union smb_setfileinfo sinfo; + union smb_fileinfo fi; + struct smb2_handle fh, dh; + + smb2_deltree(tree1, BASEDIR); + smb2_util_rmdir(tree1, BASEDIR); + + torture_comment(torture, "Creating base directory\n"); + + smb2_util_mkdir(tree1, BASEDIR); + + torture_comment(torture, "Creating test file\n"); + + ZERO_STRUCT(io.smb2); + io.generic.level = RAW_OPEN_SMB2; + io.smb2.in.create_flags = 0; + io.smb2.in.desired_access = 0x0017019f; + io.smb2.in.create_options = 0x60; + io.smb2.in.file_attributes = 0; + io.smb2.in.share_access = 0; + io.smb2.in.alloc_size = 0; + io.smb2.in.create_disposition = NTCREATEX_DISP_CREATE; + io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS; + io.smb2.in.security_flags = 0; + io.smb2.in.fname = BASEDIR "\\file.txt"; + + status = smb2_create(tree1, torture, &(io.smb2)); + CHECK_STATUS(status, NT_STATUS_OK); + fh = io.smb2.out.file.handle; + + torture_comment(torture, "Opening parent directory\n"); + + ZERO_STRUCT(io.smb2); + io.generic.level = RAW_OPEN_SMB2; + io.smb2.in.create_flags = 0; + io.smb2.in.desired_access = 0x00100080; + io.smb2.in.create_options = 0x00800021; + io.smb2.in.file_attributes = 0; + io.smb2.in.share_access = 0; + io.smb2.in.alloc_size = 0; + io.smb2.in.create_disposition = NTCREATEX_DISP_OPEN; + io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS; + io.smb2.in.security_flags = 0; + io.smb2.in.fname = BASEDIR; + + status = smb2_create(tree1, torture, &(io.smb2)); + CHECK_STATUS(status, NT_STATUS_OK); + dh = io.smb2.out.file.handle; + + torture_comment(torture, "Renaming test file\n"); + + ZERO_STRUCT(sinfo); + sinfo.rename_information.level = RAW_SFILEINFO_RENAME_INFORMATION; + sinfo.rename_information.in.file.handle = fh; + sinfo.rename_information.in.overwrite = 0; + sinfo.rename_information.in.root_fid = 0; + sinfo.rename_information.in.new_name = + BASEDIR "\\newname.txt"; + status = smb2_setinfo_file(tree1, &sinfo); + CHECK_STATUS(status, NT_STATUS_OK); + + torture_comment(torture, "Checking for new filename\n"); + + ZERO_STRUCT(fi); + fi.generic.level = RAW_FILEINFO_SMB2_ALL_INFORMATION; + fi.generic.in.file.handle = fh; + status = smb2_getinfo_file(tree1, torture, &fi); + CHECK_STATUS(status, NT_STATUS_OK); + + + torture_comment(torture, "Closing test file\n"); + + ZERO_STRUCT(cl.smb2); + cl.smb2.level = RAW_CLOSE_SMB2; + cl.smb2.in.file.handle = fh; + status = smb2_close(tree1, &(cl.smb2)); + CHECK_STATUS(status, NT_STATUS_OK); + + ZERO_STRUCT(fh); + + torture_comment(torture, "Closing directory\n"); + + ZERO_STRUCT(cl.smb2); + cl.
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e87d98c s3:vfs_gpfs:quieten an expectable warning message via 4a11be3 s3:vfs_gpfs: fix a compiler warning via 8ce9982 s3:vfs_gpfs:Fix query of creation time from GPFS via 318346a s3:vfs_gpfs: make "gpfs:getrealfilename" a per share option via 8ad2b6a s3:vfs_gpfs: make "gpfs:ftruncate" a per share option via 89a4f66 s3:vfs_gpfs: make "gpfs:winattr" a per share option via 2e95d80 s3:vfs_gpfs: be less verbose in get/set_xattr functions from f1db715 s3-smb2: Use the correct indicator if a request was deferred http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e87d98c0fcf439a65031b072bebe0fed296cf59e Author: Christian Ambach Date: Fri Feb 10 18:15:56 2012 +0100 s3:vfs_gpfs:quieten an expectable warning message Autobuild-User: Christian Ambach Autobuild-Date: Fri Feb 10 20:14:12 CET 2012 on sn-devel-104 commit 4a11be3fb4d2cdcae323fc7932371eecca56b3cd Author: Christian Ambach Date: Fri Feb 10 18:11:30 2012 +0100 s3:vfs_gpfs: fix a compiler warning commit 8ce9982be9dac71bbfc109e7f0c43aec94850c89 Author: Christof Schmitt Date: Tue Nov 29 13:23:29 2011 -0700 s3:vfs_gpfs:Fix query of creation time from GPFS Setting the creation time through SetFileTime on a GPFS file system and querying it with GetFileTime shows a mismatch. The vfs_gpfs module first retrieves the information from the operating system and the flag st_ex_calculated_birthtime is set to false. When vfs_gpfs retrieves the birthtime from GPFS the flag st_ex_calculated_birthtime has to be set to true. Otherwise the birth time will get overwritten by a call to update_stat_ex_mtime, reporting the wrong time to a client system. Signed-off-by: Christian Ambach commit 318346a9373df9b16c436b8539362ff8d341960e Author: Stefan Metzmacher Date: Thu Dec 22 15:54:41 2011 +0100 s3:vfs_gpfs: make "gpfs:getrealfilename" a per share option metze Signed-off-by: Christian Ambach commit 8ad2b6a55e23922570659a4e4fb88e1b7d710772 Author: Stefan Metzmacher Date: Thu Dec 22 15:54:41 2011 +0100 s3:vfs_gpfs: make "gpfs:ftruncate" a per share option metze Signed-off-by: Christian Ambach commit 89a4f66826a2e614bd782dcaff72ea3650229142 Author: Stefan Metzmacher Date: Thu Dec 22 14:36:55 2011 +0100 s3:vfs_gpfs: make "gpfs:winattr" a per share option metze Signed-off-by: Christian Ambach commit 2e95d8048b9e9c7025ddada7ede15494e6016ba9 Author: Stefan Metzmacher Date: Thu Dec 22 14:20:32 2011 +0100 s3:vfs_gpfs: be less verbose in get/set_xattr functions metze Signed-off-by: Christian Ambach --- Summary of changes: source3/modules/gpfs.c | 20 ++-- source3/modules/vfs_gpfs.c | 113 ++-- 2 files changed, 114 insertions(+), 19 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index d73b94b..5ce2381 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -25,10 +25,6 @@ #include "gpfs_gpl.h" #include "vfs_gpfs.h" -static bool gpfs_getrealfilename; -static bool gpfs_winattr; -static bool gpfs_do_ftruncate; - static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny); static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType); static int (*gpfs_getacl_fn)(char *pathname, int flags, void *acl); @@ -136,7 +132,7 @@ int smbd_gpfs_putacl(char *pathname, int flags, void *acl) int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) { - if (!gpfs_do_ftruncate || (gpfs_ftruncate_fn == NULL)) { + if (gpfs_ftruncate_fn == NULL) { errno = ENOSYS; return -1; } @@ -147,8 +143,7 @@ int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) int smbd_gpfs_get_realfilename_path(char *pathname, char *filenamep, int *buflen) { - if ((!gpfs_getrealfilename) - || (gpfs_get_realfilename_path_fn == NULL)) { + if (gpfs_get_realfilename_path_fn == NULL) { errno = ENOSYS; return -1; } @@ -159,7 +154,7 @@ int smbd_gpfs_get_realfilename_path(char *pathname, char *filenamep, int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs) { -if ((!gpfs_winattr) || (gpfs_get_winattrs_path_fn == NULL)) { + if (gpfs_get_winattrs_path_fn == NULL) { errno = ENOSYS; return -1; } @@ -170,7 +165,7 @@ int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs) int smbd_fget_gpfs_winattrs(int fd, struct gpfs_winattr *attrs)
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via be3e479 selftest: add smb2.rename to testsuite via bff119a s4:torture: add some SMB2 renaming tests from d2ccaaa gensec: explain gensec_use_kerberos_mechs() logic http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit be3e479feb3bb8305c8d5bd6e20118191db01226 Author: Christian Ambach Date: Wed Feb 8 16:05:34 2012 +0100 selftest: add smb2.rename to testsuite Autobuild-User: Christian Ambach Autobuild-Date: Fri Feb 10 15:02:51 CET 2012 on sn-devel-104 commit bff119a3b7d5208d375a6699c6f458b3954eb84d Author: Christian Ambach Date: Tue Feb 7 18:02:56 2012 +0100 s4:torture: add some SMB2 renaming tests --- Summary of changes: selftest/knownfail | 10 + source3/selftest/tests.py |2 +- source4/torture/smb2/rename.c | 841 source4/torture/smb2/smb2.c|1 + source4/torture/smb2/wscript_build |2 +- 5 files changed, 854 insertions(+), 2 deletions(-) create mode 100644 source4/torture/smb2/rename.c Changeset truncated at 500 lines: diff --git a/selftest/knownfail b/selftest/knownfail index 4a9f99e..b838ee7 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -11,6 +11,9 @@ ^samba3.*rap.sam.*.useradd # Not provided by Samba 3 ^samba3.*rap.sam.*.userdelete # Not provided by Samba 3 ^samba3.posix_s3.libsmbclient .opendir # This requires a workgroup called 'WORKGROUP' and for netbios browse lists to have been registered +# see bug 8412 +^samba3.posix_s3.smb2.rename.*.simple_nodelete +^samba3.posix_s3.smb2.rename.*.no_share_delete_no_delete_access #These rpcclient combinations (pipe-level authentication but without sign or seal) need fixing in s3 ^samba3.blackbox.rpcclient over ncacn_np with \[spnego\] ^samba3.blackbox.rpcclient over ncacn_np with \[spnego,bigendian\] @@ -58,6 +61,13 @@ ^samba4.rap.*netsessionenum ^samba4.rap.*netsessiongetinfo ^samba4.rap.*netremotetod +# SMB2 in s4 does not seem to support rename correctly +^samba4.smb2.rename.simple$ +^samba4.smb2.rename.no_sharing$ +^samba4.smb2.rename.share_delete_and_delete_access$ +^samba4.smb2.rename.no_share_delete_but_delete_access$ +^samba4.smb2.rename.share_delete_no_delete_access$ +^samba4.smb2.rename.no_share_delete_no_delete_access$ ^samba4.smb2.persistent.handles1 ^samba4.winbind.struct.*.show_sequence # Not yet working in winbind ^samba4.*base.delaywrite.*update of write time and SMBwrite truncate$ diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index ce6d964..6376eae 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -224,7 +224,7 @@ raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", " "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff"] smb2 = ["smb2.lock", "smb2.read", "smb2.compound", "smb2.connect", "smb2.scan", "smb2.scanfind", -"smb2.bench-oplock"] +"smb2.bench-oplock", "smb2.rename"] rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec", "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg", diff --git a/source4/torture/smb2/rename.c b/source4/torture/smb2/rename.c new file mode 100644 index 000..aced971 --- /dev/null +++ b/source4/torture/smb2/rename.c @@ -0,0 +1,841 @@ +/* + Unix SMB/CIFS implementation. + + SMB2 rename test suite + + Copyright (C) Christian Ambach 2012 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "includes.h" +#include "libcli/smb2/smb2.h" +#include "libcli/smb2/smb2_calls.h" + +#include "torture/torture.h" +#include "torture/smb2/proto.h" + +#include "librpc/gen_ndr/security.h" + +#define CHECK_STATUS(status, correct) do { \ + if (!NT_STATUS_EQUAL(status, correct)) { \ + torture_result(torture, TORTURE_FAIL, \ + &qu
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 75b8a24 s3:idmap_autorid: use less transactions via 411d498 s3:dbwrap fix return value of db_tdb_parse from 16bd41b s3:printing/spoolssd: avoid using server_messaging_context() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 75b8a24a4274f93c4d67fa7e8c602bb65ef6544b Author: Christian Ambach Date: Fri Dec 16 18:41:54 2011 +0100 s3:idmap_autorid: use less transactions reduce the amount of transactions that are mostly unnecessary because no updates were done, only reads Autobuild-User: Christian Ambach Autobuild-Date: Fri Dec 16 20:18:37 CET 2011 on sn-devel-104 commit 411d498b8ae7dc3c6263399cb4430b00fdcbbbd9 Author: Christian Ambach Date: Fri Dec 16 14:51:46 2011 +0100 s3:dbwrap fix return value of db_tdb_parse use the TDB ecode to determine the NTSTATUS return value and not the return code that is just -1 --- Summary of changes: source3/lib/dbwrap/dbwrap_tdb.c |6 ++- source3/winbindd/idmap_autorid.c | 131 ++ 2 files changed, 81 insertions(+), 56 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/dbwrap/dbwrap_tdb.c b/source3/lib/dbwrap/dbwrap_tdb.c index d38c377..2c82810 100644 --- a/source3/lib/dbwrap/dbwrap_tdb.c +++ b/source3/lib/dbwrap/dbwrap_tdb.c @@ -188,7 +188,11 @@ static NTSTATUS db_tdb_parse(struct db_context *db, TDB_DATA key, state.private_data = private_data; ret = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_parser, &state); - return map_nt_error_from_tdb(ret); + + if (ret != 0) { + return map_nt_error_from_tdb(tdb_error(ctx->wtdb->tdb)); + } + return NT_STATUS_OK; } static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag) diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 1a88fd4..6a39816 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -55,7 +55,7 @@ struct autorid_domain_config { /* handle to the tdb storing domain <-> range assignments */ static struct db_context *autorid_db; -static NTSTATUS idmap_autorid_get_domainrange(struct db_context *db, +static NTSTATUS idmap_autorid_get_domainrange_action(struct db_context *db, void *private_data) { NTSTATUS ret; @@ -65,71 +65,95 @@ static NTSTATUS idmap_autorid_get_domainrange(struct db_context *db, cfg = (struct autorid_domain_config *)private_data; - ret = dbwrap_fetch_uint32(db, cfg->sid, &domainnum); - if (!NT_STATUS_IS_OK(ret)) { - DEBUG(10, ("Acquiring new range for domain %s\n", cfg->sid)); + ret = dbwrap_fetch_uint32(db, cfg->sid, &(cfg->domainnum)); - /* fetch the current HWM */ - ret = dbwrap_fetch_uint32(db, HWM, &hwm); - if (!NT_STATUS_IS_OK(ret)) { - DEBUG(1, ("Fatal error while fetching current " - "HWM value: %s\n", nt_errstr(ret))); - ret = NT_STATUS_INTERNAL_ERROR; - goto error; - } + if (NT_STATUS_IS_OK(ret)) { + /* entry is already present*/ + return ret; + } - /* do we have a range left? */ - if (hwm >= cfg->globalcfg->maxranges) { - DEBUG(1, ("No more domain ranges available!\n")); - ret = NT_STATUS_NO_MEMORY; - goto error; - } + DEBUG(10, ("Acquiring new range for domain %s\n", cfg->sid)); - /* increase the HWM */ - ret = dbwrap_change_uint32_atomic(db, HWM, &domainnum, 1); - if (!NT_STATUS_IS_OK(ret)) { - DEBUG(1, ("Fatal error while fetching a new " - "domain range value!\n")); - goto error; - } + /* fetch the current HWM */ + ret = dbwrap_fetch_uint32(db, HWM, &hwm); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(1, ("Fatal error while fetching current " + "HWM value: %s\n", nt_errstr(ret))); + ret = NT_STATUS_INTERNAL_ERROR; + goto error; + } - /* store away the new mapping in both directions */ - ret = dbwrap_trans_store_uint32(db, cfg->sid, domainnum); - if (!NT_STATUS_IS_OK(ret)) { - DEBUG(1, ("Fatal error while storing new " - &
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 851b9e9 s3:vfs fix up vfs_gpfs after function pointer renames from d0330c7 s3-libsmb: Don't duplicate kerberos service tickets. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 851b9e9183ef598269aeb6c57f237a2599d701fa Author: Christian Ambach Date: Thu Dec 15 14:31:03 2011 +0100 s3:vfs fix up vfs_gpfs after function pointer renames In 422494a8e630e2ca89386344eaa5346388698a32, vfs_gpfs.c was forgotten Autobuild-User: Christian Ambach Autobuild-Date: Thu Dec 15 21:08:02 CET 2011 on sn-devel-104 --- Summary of changes: source3/modules/vfs_gpfs.c | 50 ++-- 1 files changed, 25 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index d879124..ba6ec6d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1323,32 +1323,32 @@ static int vfs_gpfs_open(struct vfs_handle_struct *handle, static struct vfs_fn_pointers vfs_gpfs_fns = { .connect_fn = vfs_gpfs_connect, - .fs_capabilities = vfs_gpfs_capabilities, - .kernel_flock = vfs_gpfs_kernel_flock, -.linux_setlease = vfs_gpfs_setlease, -.get_real_filename = vfs_gpfs_get_real_filename, -.fget_nt_acl = gpfsacl_fget_nt_acl, -.get_nt_acl = gpfsacl_get_nt_acl, -.fset_nt_acl = gpfsacl_fset_nt_acl, -.sys_acl_get_file = gpfsacl_sys_acl_get_file, -.sys_acl_get_fd = gpfsacl_sys_acl_get_fd, -.sys_acl_set_file = gpfsacl_sys_acl_set_file, -.sys_acl_set_fd = gpfsacl_sys_acl_set_fd, -.sys_acl_delete_def_file = gpfsacl_sys_acl_delete_def_file, -.chmod = vfs_gpfs_chmod, -.fchmod = vfs_gpfs_fchmod, -.close_fn = vfs_gpfs_close, -.setxattr = gpfs_set_xattr, -.getxattr = gpfs_get_xattr, -.stat = vfs_gpfs_stat, -.fstat = vfs_gpfs_fstat, -.lstat = vfs_gpfs_lstat, - .ntimes = vfs_gpfs_ntimes, - .is_offline = vfs_gpfs_is_offline, - .aio_force = vfs_gpfs_aio_force, - .sendfile = vfs_gpfs_sendfile, + .fs_capabilities_fn = vfs_gpfs_capabilities, + .kernel_flock_fn = vfs_gpfs_kernel_flock, + .linux_setlease_fn = vfs_gpfs_setlease, + .get_real_filename_fn = vfs_gpfs_get_real_filename, + .fget_nt_acl_fn = gpfsacl_fget_nt_acl, + .get_nt_acl_fn = gpfsacl_get_nt_acl, + .fset_nt_acl_fn = gpfsacl_fset_nt_acl, + .sys_acl_get_file_fn = gpfsacl_sys_acl_get_file, + .sys_acl_get_fd_fn = gpfsacl_sys_acl_get_fd, + .sys_acl_set_file_fn = gpfsacl_sys_acl_set_file, + .sys_acl_set_fd_fn = gpfsacl_sys_acl_set_fd, + .sys_acl_delete_def_file_fn = gpfsacl_sys_acl_delete_def_file, + .chmod_fn = vfs_gpfs_chmod, + .fchmod_fn = vfs_gpfs_fchmod, + .close_fn = vfs_gpfs_close, + .setxattr_fn = gpfs_set_xattr, + .getxattr_fn = gpfs_get_xattr, + .stat_fn = vfs_gpfs_stat, + .fstat_fn = vfs_gpfs_fstat, + .lstat_fn = vfs_gpfs_lstat, + .ntimes_fn = vfs_gpfs_ntimes, + .is_offline_fn = vfs_gpfs_is_offline, + .aio_force_fn = vfs_gpfs_aio_force, + .sendfile_fn = vfs_gpfs_sendfile, .open_fn = vfs_gpfs_open, - .ftruncate = vfs_gpfs_ftruncate + .ftruncate_fn = vfs_gpfs_ftruncate }; NTSTATUS vfs_gpfs_init(void); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 53ad886 security: add local authority well-known SIDs via 717a27b s3:smb2 report access_based_dir_enum in tcon reply via faf8b9b s3:smb2 do not set allow_namespace_caching flag for a share via 9422943 s3:vfs:gpfs remove non-working code via 6753656 s3:vfs:gpfs fix some compiler warnings via db1abd4 s3:vfs:gpfs convert syncio parameter from 9f1eb8a s4 dns: Test QCLASS_NONE query http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 53ad886f75f189a7c865acf455398c3f3ce38111 Author: Christian Ambach Date: Thu Sep 1 16:09:01 2011 +0200 security: add local authority well-known SIDs add the S-1-2 well-known SID family Autobuild-User: Christian Ambach Autobuild-Date: Thu Nov 24 19:01:08 CET 2011 on sn-devel-104 commit 717a27ba2227764ba14c205eca276ed67e752a59 Author: Christian Ambach Date: Thu Nov 24 14:42:21 2011 +0100 s3:smb2 report access_based_dir_enum in tcon reply let the client know when hide unreadable or hide unwriteable files is set for a share commit faf8b9bba053e844d530021566c75d83c031a94d Author: Christian Ambach Date: Thu Nov 24 13:49:17 2011 +0100 s3:smb2 do not set allow_namespace_caching flag for a share this matches Win7/2002R2 behavior and clients also must ignore this flag when set (MS-SMB 2.2.10), so we should not set it at all commit 94229435e80ecc5c0158c59e0ab3976b98668238 Author: Christian Ambach Date: Thu Nov 24 16:57:58 2011 +0100 s3:vfs:gpfs remove non-working code when development of vfs_gpfs was started a long time ago it was considered a good idea to have it compileable even if GPFS is not around and then the module would complain in the logs that libgpfs is not there Nowadays this does not work any more as the code contains GPFS specific types that need the GPFS header files. Instead of making it compile again by adding GPFS typedefs, this removes the whole approach. Other VFS modules also do not even compile when necessary headers are not around, so do the same for the GPFS module code. commit 6753656c7464424519f9daa9f89576585511f574 Author: Christian Ambach Date: Thu Nov 24 15:58:36 2011 +0100 s3:vfs:gpfs fix some compiler warnings commit db1abd4d2d6f83a4c9729019ed91c7a92c66529c Author: Christian Ambach Date: Thu Nov 24 13:39:01 2011 +0100 s3:vfs:gpfs convert syncio parameter convert syncio parameter to be stored in the VFS handle data this removes the need to go through lp_parm_bool() on each open --- Summary of changes: libcli/security/dom_sid.h|1 + libcli/security/util_sid.c |2 + source3/lib/util_wellknown.c |6 source3/modules/gpfs.c | 65 -- source3/modules/vfs_gpfs.c | 19 +--- source3/smbd/smb2_tcon.c |7 - 6 files changed, 29 insertions(+), 71 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/security/dom_sid.h b/libcli/security/dom_sid.h index 5886ce3..df57bd1 100644 --- a/libcli/security/dom_sid.h +++ b/libcli/security/dom_sid.h @@ -28,6 +28,7 @@ /* Some well-known SIDs */ extern const struct dom_sid global_sid_World_Domain; extern const struct dom_sid global_sid_World; +extern const struct dom_sid global_sid_Local_Authority; extern const struct dom_sid global_sid_Creator_Owner_Domain; extern const struct dom_sid global_sid_NT_Authority; extern const struct dom_sid global_sid_Enterprise_DCs; diff --git a/libcli/security/util_sid.c b/libcli/security/util_sid.c index 84ac0f1..f87d3eb 100644 --- a/libcli/security/util_sid.c +++ b/libcli/security/util_sid.c @@ -38,6 +38,8 @@ const struct dom_sid global_sid_World_Domain = /* Everyone domain { 1, 0, {0,0,0,0,0,1}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; const struct dom_sid global_sid_World = /* Everyone */ { 1, 1, {0,0,0,0,0,1}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; +const struct dom_sid global_sid_Local_Authority =/* Local Authority */ +{ 1, 0, {0,0,0,0,0,2}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; const struct dom_sid global_sid_Creator_Owner_Domain = /* Creator Owner domain */ { 1, 0, {0,0,0,0,0,3}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; const struct dom_sid global_sid_NT_Authority = /* NT Authority */ diff --git a/source3/lib/util_wellknown.c b/source3/lib/util_wellknown.c index 19ac7ce..f3c0f17 100644 --- a/source3/lib/util_wellknown.c +++ b/source3/lib/util_wellknown.c @@ -39,6 +39,11 @@ static const struct rid_name_map everyone_users[] = { { 0, "Everyone" }, { 0, NULL}}; +static const struct rid_name_map local_authority_users[] = { + { 0, "Local" }, + { 1, "Console Lo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9cf9717 s3:docs fix a series of typos in wbinfo manpage via 2341422 s3:docs: some corrections for wbinfo via b99becd s3:smbd increase a debug level from 468fcfd dns: Fix offset check in ndr_pull_component http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9cf97175c7a8eb25e7052e898fd94c98eaa0e2cf Author: Christian Ambach Date: Fri Nov 4 18:02:30 2011 +0100 s3:docs fix a series of typos in wbinfo manpage s/choide/choice/ Autobuild-User: Christian Ambach Autobuild-Date: Fri Nov 4 19:38:53 CET 2011 on sn-devel-104 commit 23414220125307caf3b1058f738e7249acb043e5 Author: Christian Ambach Date: Fri Nov 4 17:56:02 2011 +0100 s3:docs: some corrections for wbinfo Parameters for --sid-aliases and --sid-to-fullname were not listed properly in the SYNOPSIS section commit b99becd4fadd3b5a51df4a95164e69345a3aded3 Author: Christian Ambach Date: Fri Nov 4 17:34:48 2011 +0100 s3:smbd increase a debug level logging disconnected clients with level 1 swamps the logs --- Summary of changes: docs-xml/manpages-3/wbinfo.1.xml | 24 source3/smbd/process.c | 11 ++- 2 files changed, 18 insertions(+), 17 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/wbinfo.1.xml b/docs-xml/manpages-3/wbinfo.1.xml index a746a0f..93fc0ab 100644 --- a/docs-xml/manpages-3/wbinfo.1.xml +++ b/docs-xml/manpages-3/wbinfo.1.xml @@ -24,42 +24,42 @@ --allocate-gid --allocate-uid -c - --ccache-save - --change-user-password + --ccache-save + --change-user-password -D domain --domain domain - --dsgetdcname domain + --dsgetdcname domain -g --getdcname domain --get-auth-user -G gid - --gid-info gid - --group-info group + --gid-info gid + --group-info group --help|-? -i user -I ip -K user%password - --lanman + --lanman -m -n name -N netbios-name - --ntlmv2 - --online-status + --ntlmv2 + --online-status --own-domain -p -P|--ping-dc -r user - -R|--lookup-rids + -R|--lookup-rids -s sid --separator --set-auth-user user%password -S sid - --sid-aliases - --sid-to-fullname + --sid-aliases sid + --sid-to-fullname sid -t -u --uid-info uid - --usage + --usage --user-domgroups sid --user-sidinfo sid --user-sids sid diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ab0c147..0ad5542 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -456,11 +456,12 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, status = receive_smb_raw_talloc(mem_ctx, sconn, sock, buffer, timeout, p_unread, &len); if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("read_smb_length_return_keepalive failed for " - "client %s read error = %s.\n", - tsocket_address_string(sconn->remote_address, -talloc_tos()), - nt_errstr(status))); + DEBUG(NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)?5:1, + ("receive_smb_raw_talloc failed for client %s " + "read error = %s.\n", + tsocket_address_string(sconn->remote_address, + talloc_tos()), + nt_errstr(status)) ); return status; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via aa1fd27 s3:idmap_autorid: document allocation pool via ed45a55 s3:idmap_autorid: add an allocation range to autorid via 0a85d1c s3:idmap_autorid: move HWM initialization into a function via 8d9aea2 s3:idmap_autorid: use strings as parameter for range allocator via a4d245b s3:winbindd/idmap make idmap modules loadable again via bfe1385 Revert "s3:idmap/autorid add a small alloc pool to autorid" from 80741d9 libcli: remove unneeded com_err.h and fix the build here. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit aa1fd273171682271552ce82ce637c32c5047503 Author: Christian Ambach Date: Thu Oct 20 18:53:02 2011 +0200 s3:idmap_autorid: document allocation pool document the need that excessive use of local users/group might require increasing the rangesize Autobuild-User: Christian Ambach Autobuild-Date: Fri Oct 21 18:04:50 CEST 2011 on sn-devel-104 commit ed45a558aed5cd7c7f21425ee93212bbf77da3ad Author: Christian Ambach Date: Thu Oct 20 18:44:48 2011 +0200 s3:idmap_autorid: add an allocation range to autorid this is needed to allocate gids for BUILTIN\Users and BUILTIN\Administrators and for local users/group that admins might want to create autorid will now allocate one range for this purpose and can so give out as many uids and gids as the configured rangesize allows commit 0a85d1c8916a953edd00235f0701ab7d52868de7 Author: Christian Ambach Date: Thu Oct 20 18:39:30 2011 +0200 s3:idmap_autorid: move HWM initialization into a function we will need some more HWM soon, so move out initialization and optimize the logic using the new interface of dbwrap_fetch_uint32 commit 8d9aea2a66f83f109aba9e2fc2106c0b3fc4bf88 Author: Christian Ambach Date: Thu Oct 20 18:22:19 2011 +0200 s3:idmap_autorid: use strings as parameter for range allocator this prepares for allocation of non-domain ranges that cannot be expressed by a SID (e.g. an allocation pool) commit a4d245b3e8c4f7b911646464ba920fe71801358e Author: Christian Ambach Date: Thu Oct 20 17:59:32 2011 +0200 s3:winbindd/idmap make idmap modules loadable again commit 355b5e3a831415d9bef97 changed the module system to expect 'samba_init_module' as fixed initializer function commit bfe1385e313156233c307855f507dbaf39e7616c Author: Christian Ambach Date: Wed Oct 19 16:14:06 2011 +0200 Revert "s3:idmap/autorid add a small alloc pool to autorid" This reverts commit 0aa558718ad7427ee8b02046da73eea1838a5a32. just having 500 uid/gids values is not good enough for users using local users and groups in the order of thousands better solution which will use a complete range for allocated uids/gids will come next. --- Summary of changes: docs-xml/manpages-3/idmap_autorid.8.xml |7 +- source3/winbindd/idmap_ad.c |2 +- source3/winbindd/idmap_adex/idmap_adex.c |2 +- source3/winbindd/idmap_autorid.c | 160 +++--- source3/winbindd/idmap_hash/idmap_hash.c |2 +- source3/winbindd/idmap_rid.c |2 +- source3/winbindd/idmap_tdb2.c|2 +- 7 files changed, 113 insertions(+), 64 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/idmap_autorid.8.xml b/docs-xml/manpages-3/idmap_autorid.8.xml index b5a9bde..e563cdd 100644 --- a/docs-xml/manpages-3/idmap_autorid.8.xml +++ b/docs-xml/manpages-3/idmap_autorid.8.xml @@ -51,7 +51,12 @@ for regular users. As the parameter cannot be changed later, please plan accordingly for your expected number of users in a domain with safety margins. - + + One range will be used for local users and groups. + Thus the number of local users and groups that can be created is + limited by this option as well. If you plan to create a large amount + of local users or groups, you will need set this parameter accordingly. + The default value is 10. diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index 65b5180..a3ecc47 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -1096,7 +1096,7 @@ static struct nss_info_methods nss_sfu20_methods = { Initialize the plugins ***/ -NTSTATUS idmap_ad_init(void) +NTSTATUS samba_init_module(void) { static NTSTATUS status_idmap_ad = NT_STATUS_UNSUCCE
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2102721 s3-docs: some corrections for wbinfo from caacdb0 s3:wscript_build - add dependency on "tdb-wrap3" for libnet dssync http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 21027216d43c33fac220746c32acff6b355c4e7d Author: Christian Ambach Date: Fri Sep 30 17:07:05 2011 +0200 s3-docs: some corrections for wbinfo Parameters for --group-info and --gid-info were not listed properly in the SYNOPSIS and the OPTIONS section Autobuild-User: Christian Ambach Autobuild-Date: Fri Sep 30 18:44:34 CEST 2011 on sn-devel-104 --- Summary of changes: docs-xml/manpages-3/wbinfo.1.xml |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/wbinfo.1.xml b/docs-xml/manpages-3/wbinfo.1.xml index 78c256e..a746a0f 100644 --- a/docs-xml/manpages-3/wbinfo.1.xml +++ b/docs-xml/manpages-3/wbinfo.1.xml @@ -33,8 +33,8 @@ --getdcname domain --get-auth-user -G gid - --gid-info - --group-info + --gid-info gid + --group-info group --help|-? -i user -I ip @@ -171,8 +171,8 @@ - --group-info user - Get group info for user. + --group-info group + Get group info from group name. -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0aa5587 s3:idmap/autorid add a small alloc pool to autorid from c640e92 s4-s3-upgrade: convert password age policies to the negative NTTIME format http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0aa558718ad7427ee8b02046da73eea1838a5a32 Author: Christian Ambach Date: Wed Aug 31 18:28:51 2011 +0200 s3:idmap/autorid add a small alloc pool to autorid this is needed to allocate gids for BUILTIN\Users and BUILTIN\Administrators gids are stored at the start of the first domain as RIDs start with values over 500, we have some room there so we do not need to allocate a range Autobuild-User: Christian Ambach Autobuild-Date: Wed Sep 7 15:15:09 CEST 2011 on sn-devel-104 --- Summary of changes: source3/winbindd/idmap_autorid.c | 52 ++ 1 files changed, 52 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index a60f926..85ddca2 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -35,6 +35,8 @@ #define DBGC_CLASS DBGC_IDMAP #define HWM "NEXT RANGE" +#define ALLOC_HWM "NEXT ALLOC ID" +#define ALLOC_POOL_SIZE 500 #define CONFIGKEY "CONFIG" struct autorid_global_config { @@ -361,6 +363,17 @@ static NTSTATUS idmap_autorid_db_init(void) } } + /* Initialize high water mark for alloc pool to 0 */ + hwm = dbwrap_fetch_int32(autorid_db, ALLOC_HWM); + if ((hwm < 0)) { + if (!NT_STATUS_IS_OK + (dbwrap_trans_store_int32(autorid_db, ALLOC_HWM, 0))) { + DEBUG(0, + ("Unable to initialise HWM in autorid " + "database\n")); + return NT_STATUS_INTERNAL_DB_ERROR; + } + } return NT_STATUS_OK; } @@ -542,6 +555,44 @@ done: return status; } +static NTSTATUS idmap_autorid_allocate_id(struct idmap_domain *dom, + struct unixid *xid) { + + struct autorid_global_config *globalcfg; + NTSTATUS ret; + uint32_t hwm; + + if (!strequal(dom->name, "*")) { + DEBUG(3, ("idmap_autorid_allocate_id: " + "Refusing creation of mapping for domain'%s'. " + "Currently only supported for the default " + "domain \"*\".\n", + dom->name)); + return NT_STATUS_NOT_IMPLEMENTED; + } + + globalcfg = talloc_get_type(dom->private_data, + struct autorid_global_config); + + if (!dbwrap_fetch_uint32(autorid_db, ALLOC_HWM, &hwm)) { + DEBUG(1, ("Failed to fetch current allocation HWM value!\n")); + return NT_STATUS_INTERNAL_ERROR; + } + + if (hwm > ALLOC_POOL_SIZE) { + DEBUG(1, ("allocation pool is depleted!\n")); + return NT_STATUS_NO_MEMORY; + } + + ret = dbwrap_change_uint32_atomic(autorid_db, ALLOC_HWM, &(xid->id), 1); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(1, ("Fatal error while allocating new ID!\n")); + } + xid->id = (xid->id)+(globalcfg->minvalue); + + return ret; +} + /* Close the idmap tdb instance */ @@ -549,6 +600,7 @@ static struct idmap_methods autorid_methods = { .init = idmap_autorid_initialize, .unixids_to_sids = idmap_autorid_unixids_to_sids, .sids_to_unixids = idmap_autorid_sids_to_unixids, + .allocate_id = idmap_autorid_allocate_id }; NTSTATUS idmap_autorid_init(void) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 59e8db0 s3:modules make perfcount_test loadable again via 4c2be3d s3:lib S-1-5-9 is "Enterprise Domain Controllers" via 8ecdb55 s3:lib remove duplicate entry for "Anonymous Logon" via d387041 s3:lib add S-1-5-17 to well-known SID list via 0decdf8 s3:lib add some more well-known sids via 7475144 s3:lib add new well-known SIDs for BUILTIN via b43c69b security.idl add new well-known SIDs from 80f4a93 tdb2: add full LGPL headers http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 59e8db0f060479be3a853ce718bcdf4f9ce0138d Author: Christian Ambach Date: Mon Aug 29 17:48:53 2011 +0200 s3:modules make perfcount_test loadable again use expected 'init_samba_module' name for initializer function Autobuild-User: Christian Ambach Autobuild-Date: Wed Aug 31 11:22:26 CEST 2011 on sn-devel-104 commit 4c2be3df0ef00ea1307fe022f8d156edeffb36a5 Author: Christian Ambach Date: Mon Aug 29 17:46:06 2011 +0200 s3:lib S-1-5-9 is "Enterprise Domain Controllers" and not ServerLogon commit 8ecdb5595728b153ffb6d4527de9f6abd7795a31 Author: Christian Ambach Date: Mon Aug 29 17:44:53 2011 +0200 s3:lib remove duplicate entry for "Anonymous Logon" commit d3870413d10bea9aeca5d0c9d08d19b708070ed2 Author: Christian Ambach Date: Mon Aug 29 17:42:45 2011 +0200 s3:lib add S-1-5-17 to well-known SID list http://support.microsoft.com/kb/243330/en-us says the name is "This organization", but Windows 2008 says IUSR Picking the Windows 2008 variant as 'This Organization' would be duplicate to S-1-5-15 commit 0decdf8ace467f5df939db8291a4516a7dbb019a Author: Christian Ambach Date: Mon Aug 29 17:40:18 2011 +0200 s3:lib add some more well-known sids add S-1-3-2/Creator Owner Server, S-1-3-3/Creator Group Server and S-1-3-4/Owner Rights to the well-known SID list commit 74751446a2a7dc323682d8eee23fddef9d353e16 Author: Christian Ambach Date: Mon Aug 29 17:36:25 2011 +0200 s3:lib add new well-known SIDs for BUILTIN Distributed COM Users, Cryptographic Operators, Event Log Readers and Certificate Service DCOM Access were missing from the BUILTIN well-known SID list commit b43c69bedfc519e4e53d2c9b0ba2693bdaa1d67e Author: Christian Ambach Date: Mon Aug 29 17:34:57 2011 +0200 security.idl add new well-known SIDs http://support.microsoft.com/kb/243330/en-us lists some new well-known SIDS in the BUILTIN domain --- Summary of changes: librpc/idl/security.idl |8 source3/lib/util_builtin.c |8 source3/lib/util_wellknown.c |7 +-- source3/modules/perfcount_test.c |2 +- 4 files changed, 22 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl index 5760337..2b6efc5 100644 --- a/librpc/idl/security.idl +++ b/librpc/idl/security.idl @@ -269,6 +269,10 @@ interface security const string SID_BUILTIN_PERFLOG_USERS = "S-1-5-32-559"; const string SID_BUILTIN_AUTH_ACCESS= "S-1-5-32-560"; const string SID_BUILTIN_TS_LICENSE_SERVERS = "S-1-5-32-561"; + const string SID_BUILTIN_DISTRIBUTED_COM_USERS = "S-1-5-32-562"; + const string SID_BUILTIN_CRYPTO_OPERATORS = "S-1-5-32-569"; + const string SID_BUILTIN_EVENT_LOG_READERS = "S-1-5-32-573"; + const string SID_BUILTIN_CERT_SERV_DCOM_ACCESS = "S-1-5-32-574"; /* SECURITY_NT_SERVICE */ const string NAME_NT_SERVICE= "NT SERVICE"; @@ -316,6 +320,10 @@ interface security const int BUILTIN_RID_PERFLOG_USERS = 559; const int BUILTIN_RID_AUTH_ACCESS = 560; const int BUILTIN_RID_TS_LICENSE_SERVERS= 561; + const int BUILTIN_RID_DISTRIBUTED_COM_USERS = 562; + const int BUILTIN_RID_CRYPTO_OPERATORS = 569; + const int BUILTIN_RID_EVENT_LOG_READERS = 573; + const int BUILTIN_RID_CERT_SERV_DCOM_ACCESS = 574; / This is a list of privileges reported by a WIndows 2008 R2 DC diff --git a/source3/lib/util_builtin.c b/source3/lib/util_builtin.c index b370a76..3aae509 100644 --- a/source3/lib/util_builtin.c +++ b/source3/lib/util_builtin.c @@ -52,6 +52,14 @@ static const struct rid_name_map builtin_aliases[] = { "Windows Authorization Access Group" }, { BUILTIN_RID_TS_LICENSE_SERVERS, "Terminal Server License Serve
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fac75f0 s3:winbindd fix a return code check from 6d2f65b s3: Fix an uninitialized variable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fac75f04a8577fd0eb5a3fff9914e4abffa91a1e Author: Christian Ambach Date: Wed Aug 24 16:21:37 2011 +0200 s3:winbindd fix a return code check talloc_traverse_dict will return with -1 in case of an error and might return positive values that indicate the count of found entries Autobuild-User: Christian Ambach Autobuild-Date: Wed Aug 24 18:09:11 CEST 2011 on sn-devel-104 --- Summary of changes: source3/winbindd/winbindd_group.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c index 1e4ad5f..2f8ba6a 100644 --- a/source3/winbindd/winbindd_group.c +++ b/source3/winbindd/winbindd_group.c @@ -115,7 +115,7 @@ NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members, c.len = 0; res = talloc_dict_traverse(members, getgr_calc_memberlen, &c); - if (res != 0) { + if (res == -1) { DEBUG(5, ("talloc_dict_traverse failed\n")); return NT_STATUS_INTERNAL_ERROR; } @@ -128,7 +128,7 @@ NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members, } res = talloc_dict_traverse(members, getgr_unparse_members, &m); - if (res != 0) { + if (res == -1) { DEBUG(5, ("talloc_dict_traverse failed\n")); TALLOC_FREE(m.buf); return NT_STATUS_INTERNAL_ERROR; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via abf3573 s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken from 133fb0e s3-spoolss: Use get_session_info_system(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit abf3573c21510717edb0fb9ce5080c1a24c35714 Author: Christian Ambach Date: Wed Jul 27 14:46:00 2011 +0200 s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken we should not merge ACEs with different flags (e.g. CI/OI/I/) Otherwise ACLs get wrong entries and thus wrong semantics Example: ACL:BUILTIN\Users:ALLOWED/0x0/FULL ACL:BUILTIN\Users:ALLOWED/I/READ got merged to ACL:BUILTIN\Users:ALLOWED/I/FULL This is not the same and also leads to wrong displays in the Windows ACL dialog Autobuild-User: Christian Ambach Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104 --- Summary of changes: source3/modules/nfs4_acls.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 09ef522..f1c2904 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -519,8 +519,7 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special( if (ace->flags == aceNew->flags && ace->aceType==aceNew->aceType && - ((ace->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)== -(aceNew->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)) && + ace->aceFlags==aceNew->aceFlags && (ace->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)== (aceNew->aceFlags&SMB_ACE4_IDENTIFIER_GROUP) ) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 749868e s3:lib change default share security access mask from ac57cfd libsamba-util: Build in libbitmap. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 749868ede4cf2d3888135716d98d38dff020cae3 Author: Christian Ambach Date: Tue Jul 26 13:43:14 2011 +0200 s3:lib change default share security access mask when there is no share SD set, the default share SD that is used e.g. for the output of sharesec -v defaults to a value that is not equivalent to the desired FULL access. This is a more or less a cosmetical follow-up for the patches in Bug #8201 that makes them more consumeable by printing FULL (that is what the user expects) instead of a bitmask in hexadecimal form. previous output: REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/0x101f01ff with patch: REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/FULL Autobuild-User: Christian Ambach Autobuild-Date: Tue Jul 26 15:57:55 CEST 2011 on sn-devel-104 --- Summary of changes: source3/lib/sharesec.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c index 2f62535..11ccb42 100644 --- a/source3/lib/sharesec.c +++ b/source3/lib/sharesec.c @@ -293,7 +293,7 @@ struct security_descriptor *get_share_security( TALLOC_CTX *ctx, const char *ser if (data.dptr == NULL) { return get_share_security_default(ctx, psize, - GENERIC_ALL_ACCESS); + SEC_RIGHTS_DIR_ALL); } status = unmarshall_sec_desc(ctx, data.dptr, data.dsize, &psd); @@ -304,14 +304,14 @@ struct security_descriptor *get_share_security( TALLOC_CTX *ctx, const char *ser DEBUG(0, ("unmarshall_sec_desc failed: %s\n", nt_errstr(status))); return get_share_security_default(ctx, psize, - GENERIC_ALL_ACCESS); + SEC_RIGHTS_DIR_ALL); } if (psd) { *psize = ndr_size_security_descriptor(psd, 0); } else { return get_share_security_default(ctx, psize, - GENERIC_ALL_ACCESS); + SEC_RIGHTS_DIR_ALL); } return psd; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fb766cd s3-waf: fix a libcrypto configure check via bca69bf s3:winbindd remove an unused variable via 410c4de s3:utils fix a compiler warning via 62825b0 s3:modules/vfs_afsacl fix a compiler warning via 4370dc1 s3:afs make path argument to afs_syscall const via dcd10fa s3:modules/vfs_afsacl fix a compiler warning via c5cbdc2 s3:modules/vfs_afsacl use stdbool types via c8b4414 s3:modules/vfs_afsacl remove some unnecessary whitespace via f2be12f s3:lib/afs fix the build with --with-vfs-afsacl via ffef23d s3:lib/afs use stdbool types via 9779af8 s3:utils/net_afs fix compiler warnings via ffbecc0 s3:lib/afs_settoken fix some compiler warnings via a78407b s3:lib/afs fix some compiler warnings via 3b231e6 s3:lib/afs fix the build with --with-fake-kaserver from e3fc1ab selftest: use "state directory" and "cache directory" options http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fb766cd597dd0579f00ce3ca0acb5a422804d901 Author: Christian Ambach Date: Thu Jul 21 14:13:20 2011 +0200 s3-waf: fix a libcrypto configure check the parameters to conf.CHECK_FUNCS_IN were in the wrong order Autobuild-User: Christian Ambach Autobuild-Date: Thu Jul 21 16:49:52 CEST 2011 on sn-devel-104 commit bca69bfbc3b43d64b22ea92607267494033d17b6 Author: Christian Ambach Date: Thu Jul 21 14:48:24 2011 +0200 s3:winbindd remove an unused variable fixes a compiler warning commit 410c4deefe24a7d92caf65e288a4ff9d54190e70 Author: Christian Ambach Date: Thu Jul 21 14:47:38 2011 +0200 s3:utils fix a compiler warning fix a compiler warning about missing prototypes commit 62825b0ff953a7ba269ef6bc30d0470d07269e4b Author: Christian Ambach Date: Fri Jul 15 16:16:11 2011 +0200 s3:modules/vfs_afsacl fix a compiler warning commit 4370dc11bd3a0bb14d21be7f581f59fa7fc1d888 Author: Christian Ambach Date: Fri Jul 15 16:14:33 2011 +0200 s3:afs make path argument to afs_syscall const commit dcd10fa4e5bf3f687b5ef7be30ef0b24f1ae639e Author: Christian Ambach Date: Fri Jul 15 16:12:46 2011 +0200 s3:modules/vfs_afsacl fix a compiler warning commit c5cbdc21d1b21034fb5f892a74d296cc94120696 Author: Christian Ambach Date: Fri Jul 15 15:58:40 2011 +0200 s3:modules/vfs_afsacl use stdbool types commit c8b4414c0a8bc9f81a03948c875bbac22d0a8726 Author: Christian Ambach Date: Fri Jul 15 15:57:26 2011 +0200 s3:modules/vfs_afsacl remove some unnecessary whitespace commit f2be12fa8f97a02885aa46fa8e725970d73e3885 Author: Christian Ambach Date: Fri Jul 15 15:54:25 2011 +0200 s3:lib/afs fix the build with --with-vfs-afsacl This fixes the second piece of Bug #8263 commit ffef23d40f100ba678bc2af73eb24bc6fc93356e Author: Christian Ambach Date: Fri Jul 15 15:35:18 2011 +0200 s3:lib/afs use stdbool types commit 9779af85d6fe3091448ed77166877e3fcdfc3cfe Author: Christian Ambach Date: Fri Jul 15 15:44:36 2011 +0200 s3:utils/net_afs fix compiler warnings commit ffbecc0cf6878f935aec9427e632f7cfe8571149 Author: Christian Ambach Date: Fri Jul 15 15:34:29 2011 +0200 s3:lib/afs_settoken fix some compiler warnings commit a78407b9ca24d0fd2dae06debccbe0859e76ca87 Author: Christian Ambach Date: Fri Jul 15 15:30:14 2011 +0200 s3:lib/afs fix some compiler warnings commit 3b231e6a12676aba13a29589992c020bd5e2b33d Author: Christian Ambach Date: Fri Jul 15 15:27:07 2011 +0200 s3:lib/afs fix the build with --with-fake-kaserver This fixes one piece of Bug #8263 --- Summary of changes: source3/include/proto.h|2 +- source3/lib/afs.c | 30 +- source3/lib/afs_settoken.c | 45 +++-- source3/modules/vfs_afsacl.c | 87 --- source3/utils/net_afs.c|8 +++- source3/winbindd/winbindd_cm.c |2 - source3/wscript|2 +- 7 files changed, 96 insertions(+), 80 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index 010992d..ec0571c 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -46,7 +46,7 @@ char *afs_createtoken_str(const char *username, const char *cell); /* The following definitions come from lib/afs_settoken.c */ int afs_syscall( int subcall, - char * path, + const char * path, int cmd, char * cmarg, int follow); diff --git a/source3/lib/afs.c b/source3/lib/afs.c index 7a49c57..849e9ce 100644 --- a/source3/lib/afs.c +++ b/source3/lib/afs.c @@ -23,6 +23,11 @@ #define NO_ASN1_TYPEDEFS 1 +#include "secrets.h" +#includ
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2a9987e s3-docs: fix a typo in rpcclient manpage from 8faee7b s3-rpc_server: Pass event and messaging context to accept function. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2a9987e62ab9ef20a2ea71204a48d0318e30512d Author: Christian Ambach Date: Thu Jul 14 17:23:37 2011 +0200 s3-docs: fix a typo in rpcclient manpage Autobuild-User: Christian Ambach Autobuild-Date: Thu Jul 14 20:10:12 CEST 2011 on sn-devel-104 --- Summary of changes: docs-xml/manpages-3/rpcclient.1.xml |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/rpcclient.1.xml b/docs-xml/manpages-3/rpcclient.1.xml index f660b89..40e4b9b 100644 --- a/docs-xml/manpages-3/rpcclient.1.xml +++ b/docs-xml/manpages-3/rpcclient.1.xml @@ -120,7 +120,7 @@ of usernames to SIDs. - enumtrustsEnumerate trusted domains + enumtrustEnumerate trusted domains enumprivsEnumerate privileges -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9a3e2d1 s3:smbd fix a compile warning on AIX 5.3 via 14544ce s3:build fix autoconf build on AIX 5.3 via 94f24c4 .gitignore: add AIX WINBIND nss module via 3d6dafc s3:lib fix non-empty blank lines via f3088d1 s3:modules fix non-empty blank lines from f924913 s3: Remove some unused variables http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9a3e2d1c020cd7de3a6074f52dc0911bc0ab6f9b Author: Christian Ambach Date: Tue Jul 5 17:06:27 2011 -0500 s3:smbd fix a compile warning on AIX 5.3 use the correct alias instead of FD directly Autobuild-User: Christian Ambach Autobuild-Date: Tue Jul 5 19:51:42 CEST 2011 on sn-devel-104 commit 14544cede5edb996a077b22949253b6c1dbb3708 Author: Christian Ambach Date: Tue Jul 5 17:04:15 2011 -0500 s3:build fix autoconf build on AIX 5.3 using ZLIB_LIBS as dependency made AIX make fail trying to find -lz as build target commit 94f24c4abbfa653dc3099f4ec05a94d36426abdd Author: Christian Ambach Date: Tue Jul 5 17:02:23 2011 -0500 .gitignore: add AIX WINBIND nss module this cleans up git status on AIX after building source3 commit 3d6dafcce1ac38cb0309f3aa3342025893dc656f Author: Christian Ambach Date: Tue Jun 28 18:01:22 2011 +0200 s3:lib fix non-empty blank lines commit f3088d135ded4a0ad47c754f3429c8e4c4dc7150 Author: Christian Ambach Date: Tue Jun 28 14:59:18 2011 +0200 s3:modules fix non-empty blank lines --- Summary of changes: .gitignore |1 + source3/Makefile.in|6 +++--- source3/lib/afs.c |6 +++--- source3/modules/gpfs.c |6 +++--- source3/smbd/vfs.c |2 +- 5 files changed, 11 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitignore b/.gitignore index 4bf1bae..309dfad 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ examples/VFS/skel_transparent.so semantic.cache nsswitch/libnss_winbind.so nsswitch/libnss_wins.so +nsswitch/WINBIND source3/config.cache source3/config.log source3/config.status diff --git a/source3/Makefile.in b/source3/Makefile.in index f674500..3cfc6fa 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1884,7 +1884,7 @@ bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ $(LIBTALL $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) -bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(ZLIB_LIBS) +bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @echo Linking $@ @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \ @@ -3128,14 +3128,14 @@ bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ $(LIBTALLOC) $( $(LIBWBCLIENT_LIBS) bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \ - $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(ZLIB_LIBS) + $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @echo Linking $@ @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) $(ZLIB_LIBS) \ $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) @INIPARSERLIBS@ -bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDB) $(ZLIB_LIBS) +bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDB) @echo "Linking shared library $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) -lpam $(DYNEXP) \ $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \ diff --git a/source3/lib/afs.c b/source3/lib/afs.c index d73e9df..61a588c 100644 --- a/source3/lib/afs.c +++ b/source3/lib/afs.c @@ -1,4 +1,4 @@ -/* +/* * Unix SMB/CIFS implementation. * Generate AFS tickets * Copyright (C) Volker Lendecke 2003 @@ -7,12 +7,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ad4a10d s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286) from 0bec150 s3: Fix an enum/int mixup http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ad4a10dd059c8b33cf7d606af292dd6f6653f3ef Author: Christian Ambach Date: Mon Jul 4 17:55:54 2011 +0200 s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286) when smbd tries to clean up locks after a premature end of a smb2 connection, lock_db has already been freed and so it crashes this patch changes the order in which items are freed so that lock_db is still around when it is needed Jeremy, Metze, please check Autobuild-User: Christian Ambach Autobuild-Date: Mon Jul 4 20:00:26 CEST 2011 on sn-devel-104 --- Summary of changes: source3/smbd/server_exit.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index c7a318d..05a4ece 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -152,9 +152,6 @@ static void exit_server_common(enum server_exit_reason how, rpc_lsarpc_shutdown(); } - locking_end(); - printing_end(); - /* * we need to force the order of freeing the following, * because smbd_msg_ctx is not a talloc child of smbd_server_conn. @@ -165,6 +162,9 @@ static void exit_server_common(enum server_exit_reason how, server_event_context_free(); TALLOC_FREE(smbd_memcache_ctx); + locking_end(); + printing_end(); + if (how != SERVER_EXIT_NORMAL) { DEBUGSEP(0); DEBUG(0,("Abnormal server exit: %s\n", -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 847ca0a s3:smbd do not panic when CTDB is unhealthy (Bug #8278) via d2adf96 docs: fix some whitespace via 1ae9a71 docs: fix a typo from a611769 rebuildexetendeddn: PEP8: Use spaces rather than tabs. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 847ca0a5d791d881be8d9a0721bf30399c80013b Author: Christian Ambach Date: Wed Jun 29 15:01:16 2011 +0200 s3:smbd do not panic when CTDB is unhealthy (Bug #8278) when CTDB is unhealthy, log a message and exit cleanly instead of creating a core file Autobuild-User: Christian Ambach Autobuild-Date: Thu Jun 30 13:18:12 CEST 2011 on sn-devel-104 commit d2adf96402a0ee3454778c8ffee970720def66a7 Author: Christian Ambach Date: Wed Jun 29 09:24:44 2011 +0200 docs: fix some whitespace replace spaces with tabs, removing whitespaces at end of lines commit 1ae9a7160c49b3afc401f219a25f721daa2835fd Author: Christian Ambach Date: Tue Jun 28 23:17:35 2011 +0200 docs: fix a typo --- Summary of changes: docs-xml/smbdotconf/protocol/enableasusupport.xml | 12 ++-- source3/smbd/server.c |9 + 2 files changed, 15 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/protocol/enableasusupport.xml b/docs-xml/smbdotconf/protocol/enableasusupport.xml index bb56b5a..8f25103 100644 --- a/docs-xml/smbdotconf/protocol/enableasusupport.xml +++ b/docs-xml/smbdotconf/protocol/enableasusupport.xml @@ -1,15 +1,15 @@ http://www.samba.org/samba/DTD/samba-doc";> +xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";> -Hosts running the "Advanced Server for Unix (ASU)" product -require some special accomodations such as creating a builtin [ADMIN$] +Hosts running the "Advanced Server for Unix (ASU)" product +require some special accomodations such as creating a builtin [ADMIN$] share that only supports IPC connections. The has been the default behavior in smbd for many years. However, certain Microsoft applications such as the Print Migrator tool require that the remote server support -an [ADMIN$} file share. Disabling this parameter allows for creating +an [ADMIN$] file share. Disabling this parameter allows for creating an [ADMIN$] file share in smb.conf. diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 5aa3ddb..03d971b 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -443,6 +443,15 @@ static void smbd_accept_connection(struct tevent_context *ev, "because too many files are open\n")); goto exit; } + if (lp_clustering() && + NT_STATUS_EQUAL(status, + NT_STATUS_INTERNAL_DB_ERROR)) { + DEBUG(1,("child process cannot initialize " +"because connection to CTDB " +"has failed\n")); + goto exit; + } + DEBUG(0,("reinit_after_fork() failed\n")); smb_panic("reinit_after_fork() failed"); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2ff0d58 s3:g_lock: g_lock.tdb should not be executable from ebd70d8 s3: Fix winbindd_wins_byname http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2ff0d5882fe5df0113eaaa4728bab4057a3f324b Author: Christian Ambach Date: Mon Jun 27 15:44:10 2011 +0200 s3:g_lock: g_lock.tdb should not be executable TDBs are not executable, so do not create the file with the execution bit set Autobuild-User: Christian Ambach Autobuild-Date: Mon Jun 27 17:09:12 CEST 2011 on sn-devel-104 --- Summary of changes: source3/lib/g_lock.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index 006ee36..4bda7c8 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -57,7 +57,8 @@ struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx, result->msg = msg; result->db = db_open(result, lock_path("g_lock.tdb"), 0, -TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, O_RDWR|O_CREAT, 0700); +TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, +O_RDWR|O_CREAT, 0600); if (result->db == NULL) { DEBUG(1, ("g_lock_init: Could not open g_lock.tdb")); TALLOC_FREE(result); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bb66504 s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share from acc9535 s4-errors: Import error maps from the source3/ unix -> ntstatus mapping http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bb66504dadf56366ea30697ae73673de3df08132 Author: Christian Ambach Date: Fri Jun 17 21:54:30 2011 +0200 s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share the time_audit module uses int instead of uint64 as return value in get_alloc_size so that sizes of files larger than 2 GB are cut of leading to wrong replies to NtCreateAndX and Windows clients giving up While checking the types of all functions, I found two more wrong return value types that needed correction Autobuild-User: Christian Ambach Autobuild-Date: Fri Jun 17 23:11:10 CEST 2011 on sn-devel-104 --- Summary of changes: source3/modules/vfs_time_audit.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 0f32619..25332e4 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -564,7 +564,7 @@ static SMB_OFF_T smb_time_audit_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset, int whence) { - ssize_t result; + SMB_OFF_T result; struct timespec ts1,ts2; double timediff; @@ -721,7 +721,7 @@ static uint64_t smb_time_audit_get_alloc_size(vfs_handle_struct *handle, files_struct *fsp, const SMB_STRUCT_STAT *sbuf) { - int result; + uint64_t result; struct timespec ts1,ts2; double timediff; @@ -2216,7 +2216,7 @@ static ssize_t smb_time_audit_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb) { - int result; + ssize_t result; struct timespec ts1,ts2; double timediff; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7639684 s3-utils: fix crash in net cache get from d575b2b samba-tool: disable validation on removing an empty attribute in dbcheck http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7639684f273e33e2b7f26660b3ec9d3f9979c5a7 Author: Christian Ambach Date: Tue Jun 14 09:09:07 2011 +0200 s3-utils: fix crash in net cache get free the blob correctly Autobuild-User: Christian Ambach Autobuild-Date: Tue Jun 14 12:01:59 CEST 2011 on sn-devel-104 --- Summary of changes: source3/utils/net_cache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index 88aff4e..afcb7a1 100644 --- a/source3/utils/net_cache.c +++ b/source3/utils/net_cache.c @@ -244,7 +244,7 @@ static int net_cache_get(struct net_context *c, int argc, const char **argv) if (gencache_get_data_blob(keystr, &value, &timeout, NULL)) { print_cache_entry(keystr, value, timeout, NULL); - SAFE_FREE(value.data); + data_blob_free(&value); return 0; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fe02f47 s3:vfs cleanup unused code in vfs_recycle from ed04cd0 s3:net fix a typo http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fe02f47de04e5e83273ad012effbe15794cd99c1 Author: Christian Ambach Date: Thu May 26 10:32:53 2011 +0200 s3:vfs cleanup unused code in vfs_recycle connect/disconnect do not more than just logging that they were called. this seems pretty useless Autobuild-User: Christian Ambach Autobuild-Date: Thu Jun 9 18:59:58 CEST 2011 on sn-devel-104 --- Summary of changes: source3/modules/vfs_recycle.c | 26 -- 1 files changed, 0 insertions(+), 26 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 1217ad5..5c4f870 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -35,33 +35,9 @@ static int vfs_recycle_debug_level = DBGC_VFS; #undef DBGC_CLASS #define DBGC_CLASS vfs_recycle_debug_level -static int recycle_connect(vfs_handle_struct *handle, const char *service, const char *user); -static void recycle_disconnect(vfs_handle_struct *handle); static int recycle_unlink(vfs_handle_struct *handle, const struct smb_filename *smb_fname); -static int recycle_connect(vfs_handle_struct *handle, const char *service, const char *user) -{ - int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); - - if (ret < 0) { - return ret; - } - - DEBUG(10,("recycle_connect() connect to service[%s] as user[%s].\n", - service,user)); - - return 0; -} - -static void recycle_disconnect(vfs_handle_struct *handle) -{ - DEBUG(10,("recycle_disconnect() connect to service[%s].\n", - lp_servicename(SNUM(handle->conn; - - SMB_VFS_NEXT_DISCONNECT(handle); -} - static const char *recycle_repository(vfs_handle_struct *handle) { const char *tmp_str = NULL; @@ -663,8 +639,6 @@ done: } static struct vfs_fn_pointers vfs_recycle_fns = { - .connect_fn = recycle_connect, - .disconnect = recycle_disconnect, .unlink = recycle_unlink }; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ed04cd0 s3:net fix a typo via 3219818 s3:modules fix some non-empty blank lines from d7fe70a s3:rpcclient: remove unused new_workgroup variable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ed04cd06a2224a9c3b624b609460347aa1e72ed2 Author: Christian Ambach Date: Thu Jun 9 15:07:15 2011 +0200 s3:net fix a typo fix a typo in the german message file Autobuild-User: Christian Ambach Autobuild-Date: Thu Jun 9 17:12:24 CEST 2011 on sn-devel-104 commit 32198182b3f90662107bbcf180cdc92ed8e0bc8d Author: Christian Ambach Date: Tue May 31 21:59:24 2011 +0200 s3:modules fix some non-empty blank lines --- Summary of changes: source3/locale/net/de.po |2 +- source3/modules/vfs_gpfs.h | 11 +-- 2 files changed, 6 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/locale/net/de.po b/source3/locale/net/de.po index 74fcca0..2244cd6 100644 --- a/source3/locale/net/de.po +++ b/source3/locale/net/de.po @@ -415,7 +415,7 @@ msgid " net getdomainsid" msgstr "" #: ../../utils/net.c:663 -msgid "Display the maximul RID currently used" +msgid "Display the maximum RID currently used" msgstr "Die höchste verwendete RID anzeigen" #: ../../utils/net.c:664 diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h index 8a314e1..4a05841 100644 --- a/source3/modules/vfs_gpfs.h +++ b/source3/modules/vfs_gpfs.h @@ -1,26 +1,25 @@ /* Unix SMB/CIFS implementation. Wrap gpfs calls in vfs functions. - + Copyright (C) Christian Ambach 2006 - + Major code contributions by Chetan Shringarpure and Gomati Mohanan - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 53829fd s3:modules properly terminate enums in nfs4 acl code via 425ac2c s3:vfs properly terminate enums in audit modules from 9c3e538 Fix bug #8150 - Ban 'dos charset = utf8' http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 53829fd4951fc1189d64ecef1c1f58d21f0fb38b Author: Christian Ambach Date: Tue May 24 19:01:22 2011 +0200 s3:modules properly terminate enums in nfs4 acl code same issue as with the audit modules: using a wrong parameter leads to smbd crash as lp_enum() will not terminate on last entry of the array Autobuild-User: Christian Ambach Autobuild-Date: Tue May 24 20:13:39 CEST 2011 on sn-devel-104 commit 425ac2c361fc1712c09b52f2cab0988597bf9b7e Author: Christian Ambach Date: Tue May 24 17:19:52 2011 +0200 s3:vfs properly terminate enums in audit modules without the proper terminations of the enums, invalid arguments for the audit modules will lead to a smbd crash as the loop in lp_enum() will attempt to access memory behind the array --- Summary of changes: source3/modules/nfs4_acls.c |4 +++- source3/modules/vfs_audit.c |6 -- source3/modules/vfs_extd_audit.c |6 -- source3/modules/vfs_full_audit.c |6 -- 4 files changed, 15 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 91e98f6..c841d83 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -398,13 +398,15 @@ static int smbacl4_get_vfs_params( { static const struct enum_list enum_smbacl4_modes[] = { { e_simple, "simple" }, - { e_special, "special" } + { e_special, "special" }, + { -1 , NULL } }; static const struct enum_list enum_smbacl4_acedups[] = { { e_dontcare, "dontcare" }, { e_reject, "reject" }, { e_ignore, "ignore" }, { e_merge, "merge" }, + { -1 , NULL } }; memset(params, 0, sizeof(smbacl4_vfs_params)); diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c index 349600f..8213baf 100644 --- a/source3/modules/vfs_audit.c +++ b/source3/modules/vfs_audit.c @@ -40,7 +40,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -61,7 +62,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c index 34a43c7..192b075 100644 --- a/source3/modules/vfs_extd_audit.c +++ b/source3/modules/vfs_extd_audit.c @@ -43,7 +43,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -64,7 +65,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index a723a0c..e4d9599 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -355,7 +355,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -375,7 +376,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via df650fa s3:smbd remove unused code from 8a2eff8 s3: Fork the echo handler only after SMB1 negprot is done http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit df650fa8cf4954245eced7eccb26388c24acee82 Author: Christian Ambach Date: Fri May 20 14:17:36 2011 +0200 s3:smbd remove unused code in the early CTDB days, the RELEASE_IP message was defined and some code was added to react on such a message to make smbd exit if the IP address it was using for the server socket is removed by CTDB. Later, it was discovered that we need to stop smbd immediately and logic was added to ctdb_conn to call release_ip() without going through the messaging system. So this code is not used and can be removed Autobuild-User: Christian Ambach Autobuild-Date: Fri May 20 16:18:24 CEST 2011 on sn-devel-104 --- Summary of changes: source3/librpc/idl/messaging.idl |1 - source3/smbd/process.c | 11 --- 2 files changed, 0 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl index 8618d53..0c0672c 100644 --- a/source3/librpc/idl/messaging.idl +++ b/source3/librpc/idl/messaging.idl @@ -75,7 +75,6 @@ interface messaging /* cluster reconfigure events */ MSG_SMB_BRL_VALIDATE= 0x0311, - MSG_SMB_RELEASE_IP = 0x0312, /*Close a specific file given a share entry. */ MSG_SMB_CLOSE_FILE = 0x0313, diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 7f04a7b..dc637de 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2375,15 +2375,6 @@ static void release_ip(const char *ip, void *priv) } } -static void msg_release_ip(struct messaging_context *msg_ctx, void *private_data, - uint32_t msg_type, struct server_id server_id, DATA_BLOB *data) -{ - struct smbd_server_connection *sconn = talloc_get_type_abort( - private_data, struct smbd_server_connection); - - release_ip((char *)data->data, sconn->client_id.addr); -} - #ifdef CLUSTER_SUPPORT static int client_get_tcp_info(int sock, struct sockaddr_storage *server, struct sockaddr_storage *client) @@ -3040,8 +3031,6 @@ void smbd_process(struct smbd_server_connection *sconn) /* register our message handlers */ messaging_register(sconn->msg_ctx, NULL, MSG_SMB_FORCE_TDIS, msg_force_tdis); - messaging_register(sconn->msg_ctx, sconn, - MSG_SMB_RELEASE_IP, msg_release_ip); messaging_register(sconn->msg_ctx, NULL, MSG_SMB_CLOSE_FILE, msg_close_file); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 642c6ba Fix Bug 8152 - smbd crash in release_ip() from 58b77f2 s3: Remove a use of cli_send_smb http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 642c6ba2b9c581bacfcb9a6cb4c5c95d446263ce Author: Christian Ambach Date: Thu May 19 18:13:40 2011 +0200 Fix Bug 8152 - smbd crash in release_ip() release_ip() needs the private_data, but it was never saved away to feed it into release_ip() later Autobuild-User: Christian Ambach Autobuild-Date: Thu May 19 21:21:14 CEST 2011 on sn-devel-104 --- Summary of changes: source3/lib/ctdbd_conn.c |5 + source3/smbd/process.c |3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index d271869..f422906 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1358,6 +1358,11 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn, } conn->release_ip_handler = release_ip_handler; + /* +* store the IP address of the server socket for later +* comparison in release_ip() +*/ + conn->release_ip_priv = private_data; /* * We want to be told about IP releases diff --git a/source3/smbd/process.c b/source3/smbd/process.c index d58baeb..5f9845c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2358,6 +2358,9 @@ static void release_ip(const char *ip, void *priv) p = addr + 7; } + DEBUG(10, ("Got release IP message for %s, " + "our address is %s\n", ip, p)); + if ((strcmp(p, ip) == 0) || ((p != addr) && strcmp(addr, ip) == 0)) { /* we can't afford to do a clean exit - that involves database writes, which would potentially mean we -- Samba Shared Repository
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via 2ec6c01 add myself to the team list from 24f9ef6 Fix url. http://gitweb.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit 2ec6c01a6eef8936bad89f81ec19969e905297e5 Author: Christian Ambach Date: Wed May 18 19:39:14 2011 +0200 add myself to the team 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 41b82e4..c540a60 100755 --- a/team/index.html +++ b/team/index.html @@ -43,6 +43,7 @@ mailing list and start contributing to the development of Samba. http://samba.org/~obnox/";>Michael Adam http://samba.org/~jra";>Jeremy Allison +mailto:a...@samba.org";>Christian Ambach mailto:anato...@samba.org";>Anatoliy Atanasov http://samba.org/~abartlet/";>Andrew Bartlett mailto:k...@samba.org";>Kai Blin -- Samba Website Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via dae276b s3:libsmb convert user-specified domain to uppercase from 28cba27 libcli/: Fix prototypes for all functions.(cherry picked from commit fa387825e2a4563ff85267848d8e9d206bf6db96) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit dae276b5abde77df24f297149267622e7a6dcddb Author: Christian Ambach Date: Fri May 6 13:16:26 2011 +0200 s3:libsmb convert user-specified domain to uppercase with client ntlmv2 auth = yes, there is a small difference between using smbclient -U user\domain and smbclient -U user -W domain if domain is provided in lowercase using -W will uppercase the given parameter, while picking the domain name from -U will not convert it to uppercase and this leads to failing NTLMv2 authentication with this patch, there is no difference between smbclient -U domain\user and smbclient -U user -W domain any more Autobuild-User: Christian Ambach Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104 --- Summary of changes: source3/libsmb/cliconnect.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 1383978..d3b2d38 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1976,6 +1976,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli, (p=strchr_m(user2,*lp_winbind_separator( { *p = 0; user = p+1; + strupper_m(user2); workgroup = user2; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 20179bb s3:libsmb convert user-specified domain to uppercase from 068f847 s3: Fix return check in nss_wins http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 20179bb5508cddca917732b6a459afa1d7136789 Author: Christian Ambach Date: Fri May 6 13:16:26 2011 +0200 s3:libsmb convert user-specified domain to uppercase with client ntlmv2 auth = yes, there is a small difference between using smbclient -U user\domain and smbclient -U user -W domain if domain is provided in lowercase using -W will uppercase the given parameter, while picking the domain name from -U will not convert it to uppercase and this leads to failing NTLMv2 authentication with this patch, there is no difference between smbclient -U domain\user and smbclient -U user -W domain any more Autobuild-User: Christian Ambach Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104 --- Summary of changes: source3/libsmb/cliconnect.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 7f48aee..828cb2c 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1977,6 +1977,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli, (p=strchr_m(user2,*lp_winbind_separator( { *p = 0; user = p+1; + strupper_m(user2); workgroup = user2; } -- Samba Shared Repository