autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2015-10-07-0607/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey/2015-10-07-0607/samba.stderr http://git.samba.org/autobuild.flakey/2015-10-07-0607/samba.stdout The top commit at the time of the failure was: commit 1bb46dae829d9cd74534669371246ada86b5841a Author: Ralph BoehmeDate: Sun Sep 27 02:01:47 2015 +0200 s3:smb3: rename smbd_smb2_first_negprot and pass expected seq_low This is in preperation of connection passing where we have to set seq_low to the mid from the negprot we've handed over. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Wed Oct 7 00:54:34 CEST 2015 on sn-devel-104
[SCM] NSS Wrapper Repository - branch master updated
The branch, master has been updated via 827183d tests: Only run shadow test when shadow.h is available via d2de6c7 nwrap: Check for setspent and getspnam functions via 03dc910 src: Add configure check for shadow.h from 0f179c8 tests: Add test for getspnam() function https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log - commit 827183dde440b3244e766fa680b874ecd4a628c5 Author: Andreas SchneiderDate: Tue Oct 6 10:53:00 2015 +0200 tests: Only run shadow test when shadow.h is available Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam commit d2de6c71699c0a2700b2829d296136f619e333eb Author: Andreas Schneider Date: Tue Oct 6 10:34:20 2015 +0200 nwrap: Check for setspent and getspnam functions Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam commit 03dc910bd3c21b34021a6e0836faa2412eb5ea0e Author: Andreas Schneider Date: Tue Oct 6 10:19:48 2015 +0200 src: Add configure check for shadow.h This is the first part to fix FreeBSD. Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam --- Summary of changes: ConfigureChecks.cmake | 4 config.h.cmake| 7 +++ src/nss_wrapper.c | 22 ++ tests/CMakeLists.txt | 13 + 4 files changed, 42 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b74ed8d..1b6ba01 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -49,6 +49,7 @@ endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2) # HEADERS check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(pwd.h HAVE_PWD_H) +check_include_file(shadow.h HAVE_SHADOW_H) check_include_file(grp.h HAVE_GRP_H) check_include_file(nss.h HAVE_NSS_H) check_include_file(nss_common.h HAVE_NSS_COMMON_H) @@ -62,6 +63,9 @@ check_function_exists(getpwnam_r HAVE_GETPWNAM_R) check_function_exists(getpwuid_r HAVE_GETPWUID_R) check_function_exists(getpwent_r HAVE_GETPWENT_R) +check_function_exists(setspent HAVE_SETSPENT) +check_function_exists(getspnam HAVE_GETSPNAM) + check_function_exists(getgrnam_r HAVE_GETGRNAM_R) check_function_exists(getgrgid_r HAVE_GETGRGID_R) check_function_exists(getgrent_r HAVE_GETGRENT_R) diff --git a/config.h.cmake b/config.h.cmake index b94b621..f00c2a4 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -16,6 +16,7 @@ #cmakedefine HAVE_SYS_TYPES_H 1 #cmakedefine HAVE_PWD_H 1 +#cmakedefine HAVE_SHADOW_H 1 #cmakedefine HAVE_GRP_H 1 #cmakedefine HAVE_NSS_H 1 #cmakedefine HAVE_NSS_COMMON_H 1 @@ -31,6 +32,12 @@ /* Define to 1 if you have the `getpwent_r' function. */ #cmakedefine HAVE_GETPWENT_R 1 +/* Define to 1 if you have the `setspent' function. */ +#cmakedefine HAVE_SETSPENT 1 + +/* Define to 1 if you have the `getspnam' function. */ +#cmakedefine HAVE_GETSPNAM 1 + /* Define to 1 if you have the `getgrnam_r' function. */ #cmakedefine HAVE_GETGRNAM_R 1 diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c index ca57dfb..e985bb3 100644 --- a/src/nss_wrapper.c +++ b/src/nss_wrapper.c @@ -61,7 +61,9 @@ #include #include +#ifdef HAVE_SHADOW_H #include +#endif /* HAVE_SHADOW_H */ #include #include @@ -501,6 +503,7 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line); static void nwrap_pw_unload(struct nwrap_cache *nwrap); /* shadow */ +#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) struct nwrap_sp { struct nwrap_cache *cache; @@ -514,6 +517,7 @@ struct nwrap_sp nwrap_sp_global; static bool nwrap_sp_parse_line(struct nwrap_cache *nwrap, char *line); static void nwrap_sp_unload(struct nwrap_cache *nwrap); +#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */ /* group */ struct nwrap_gr { @@ -1279,6 +1283,7 @@ static void nwrap_init(void) nwrap_pw_global.cache->unload = nwrap_pw_unload; /* shadow */ +#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) nwrap_sp_global.cache = &__nwrap_cache_sp; nwrap_sp_global.cache->path = getenv("NSS_WRAPPER_SHADOW"); @@ -1286,6 +1291,7 @@ static void nwrap_init(void) nwrap_sp_global.cache->private_data = _sp_global; nwrap_sp_global.cache->parse_line = nwrap_sp_parse_line; nwrap_sp_global.cache->unload = nwrap_sp_unload; +#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */ /* group */ nwrap_gr_global.cache = &__nwrap_cache_gr; @@ -1322,6 +1328,7 @@ bool nss_wrapper_enabled(void) return true; } +#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) bool nss_wrapper_shadow_enabled(void) { nwrap_init(); @@ -1333,6
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9893888 Change the libreadline word-break character set to only space, TAB and NL so that we can attempt to do tab completion across backslashes. from 1bb46da s3:smb3: rename smbd_smb2_first_negprot and pass expected seq_low https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9893888c5195ea6ebb7566a0277c6723aa4c81a1 Author: Richard SharpeDate: Fri Sep 18 16:19:54 2015 -0700 Change the libreadline word-break character set to only space, TAB and NL so that we can attempt to do tab completion across backslashes. This turned out to be all that was needed to enable cd to handle multiple directory levels. Signed-off-by: Richard Sharpe Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Oct 7 04:16:24 CEST 2015 on sn-devel-104 --- Summary of changes: libcli/smbreadline/smbreadline.c | 6 ++ 1 file changed, 6 insertions(+) Changeset truncated at 500 lines: diff --git a/libcli/smbreadline/smbreadline.c b/libcli/smbreadline/smbreadline.c index 80e10b0..c585554 100644 --- a/libcli/smbreadline/smbreadline.c +++ b/libcli/smbreadline/smbreadline.c @@ -137,6 +137,12 @@ char *smb_readline(const char *prompt, void (*callback)(void), works in all of them to date, but we get compiler warnings in some. */ rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn; + + /* +* We only want sensible characters as the word-break chars +* for the most part. This allows us to tab through a path. +*/ + rl_basic_word_break_characters = " \t\n"; } #if HAVE_DECL_RL_EVENT_HOOK -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1bb46da s3:smb3: rename smbd_smb2_first_negprot and pass expected seq_low via c0aa94e s3:smbd: add expected_seq_low arg to smbd_initialize_smb2 from 8de1ed6 s4: fix linking smbtorture on Solaris. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1bb46dae829d9cd74534669371246ada86b5841a Author: Ralph BoehmeDate: Sun Sep 27 02:01:47 2015 +0200 s3:smb3: rename smbd_smb2_first_negprot and pass expected seq_low This is in preperation of connection passing where we have to set seq_low to the mid from the negprot we've handed over. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Wed Oct 7 00:54:34 CEST 2015 on sn-devel-104 commit c0aa94ece086cb32df1819ef455343e9acb3832b Author: Ralph Boehme Date: Sun Sep 27 01:58:46 2015 +0200 s3:smbd: add expected_seq_low arg to smbd_initialize_smb2 This is in preparation of connection passing for multichannel where we have to set seq_low to the mid of the passed negprot. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- Summary of changes: source3/smbd/globals.h | 5 +++-- source3/smbd/process.c | 2 +- source3/smbd/smb2_negprot.c | 2 +- source3/smbd/smb2_server.c | 12 +++- 4 files changed, 12 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index b107049..b567a58 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -226,8 +226,9 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd, void reply_smb2002(struct smb_request *req, uint16_t choice); void reply_smb20ff(struct smb_request *req, uint16_t choice); -void smbd_smb2_first_negprot(struct smbXsrv_connection *xconn, -const uint8_t *inpdu, size_t size); +void smbd_smb2_process_negprot(struct smbXsrv_connection *xconn, + uint64_t expected_seq_low, + const uint8_t *inpdu, size_t size); DATA_BLOB smbd_smb2_generate_outbody(struct smbd_smb2_request *req, size_t size); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 74d34ef..8d9275c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1893,7 +1893,7 @@ static void process_smb(struct smbXsrv_connection *xconn, if (smbd_is_smb2_header(inbuf, nread)) { const uint8_t *inpdu = inbuf + NBT_HDR_SIZE; size_t pdulen = nread - NBT_HDR_SIZE; - smbd_smb2_first_negprot(xconn, inpdu, pdulen); + smbd_smb2_process_negprot(xconn, 0, inpdu, pdulen); return; } else if (nread >= smb_size && valid_smb_header(inbuf) && CVAL(inbuf, smb_com) != 0x72) { diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index 18382a9..c04fbca 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -60,7 +60,7 @@ static void reply_smb20xx(struct smb_request *req, uint16_t dialect) req->outbuf = NULL; - smbd_smb2_first_negprot(req->xconn, smb2_inpdu, len); + smbd_smb2_process_negprot(req->xconn, 0, smb2_inpdu, len); return; } diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index a53ddf8..7120ce5 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -200,11 +200,12 @@ bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size) return true; } -static NTSTATUS smbd_initialize_smb2(struct smbXsrv_connection *xconn) +static NTSTATUS smbd_initialize_smb2(struct smbXsrv_connection *xconn, +uint64_t expected_seq_low) { TALLOC_FREE(xconn->transport.fde); - xconn->smb2.credits.seq_low = 0; + xconn->smb2.credits.seq_low = expected_seq_low; xconn->smb2.credits.seq_range = 1; xconn->smb2.credits.granted = 1; xconn->smb2.credits.max = lp_smb2_max_credits(); @@ -3149,8 +3150,9 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbXsrv_connection *xconn return NT_STATUS_OK; } -void smbd_smb2_first_negprot(struct smbXsrv_connection *xconn, -const uint8_t *inpdu, size_t size) +void
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5d7eaf9 vfs_fruit: return value of ad_pack in vfs_fruit.c from cc93469 lib: Fix CID 1128553 Unchecked return value from library https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5d7eaf959a0f11be878f698305fcb8908d7ba047 Author: Ralph BoehmeDate: Sun Sep 27 12:11:31 2015 +0200 vfs_fruit: return value of ad_pack in vfs_fruit.c ad_pack() in vfs_fruit.c returns false on failure and 0 on success - i.e. return value is interpreted as success even when it fails. Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Oct 6 16:14:42 CEST 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_fruit.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index c90699f..8393366 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -567,7 +567,7 @@ static bool ad_pack(struct adouble *ad) } RSSVAL(ad->ad_data, ADEDOFF_NENTRIES, nent); - return 0; + return true; } /** @@ -949,8 +949,9 @@ static ssize_t ad_header_read_rsrc(struct adouble *ad, const char *path) /* * Can't use ad_write() because we might not have a fsp */ - rc = ad_pack(ad); - if (rc != 0) { + ok = ad_pack(ad); + if (!ok) { + rc = -1; goto exit; } /* FIXME: direct sys_pwrite(), don't have an fsp */ @@ -1211,10 +1212,11 @@ static int ad_write(struct adouble *ad, const char *path) { int rc = 0; ssize_t len; + bool ok; - rc = ad_pack(ad); - if (rc != 0) { - goto exit; + ok = ad_pack(ad); + if (!ok) { + return -1; } switch (ad->ad_type) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cc93469 lib: Fix CID 1128553 Unchecked return value from library via 0db470d lib: Fix CID 1325733 Uninitialized scalar variable via 70dbba9 s3:ctdbd_conn: make sure we destroy tevent_fd before closing the socket from 97bb100 lib: Pass sockname and timeout to ctdbd_probe() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cc93469a047ef92036c3e0eed24933d3e2c1b353 Author: Volker LendeckeDate: Tue Oct 6 09:57:59 2015 +0200 lib: Fix CID 1128553 Unchecked return value from library At the same time, avoid chmod in favor of fchmod Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Oct 6 13:12:48 CEST 2015 on sn-devel-104 commit 0db470df9172bb855409f4ba51dfc95e87e90c55 Author: Volker Lendecke Date: Tue Oct 6 09:54:19 2015 +0200 lib: Fix CID 1325733 Uninitialized scalar variable Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher commit 70dbba96e311449575f571db68710584fc991234 Author: Stefan Metzmacher Date: Mon Oct 5 15:57:42 2015 +0200 s3:ctdbd_conn: make sure we destroy tevent_fd before closing the socket BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Günther Deschner --- Summary of changes: source3/lib/ctdbd_conn.c | 7 ++- source3/lib/dbwrap/dbwrap_ctdb.c | 18 +- 2 files changed, 19 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index da2c3a9..c743356 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -405,7 +405,11 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid, static int ctdbd_connection_destructor(struct ctdbd_connection *c) { - close(c->fd); + TALLOC_FREE(c->fde); + if (c->fd != -1) { + close(c->fd); + c->fd = -1; + } return 0; } /* @@ -690,6 +694,7 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn, if (hdr->operation != CTDB_REPLY_CONTROL) { DEBUG(0, ("received invalid reply\n")); + status = NT_STATUS_INVALID_NETWORK_RESPONSE; goto fail; } reply = (struct ctdb_reply_control *)hdr; diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 9852bc7..9402bdd 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1597,11 +1597,6 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, tdb_flags &= TDB_SEQNUM|TDB_VOLATILE| TDB_MUTEX_LOCKING|TDB_CLEAR_IF_FIRST; - /* honor permissions if user has specified O_CREAT */ - if (open_flags & O_CREAT) { - chmod(db_path, mode); - } - prio.db_id = db_ctdb->db_id; prio.priority = lock_order; @@ -1653,6 +1648,19 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, } talloc_free(db_path); + /* honor permissions if user has specified O_CREAT */ + if (open_flags & O_CREAT) { + int fd, ret; + fd = tdb_fd(db_ctdb->wtdb->tdb); + ret = fchmod(fd, mode); + if (ret == -1) { + DBG_WARNING("%s: fchmod failed: %s\n", __func__, + strerror(errno)); + TALLOC_FREE(result); + return NULL; + } + } + if (result->persistent) { db_ctdb->lock_ctx = g_lock_ctx_init(db_ctdb, ctdb_conn_msg_ctx(conn)); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8de1ed6 s4: fix linking smbtorture on Solaris. from 5d7eaf9 vfs_fruit: return value of ad_pack in vfs_fruit.c https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8de1ed6d6e660760483a17f34842979384a655f9 Author: Tom SchulzDate: Mon Oct 5 22:19:49 2015 +0200 s4: fix linking smbtorture on Solaris. Don't test getgrouplist if we do not have it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11512 Signed-off-by: Tom Schulz Reviewed-by: Michael Adam Reviewed-by: Ralph Boehme Autobuild-User(master): Michael Adam Autobuild-Date(master): Tue Oct 6 19:15:22 CEST 2015 on sn-devel-104 --- Summary of changes: source4/torture/local/nss_tests.c | 4 1 file changed, 4 insertions(+) Changeset truncated at 500 lines: diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c index e814dba..2cd6122 100644 --- a/source4/torture/local/nss_tests.c +++ b/source4/torture/local/nss_tests.c @@ -698,6 +698,7 @@ static bool test_group_r_cross(struct torture_context *tctx) return true; } +#ifdef HAVE_GETGROUPLIST static bool test_getgrouplist(struct torture_context *tctx, const char *user, gid_t gid, @@ -732,6 +733,7 @@ static bool test_getgrouplist(struct torture_context *tctx, return true; } +#endif /* HAVE_GETGROUPLIST */ static bool test_user_in_group(struct torture_context *tctx, const struct passwd *pwd, @@ -759,12 +761,14 @@ static bool test_membership_user(struct torture_context *tctx, int g, i; bool primary_group_had_user_member = false; +#ifdef HAVE_GETGROUPLIST torture_assert(tctx, test_getgrouplist(tctx, pwd->pw_name, pwd->pw_gid, _groups, _user_groups), "failed to test getgrouplist"); +#endif /* HAVE_GETGROUPLIST */ for (g=0; g < num_user_groups; g++) { torture_assert(tctx, test_getgrgid(tctx, user_groups[g], NULL), -- Samba Shared Repository