The branch, master has been updated via 076f30b0607 winbindd: Enhance xids2sids debugging via c516394ed90 smbd: Avoid sending S-1-22- to winbind via 65c05357309 winbind: Enhance xids2sids debugging via e4ae59bbb29 torture4: Solaris cc can't deal with empty initializers via 74cf2a1bda9 build:docs: Get rid of hardcoded 'bin/default' via 51bc92d8c81 build: Get rid of hardcoded 'bin/default' in includes from 87149445af2 s4/scripting/bin: open unicode files with utf8 encoding and write unicode string
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 076f30b060738cb938c22c965b7ffd4b4089835d Author: Volker Lendecke <v...@samba.org> Date: Wed Feb 6 17:06:28 2019 +0100 winbindd: Enhance xids2sids debugging Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Fri Feb 8 13:30:32 CET 2019 on sn-devel-144 commit c516394ed90a52bc8712de845a16c7293ef7fbda Author: Volker Lendecke <v...@samba.org> Date: Wed Feb 6 17:02:53 2019 +0100 smbd: Avoid sending S-1-22- to winbind Sending S-1-22-x to a typeless sids2xids call will make winbind prime the reverse xids2sids cache, which is very likely the wrong mapping. Add a check that avoids bothering the winbind pipe when it's clear this can't work anyway. Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> commit 65c05357309c6e366d1731ced27c347f29b3f281 Author: Volker Lendecke <v...@samba.org> Date: Wed Feb 6 13:10:08 2019 +0100 winbind: Enhance xids2sids debugging Print what was requested and returned Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> commit e4ae59bbb2965faaab130cf56d8cdbe8820198c0 Author: Volker Lendecke <v...@samba.org> Date: Thu Jan 24 10:39:38 2019 +0100 torture4: Solaris cc can't deal with empty initializers Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> commit 74cf2a1bda9bcd8db9201f0cc0a69f5ec05ecf82 Author: Aliaksei Karaliou <akaral...@panasas.com> Date: Tue Jan 29 08:45:26 2019 -0500 build:docs: Get rid of hardcoded 'bin/default' Build scripts for documentation still contain hardcoded path to build destination rather than use proper final build path variables. Signed-off-by: Aliaksei Karaliou <akaral...@panasas.com> Reviewed-by: Alexander Bokovoy <a...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> commit 51bc92d8c81248504b65131790ce9eab8bbc31f6 Author: Aliaksei Karaliou <akaral...@panasas.com> Date: Mon Jan 28 05:51:49 2019 -0500 build: Get rid of hardcoded 'bin/default' in includes Removed occurrences of bin/default used in #include directive for auto-generated headers residing in build directory. Build system is capable of resolving path to such headers by itself without extra hardcoded path to build directory. Signed-off-by: Aliaksei Karaliou <akaral...@panasas.com> Reviewed-by: Alexander Bokovoy <a...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/wafsamba.py | 2 +- librpc/ndr/ndr_negoex.h | 2 +- source3/passdb/lookup_sid.c | 12 ++++++++++++ source3/rpc_server/spoolss/srv_iremotewinspool.c | 4 ++-- source3/winbindd/wb_xids2sids.c | 5 +++++ source3/winbindd/winbindd_xids_to_sids.c | 8 ++++++-- source4/torture/smb2/delete-on-close.c | 14 +++++++------- wscript_build | 2 +- 8 files changed, 35 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index a077026c690..9d8251d60bf 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -920,7 +920,7 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None): '''build and install manual pages''' bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl' bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl' - bld.env.SAMBA_CATALOG = bld.srcnode.abspath() + '/bin/default/docs-xml/build/catalog.xml' + bld.env.SAMBA_CATALOG = bld.bldnode.abspath() + '/docs-xml/build/catalog.xml' bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog file://' + bld.env.SAMBA_CATALOG for m in manpages.split(): diff --git a/librpc/ndr/ndr_negoex.h b/librpc/ndr/ndr_negoex.h index 1be07d83c52..d3c39b27388 100644 --- a/librpc/ndr/ndr_negoex.h +++ b/librpc/ndr/ndr_negoex.h @@ -20,7 +20,7 @@ */ #include "librpc/ndr/libndr.h" -#include "bin/default/librpc/gen_ndr/negoex.h" +#include "librpc/gen_ndr/negoex.h" _PUBLIC_ void ndr_print_negoex_BYTE_VECTOR(struct ndr_print *ndr, const char *name, const struct negoex_BYTE_VECTOR *r); _PUBLIC_ enum ndr_err_code ndr_push_negoex_BYTE_VECTOR(struct ndr_push *ndr, int ndr_flags, const struct negoex_BYTE_VECTOR *r); diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 6bda783fa03..bf3ded6683e 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1489,6 +1489,12 @@ bool sid_to_uid(const struct dom_sid *psid, uid_t *puid) return true; } + if (sid_check_is_in_unix_groups(psid)) { + DBG_DEBUG("SID %s is a group, failing\n", + dom_sid_str_buf(psid, &buf)); + return false; + } + /* Check the winbindd cache directly. */ ret = idmap_cache_find_sid2uid(psid, puid, &expired); @@ -1545,6 +1551,12 @@ bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid) return true; } + if (sid_check_is_in_unix_users(psid)) { + DBG_DEBUG("SID %s is a user, failing\n", + dom_sid_str_buf(psid, &buf)); + return false; + } + /* Check the winbindd cache directly. */ ret = idmap_cache_find_sid2gid(psid, pgid, &expired); diff --git a/source3/rpc_server/spoolss/srv_iremotewinspool.c b/source3/rpc_server/spoolss/srv_iremotewinspool.c index ea52348f453..afab021d63e 100644 --- a/source3/rpc_server/spoolss/srv_iremotewinspool.c +++ b/source3/rpc_server/spoolss/srv_iremotewinspool.c @@ -5,8 +5,8 @@ #include "includes.h" #include "ntdomain.h" -#include "bin/default/librpc/gen_ndr/srv_winspool.h" -#include "bin/default/librpc/gen_ndr/srv_spoolss.c" +#include "librpc/gen_ndr/srv_winspool.h" +#include "librpc/gen_ndr/srv_spoolss.c" static bool api_winspool_SyncRegisterForRemoteNotifications(struct pipes_struct *p) { diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index fa4ba983720..310a645cdff 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -481,6 +481,11 @@ struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx, } if (ok && !expired) { + struct dom_sid_buf buf; + DBG_DEBUG("Found %cID in cache: %s\n", + xids[i].type == ID_TYPE_UID?'U':'G', + dom_sid_str_buf(&sid, &buf)); + sid_copy(&state->sids[i], &sid); } } diff --git a/source3/winbindd/winbindd_xids_to_sids.c b/source3/winbindd/winbindd_xids_to_sids.c index 29caccd0468..b0f4550f773 100644 --- a/source3/winbindd/winbindd_xids_to_sids.c +++ b/source3/winbindd/winbindd_xids_to_sids.c @@ -67,7 +67,9 @@ struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - DEBUG(10, ("num_xids: %d\n", (int)state->num_xids)); + DBG_DEBUG("num_xids: %"PRIu32"\n%s\n", + state->num_xids, + (char *)request->extra_data.data); subreq = wb_xids2sids_send(state, ev, state->xids, state->num_xids); if (tevent_req_nomem(subreq, req)) { @@ -103,7 +105,7 @@ NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req, uint32_t i; if (tevent_req_is_nterror(req, &status)) { - DEBUG(5, ("Could not convert sids: %s\n", nt_errstr(status))); + DBG_INFO("Could not convert xids: %s\n", nt_errstr(status)); return status; } @@ -128,6 +130,8 @@ NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req, } } + DBG_DEBUG("sids:\n%s\n", result); + response->extra_data.data = result; response->length += talloc_get_size(result); diff --git a/source4/torture/smb2/delete-on-close.c b/source4/torture/smb2/delete-on-close.c index 12cdb8540b8..3c495750f43 100644 --- a/source4/torture/smb2/delete-on-close.c +++ b/source4/torture/smb2/delete-on-close.c @@ -584,9 +584,9 @@ static bool test_doc_read_only(struct torture_context *tctx, struct smb2_tree *tree) { struct smb2_handle dir_handle; - union smb_setfileinfo sfinfo = { }; - struct smb2_create create = { }; - struct smb2_close close = { }; + union smb_setfileinfo sfinfo = {{0}}; + struct smb2_create create = {0}; + struct smb2_close close = {0}; NTSTATUS status, expected_status; bool ret = true, delete_readonly; @@ -603,7 +603,7 @@ static bool test_doc_read_only(struct torture_context *tctx, torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "CREATE directory failed\n"); - create = (struct smb2_create) { }; + create = (struct smb2_create) {0}; create.in.desired_access = SEC_RIGHTS_DIR_ALL; create.in.create_options = NTCREATEX_OPTIONS_NON_DIRECTORY_FILE | NTCREATEX_OPTIONS_DELETE_ON_CLOSE; @@ -628,7 +628,7 @@ static bool test_doc_read_only(struct torture_context *tctx, torture_comment(tctx, "Creating file with READ_ONLY attribute.\n"); - create = (struct smb2_create) { }; + create = (struct smb2_create) {0}; create.in.desired_access = SEC_RIGHTS_DIR_ALL; create.in.create_options = NTCREATEX_OPTIONS_NON_DIRECTORY_FILE; create.in.file_attributes = FILE_ATTRIBUTE_READONLY; @@ -649,7 +649,7 @@ static bool test_doc_read_only(struct torture_context *tctx, torture_comment(tctx, "Testing CREATE with DELETE_ON_CLOSE on " "READ_ONLY attribute file.\n"); - create = (struct smb2_create) { }; + create = (struct smb2_create) {0}; create.in.desired_access = SEC_RIGHTS_FILE_READ | SEC_STD_DELETE; create.in.create_options = NTCREATEX_OPTIONS_DELETE_ON_CLOSE; create.in.file_attributes = 0; @@ -667,7 +667,7 @@ static bool test_doc_read_only(struct torture_context *tctx, torture_comment(tctx, "Testing setting DELETE_ON_CLOSE disposition on " " file with READONLY attribute.\n"); - create = (struct smb2_create) { }; + create = (struct smb2_create) {0}; create.in.desired_access = SEC_RIGHTS_FILE_READ | SEC_STD_DELETE;; create.in.create_options = 0; create.in.file_attributes = 0; diff --git a/wscript_build b/wscript_build index d59aca8e1b8..a72094838d4 100644 --- a/wscript_build +++ b/wscript_build @@ -29,7 +29,7 @@ bld.SAMBA_MKVERSION('version.h') # bld.ENABLE_MAGIC_ORDERING() bld.env.ABS_TOP_SRCDIR = bld.srcnode.abspath() + '/docs-xml' -bld.env.ABS_TOP_BUILDDIR = bld.srcnode.abspath() + '/bin/default/docs-xml' +bld.env.ABS_TOP_BUILDDIR = bld.bldnode.abspath() + '/docs-xml' bld.CONFIGURE_FILE('docs-xml/build/catalog.xml', ABS_TOP_BUILDDIR = bld.env.ABS_TOP_BUILDDIR, ABS_TOP_SRCDIR=bld.env.ABS_TOP_SRCDIR) -- Samba Shared Repository