Build status as of Mon Sep 13 06:00:01 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-09-12 00:00:03.0 -0600 +++ /home/build/master/cache/broken_results.txt 2010-09-13 00:00:02.0 -0600 @@ -1,9 +1,9 @@ -Build status as of Sun Sep 12 06:00:02 2010 +Build status as of Mon Sep 13 06:00:01 2010 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 32 4 0 +ccache 32 2 0 ccache-maint 30 2 0 ldb 32 11 0 libreplace 32 11 0 @@ -14,9 +14,9 @@ samba-docs 0 0 0 samba-web0 0 0 samba_3_current 32 32 4 -samba_3_master 32 29 0 +samba_3_master 32 30 0 samba_3_next 32 31 5 -samba_4_0_waf 36 32 2 +samba_4_0_waf 36 34 4 talloc 32 6 0 tdb 30 8 0
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fe958c0 Revert s4:samldb LDB module - simplify the message handling on add and modify operations from 1237128 s4:samldb LDB module - remove a disastrous talloc_free http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fe958c009be224be91e9ed4cdafe5330735d0a38 Author: Matthias Dieter Wallnöfer m...@samba.org Date: Mon Sep 13 10:38:08 2010 +0200 Revert s4:samldb LDB module - simplify the message handling on add and modify operations This reverts commit 1d94bb3ad4d9c6de3b77ed4690a54ebf2399cc0d. This commit causes unconditional behaviour (sometimes it works, sometimes not) -sorry for introducing this. I will rework this further. --- Summary of changes: source4/dsdb/samdb/ldb_modules/samldb.c | 59 +- 1 files changed, 33 insertions(+), 26 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 38ac5fb..7562122 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1077,9 +1077,11 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req) } /* build the new msg */ - req-op.add.message = ac-msg = ldb_msg_copy_shallow(req, - req-op.add.message); - if (ac-msg == NULL) { + ac-msg = ldb_msg_copy(ac, ac-req-op.add.message); + if (!ac-msg) { + talloc_free(ac); + ldb_debug(ldb, LDB_DEBUG_FATAL, + samldb_add: ldb_msg_copy failed!\n); return ldb_operr(ldb); } @@ -1133,6 +1135,7 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; struct samldb_ctx *ac; + struct ldb_message *msg; struct ldb_message_element *el, *el2; int ret; uint32_t account_type; @@ -1163,34 +1166,35 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req) return ldb_operr(ldb); } - /* build the new msg */ - req-op.mod.message = ac-msg = ldb_msg_copy_shallow(req, - req-op.mod.message); - if (ac-msg == NULL) { - return ldb_operr(ldb); - } + /* TODO: do not modify original request, create a new one */ - el = ldb_msg_find_element(ac-msg, groupType); + el = ldb_msg_find_element(req-op.mod.message, groupType); if (el (LDB_FLAG_MOD_TYPE(el-flags) == LDB_FLAG_MOD_REPLACE) el-num_values == 1) { uint32_t group_type; + req-op.mod.message = msg = ldb_msg_copy_shallow(req, + req-op.mod.message); + group_type = strtoul((const char *)el-values[0].data, NULL, 0); account_type = ds_gtype2atype(group_type); - ret = samdb_msg_add_uint(ldb, ac-msg, ac-msg, + ret = samdb_msg_add_uint(ldb, msg, msg, sAMAccountType, account_type); if (ret != LDB_SUCCESS) { return ret; } - el2 = ldb_msg_find_element(ac-msg, sAMAccountType); + el2 = ldb_msg_find_element(msg, sAMAccountType); el2-flags = LDB_FLAG_MOD_REPLACE; } if (el (LDB_FLAG_MOD_TYPE(el-flags) == LDB_FLAG_MOD_DELETE)) { return LDB_ERR_UNWILLING_TO_PERFORM; } - el = ldb_msg_find_element(ac-msg, primaryGroupID); + el = ldb_msg_find_element(req-op.mod.message, primaryGroupID); if (el (LDB_FLAG_MOD_TYPE(el-flags) == LDB_FLAG_MOD_REPLACE) el-num_values == 1) { + req-op.mod.message = ac-msg = ldb_msg_copy_shallow(req, + req-op.mod.message); + ret = samldb_prim_group_change(ac); if (ret != LDB_SUCCESS) { return ret; @@ -1200,35 +1204,36 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req) return LDB_ERR_UNWILLING_TO_PERFORM; } - el = ldb_msg_find_element(ac-msg, userAccountControl); + el = ldb_msg_find_element(req-op.mod.message, userAccountControl); if (el (LDB_FLAG_MOD_TYPE(el-flags) == LDB_FLAG_MOD_REPLACE) el-num_values == 1) { uint32_t user_account_control; + req-op.mod.message = msg = ldb_msg_copy_shallow(req, + req-op.mod.message); + user_account_control = strtoul((const char *)el-values[0].data, NULL, 0);
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 02a8a96 s3/winbind: use mono time for startup timeout check via b7fcbb2 libreplace: clock_gettime sets errno from dde50b4 Add check missing from previous patch after talloc_strdup(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 02a8a96fd878542099644f84ad245a333124f97a Author: Björn Jacke b...@sernet.de Date: Fri Sep 10 21:36:20 2010 +0200 s3/winbind: use mono time for startup timeout check commit b7fcbb2955689b59822365593d2431f7f4bb5e34 Author: Björn Jacke b...@sernet.de Date: Fri Sep 10 21:03:17 2010 +0200 libreplace: clock_gettime sets errno --- Summary of changes: lib/replace/replace.c|3 ++- source3/winbindd/winbindd.h |2 +- source3/winbindd/winbindd_cm.c |4 ++-- source3/winbindd/winbindd_dual.c |6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/replace.c b/lib/replace/replace.c index f3459dd..a00f705 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -776,7 +776,8 @@ int rep_clock_gettime(clockid_t clk_id, struct timespec *tp) tp-tv_nsec = tval.tv_usec * 1000; break; default: - return EINVAL; + errno = EINVAL; + return -1; } return 0; } diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h index 77aab85..68dabfe 100644 --- a/source3/winbindd/winbindd.h +++ b/source3/winbindd/winbindd.h @@ -155,7 +155,7 @@ struct winbindd_domain { bool primary; /* is this our primary domain ? */ bool internal; /* BUILTIN and member SAM */ bool online; /* is this domain available ? */ - time_t startup_time; /* When we set startup true. */ + time_t startup_time; /* When we set startup true. monotonic clock */ bool startup; /* are we in the first 30 seconds after startup_time ? */ bool can_do_samlogon_ex; /* Due to the lack of finer control what type diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index fca0a91..8f95031 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -291,7 +291,7 @@ static void check_domain_online_handler(struct event_context *ctx, /* Are we still in startup mode ? */ - if (domain-startup (now.tv_sec domain-startup_time + 30)) { + if (domain-startup (time_mono(NULL) domain-startup_time + 30)) { /* No longer in startup mode. */ DEBUG(10,(check_domain_online_handler: domain %s no longer in 'startup' mode.\n, domain-name )); @@ -508,7 +508,7 @@ void set_domain_online_request(struct winbindd_domain *domain) GetTimeOfDay(tev); /* Go into startup mode again. */ - domain-startup_time = tev.tv_sec; + domain-startup_time = time_mono(NULL); domain-startup = True; tev.tv_sec += 5; diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index f78ae2d..4cec7c2 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -1306,7 +1306,7 @@ static bool fork_domain_child(struct winbindd_child *child) * try to bring domain online after fork. */ if ( child-domain ) { child-domain-startup = True; - child-domain-startup_time = time(NULL); + child-domain-startup_time = time_mono(NULL); /* we can be in primary domain or in trusted domain * If we are in trusted domain, set the primary domain * in start-up mode */ @@ -1314,7 +1314,7 @@ static bool fork_domain_child(struct winbindd_child *child) set_domain_online_request(child-domain); if (!(child-domain-primary)) { primary_domain-startup = True; - primary_domain-startup_time = time(NULL); + primary_domain-startup_time = time_mono(NULL); set_domain_online_request(primary_domain); } } @@ -1389,7 +1389,7 @@ static bool fork_domain_child(struct winbindd_child *child) GetTimeOfDay(now); if (child-domain child-domain-startup - (now.tv_sec child-domain-startup_time + 30)) { + (time_mono(NULL) child-domain-startup_time + 30)) { /* No longer in startup mode. */
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d10b2c0 lib/tdb: change version to 1.2.4 after hash checking improvments via 786b726 tdb: put example hashes into header, so we notice incorrect hash_fn. via f77708e tdb: fix tdb_check() on other-endian tdbs. via 82e5644 tdb: fix tdb_check() on read-only TDBs to actually work. via 9e0deff tdb: make check more robust against recovery failures. from fe958c0 Revert s4:samldb LDB module - simplify the message handling on add and modify operations http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d10b2c07be2cfdca09f07d3045ce891989d83a09 Author: Stefan Metzmacher me...@samba.org Date: Fri Sep 10 04:47:32 2010 +0200 lib/tdb: change version to 1.2.4 after hash checking improvments lib/tdb: change version to 1.2.4 after hash checking improvments metze Signed-off-by: Rusty Russell ru...@rustcorp.com.au commit 786b7263000dedcb97e7369402e2e9dc967e36c4 Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 20:05:59 2010 +0930 tdb: put example hashes into header, so we notice incorrect hash_fn. This is Stefan Metzmacher me...@samba.org's patch with minor changes: 1) Use the TDB_MAGIC constant so both hashes aren't of strings. 2) Check the hash in tdb_check (paranoia, really). 3) Additional check in the (unlikely!) case where both examples hash to 0. 4) Cosmetic changes to var names and complaint message. Signed-off-by: Rusty Russell ru...@rustcorp.com.au commit f77708e96268d18abbfb038f4e78fe9e11a2856f Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:59:18 2010 +0930 tdb: fix tdb_check() on other-endian tdbs. We must not endian-convert the magic string, just the rest. Signed-off-by: Rusty Russell ru...@rustcorp.com.au commit 82e5644c9dbf5c2e4b0c4183372e0a79203d32a5 Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:58:23 2010 +0930 tdb: fix tdb_check() on read-only TDBs to actually work. Commit bc1c82ea137 Fix tdb_check() to work with read-only tdb databases. claimed to do this, but tdb_lockall_read() fails on read-only databases. Also make sure we can still do tdb_check() inside a transaction (weird, but we previously allowed it so don't break the API). Signed-off-by: Rusty Russell ru...@rustcorp.com.au commit 9e0deff904877068d19b41e965732f145c2554b9 Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:55:26 2010 +0930 tdb: make check more robust against recovery failures. We can end up with dead areas when we die during transaction commit; tdb_check() fails on such a (valid) database. This is particularly noticable now we no longer truncate on recovery; if the recovery area was at the end of the file we used to remove it that way. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- Summary of changes: lib/tdb/common/check.c | 71 +++-- lib/tdb/common/open.c| 55 - lib/tdb/common/tdb_private.h |6 +++- lib/tdb/configure.ac |2 +- lib/tdb/wscript |2 +- 5 files changed, 121 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c index 2c64043..b1b98d4 100644 --- a/lib/tdb/common/check.c +++ b/lib/tdb/common/check.c @@ -28,8 +28,9 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery) { struct tdb_header hdr; + uint32_t h1, h2; - if (tdb-methods-tdb_read(tdb, 0, hdr, sizeof(hdr), DOCONV()) == -1) + if (tdb-methods-tdb_read(tdb, 0, hdr, sizeof(hdr), 0) == -1) return false; if (strcmp(hdr.magic_food, TDB_MAGIC_FOOD) != 0) goto corrupt; @@ -41,6 +42,11 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery) if (hdr.rwlocks != 0) goto corrupt; + tdb_header_hash(tdb, h1, h2); + if (hdr.magic1_hash hdr.magic2_hash + (hdr.magic1_hash != h1 || hdr.magic2_hash != h2)) + goto corrupt; + if (hdr.hash_size == 0) goto corrupt; @@ -301,6 +307,21 @@ static bool tdb_check_free_record(struct tdb_context *tdb, return true; } +/* Slow, but should be very rare. */ +static size_t dead_space(struct tdb_context *tdb, tdb_off_t off) +{ + size_t len; + + for (len = 0; off + len tdb-map_size; len++) { + char c; + if (tdb-methods-tdb_read(tdb, off, c, 1, 0)) + return 0; + if (c != 0 c != 0x42) + break; + } + return len; +} + int tdb_check(struct
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8768f62 ntlm_check: Fix some nonempty blank lines from d10b2c0 lib/tdb: change version to 1.2.4 after hash checking improvments http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8768f627dc2c6994e551ed15c204b6f26d496dd7 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:08:40 2010 +0200 ntlm_check: Fix some nonempty blank lines --- Summary of changes: libcli/auth/ntlm_check.c | 42 +- 1 files changed, 21 insertions(+), 21 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/auth/ntlm_check.c b/libcli/auth/ntlm_check.c index 5a430bd..da16ce2 100644 --- a/libcli/auth/ntlm_check.c +++ b/libcli/auth/ntlm_check.c @@ -4,17 +4,17 @@ Copyright (C) Andrew Bartlett abart...@samba.org 2001-2004 Copyright (C) Gerald Carter 2003 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - + 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/. */ @@ -36,19 +36,19 @@ static bool smb_pwd_check_ntlmv1(TALLOC_CTX *mem_ctx, { /* Finish the encryption of part_passwd. */ uint8_t p24[24]; - + if (part_passwd == NULL) { DEBUG(10,(No password set - DISALLOWING access\n)); /* No password set - always false ! */ return false; } - + if (sec_blob-length != 8) { DEBUG(0, (smb_pwd_check_ntlmv1: incorrect challenge size (%lu)\n, (unsigned long)sec_blob-length)); return false; } - + if (nt_response-length != 24) { DEBUG(0, (smb_pwd_check_ntlmv1: incorrect password length (%lu)\n, (unsigned long)nt_response-length)); @@ -56,7 +56,7 @@ static bool smb_pwd_check_ntlmv1(TALLOC_CTX *mem_ctx, } SMBOWFencrypt(part_passwd, sec_blob-data, p24); - + #if DEBUG_PASSWORD DEBUG(100,(Part password (P16) was |\n)); dump_data(100, part_passwd, 16); @@ -106,7 +106,7 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx, (unsigned long)sec_blob-length)); return false; } - + if (ntv2_response-length 24) { /* We MUST have more than 16 bytes, or the stuff below will go crazy. No known implementation sends less than the 24 bytes @@ -180,7 +180,7 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx, (unsigned long)sec_blob-length)); return false; } - + if (ntv2_response-length 24) { /* We MUST have more than 16 bytes, or the stuff below will go crazy. No known implementation sends less than the 24 bytes @@ -318,7 +318,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, DEBUG(4,(ntlm_password_check: checking plaintext passwords for user %s\n, username)); mdfour(client_nt.hash, nt_response-data, nt_response-length); - + if (lm_response-length (convert_string_talloc(mem_ctx, CH_DOS, CH_UNIX, lm_response-data, lm_response-length, @@ -343,7 +343,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, DEBUG(2,(ntlm_password_check: invalid NT password length (%lu) for user %s\n, (unsigned long)nt_response-length, username)); } - + if (nt_response-length 24 stored_nt) { /* We have the NT MD4 hash challenge available - see if we can use it @@ -361,7 +361,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, } return NT_STATUS_OK; } - + DEBUG(4,(ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n, client_domain)); if (smb_pwd_check_ntlmv2(mem_ctx, nt_response, @@ -375,7 +375,7 @@ NTSTATUS
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4dcd5ac s3: Do not directly log off after a pam_logon via 2ef4acb s3: Fix wbinfo arg for --pam-logon from 8768f62 ntlm_check: Fix some nonempty blank lines http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4dcd5ac4424d6003d73a1cac36e2543eba98ae94 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:31:58 2010 +0200 s3: Do not directly log off after a pam_logon commit 2ef4acb2bd67b1b5d483e859705e445c6e01e4cd Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:31:26 2010 +0200 s3: Fix wbinfo arg for --pam-logon --- Summary of changes: nsswitch/wbinfo.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index 34bf758..801f92f 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -2016,7 +2016,7 @@ int main(int argc, char **argv, char **envp) { sid-aliases, 0, POPT_ARG_STRING, string_arg, OPT_SIDALIASES, Get sid aliases, SID }, { user-sids, 0, POPT_ARG_STRING, string_arg, OPT_USERSIDS, Get user group sids for user SID, SID }, { authenticate, 'a', POPT_ARG_STRING, string_arg, 'a', authenticate user, user%password }, - { pam-logon, 0, POPT_ARG_STRING, string_arg, OPT_PAM_LOGON, + { pam-logon, 0, POPT_ARG_STRING, string_arg, OPT_PAM_LOGON, do a pam logon equivalent, user%password }, { logoff, 0, POPT_ARG_NONE, NULL, OPT_LOGOFF, log off user, uid }, @@ -2379,6 +2379,7 @@ int main(int argc, char **argv, char **envp) string_arg); goto done; } + break; case OPT_LOGOFF: { wbcErr wbc_status; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via c96bf39 s3: Do not directly log off after a pam_logon via c852839 s3: Fix wbinfo arg for --pam-logon from 02a8a96 s3/winbind: use mono time for startup timeout check http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit c96bf39e3aa2dd542a37707547dbbd858774bf81 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:31:58 2010 +0200 s3: Do not directly log off after a pam_logon commit c8528396280a15e81b9fedbe8e784b507b2367df Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:31:26 2010 +0200 s3: Fix wbinfo arg for --pam-logon --- Summary of changes: nsswitch/wbinfo.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index 34bf758..801f92f 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -2016,7 +2016,7 @@ int main(int argc, char **argv, char **envp) { sid-aliases, 0, POPT_ARG_STRING, string_arg, OPT_SIDALIASES, Get sid aliases, SID }, { user-sids, 0, POPT_ARG_STRING, string_arg, OPT_USERSIDS, Get user group sids for user SID, SID }, { authenticate, 'a', POPT_ARG_STRING, string_arg, 'a', authenticate user, user%password }, - { pam-logon, 0, POPT_ARG_STRING, string_arg, OPT_PAM_LOGON, + { pam-logon, 0, POPT_ARG_STRING, string_arg, OPT_PAM_LOGON, do a pam logon equivalent, user%password }, { logoff, 0, POPT_ARG_NONE, NULL, OPT_LOGOFF, log off user, uid }, @@ -2379,6 +2379,7 @@ int main(int argc, char **argv, char **envp) string_arg); goto done; } + break; case OPT_LOGOFF: { wbcErr wbc_status; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e03f8de s3: Fix a typo (authentictaion-authentication) from 4dcd5ac s3: Do not directly log off after a pam_logon http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e03f8ded0198ff80dc001f3461eb0384e52f9f5b Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:44:19 2010 +0200 s3: Fix a typo (authentictaion-authentication) --- Summary of changes: source3/utils/ntlm_auth.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 6fd9fa3..b14c2b7 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2441,7 +2441,9 @@ enum { { request-lm-key, 0, POPT_ARG_NONE, request_lm_key, OPT_LM_KEY, Retrieve LM session key}, { request-nt-key, 0, POPT_ARG_NONE, request_user_session_key, OPT_USER_SESSION_KEY, Retrieve User (NT) session key}, { use-cached-creds, 0, POPT_ARG_NONE, use_cached_creds, OPT_USE_CACHED_CREDS, Use cached credentials if no password is given}, - { diagnostics, 0, POPT_ARG_NONE, diagnostics, OPT_DIAGNOSTICS, Perform diagnostics on the authentictaion chain}, + { diagnostics, 0, POPT_ARG_NONE, diagnostics, + OPT_DIAGNOSTICS, + Perform diagnostics on the authentication chain}, { require-membership-of, 0, POPT_ARG_STRING, require_membership_of, OPT_REQUIRE_MEMBERSHIP, Require that a user be a member of this group (either name or SID) for authentication to succeed }, { pam-winbind-conf, 0, POPT_ARG_STRING, opt_pam_winbind_conf, OPT_PAM_WINBIND_CONF, Require that request must set WBFLAG_PAM_CONTACT_TRUSTDOM when krb5 auth is required }, POPT_COMMON_CONFIGFILE -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 3670a24 s3: Fix a typo (authentictaion-authentication) from c96bf39 s3: Do not directly log off after a pam_logon http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 3670a248eb3a3b20a91b6b38f70676f3ab7fb119 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:44:19 2010 +0200 s3: Fix a typo (authentictaion-authentication) --- Summary of changes: source3/utils/ntlm_auth.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 6fd9fa3..b14c2b7 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2441,7 +2441,9 @@ enum { { request-lm-key, 0, POPT_ARG_NONE, request_lm_key, OPT_LM_KEY, Retrieve LM session key}, { request-nt-key, 0, POPT_ARG_NONE, request_user_session_key, OPT_USER_SESSION_KEY, Retrieve User (NT) session key}, { use-cached-creds, 0, POPT_ARG_NONE, use_cached_creds, OPT_USE_CACHED_CREDS, Use cached credentials if no password is given}, - { diagnostics, 0, POPT_ARG_NONE, diagnostics, OPT_DIAGNOSTICS, Perform diagnostics on the authentictaion chain}, + { diagnostics, 0, POPT_ARG_NONE, diagnostics, + OPT_DIAGNOSTICS, + Perform diagnostics on the authentication chain}, { require-membership-of, 0, POPT_ARG_STRING, require_membership_of, OPT_REQUIRE_MEMBERSHIP, Require that a user be a member of this group (either name or SID) for authentication to succeed }, { pam-winbind-conf, 0, POPT_ARG_STRING, opt_pam_winbind_conf, OPT_PAM_WINBIND_CONF, Require that request must set WBFLAG_PAM_CONTACT_TRUSTDOM when krb5 auth is required }, POPT_COMMON_CONFIGFILE -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 95a0b68 s3: Fix a typo from e03f8de s3: Fix a typo (authentictaion-authentication) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 95a0b6830f00c8949b2d8eee73db38d238275262 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 11:56:48 2010 +0200 s3: Fix a typo --- Summary of changes: source3/utils/ntlm_auth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index b14c2b7..fec98e5 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -762,7 +762,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, DATA_BLOB challenge_m * child of the trusted domain. If we ask the primary domain for * ntlm_ccache_auth, it will fail. So, we have to ask the trusted * domain's child for ccache_ntlm_auth. that is to say, we have to -* set WBFALG_PAM_CONTACT_TRUSTDOM in request.flags. +* set WBFLAG_PAM_CONTACT_TRUSTDOM in request.flags. */ ctrl = get_pam_winbind_config(); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 6356255 lib/tdb: change version to 1.2.4 after hash checking improvments via 08eb42d tdb: put example hashes into header, so we notice incorrect hash_fn. via 72c6697 tdb: fix tdb_check() on other-endian tdbs. via 2c736fd tdb: fix tdb_check() on read-only TDBs to actually work. via fefe740 tdb: make check more robust against recovery failures. from 3670a24 s3: Fix a typo (authentictaion-authentication) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 63562559f776c547f18820cf6b3abbb2fd831972 Author: Stefan Metzmacher me...@samba.org Date: Fri Sep 10 04:47:32 2010 +0200 lib/tdb: change version to 1.2.4 after hash checking improvments lib/tdb: change version to 1.2.4 after hash checking improvments metze Signed-off-by: Rusty Russell ru...@rustcorp.com.au (cherry picked from commit d10b2c07be2cfdca09f07d3045ce891989d83a09) commit 08eb42d980e5e81fa4a0247c86d00baae37bae0a Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 20:05:59 2010 +0930 tdb: put example hashes into header, so we notice incorrect hash_fn. This is Stefan Metzmacher me...@samba.org's patch with minor changes: 1) Use the TDB_MAGIC constant so both hashes aren't of strings. 2) Check the hash in tdb_check (paranoia, really). 3) Additional check in the (unlikely!) case where both examples hash to 0. 4) Cosmetic changes to var names and complaint message. Signed-off-by: Rusty Russell ru...@rustcorp.com.au (cherry picked from commit 786b7263000dedcb97e7369402e2e9dc967e36c4) commit 72c6697de54e1ff2d938a3ba4c406718b5c734e4 Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:59:18 2010 +0930 tdb: fix tdb_check() on other-endian tdbs. We must not endian-convert the magic string, just the rest. Signed-off-by: Rusty Russell ru...@rustcorp.com.au (cherry picked from commit f77708e96268d18abbfb038f4e78fe9e11a2856f) commit 2c736fd0195b78698e5f30edb99a7e0a7c0fe7d0 Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:58:23 2010 +0930 tdb: fix tdb_check() on read-only TDBs to actually work. Commit bc1c82ea137 Fix tdb_check() to work with read-only tdb databases. claimed to do this, but tdb_lockall_read() fails on read-only databases. Also make sure we can still do tdb_check() inside a transaction (weird, but we previously allowed it so don't break the API). Signed-off-by: Rusty Russell ru...@rustcorp.com.au (cherry picked from commit 82e5644c9dbf5c2e4b0c4183372e0a79203d32a5) commit fefe740a2c63e9c44613db58b4d8843dee30fd4c Author: Rusty Russell ru...@rustcorp.com.au Date: Mon Sep 13 19:55:26 2010 +0930 tdb: make check more robust against recovery failures. We can end up with dead areas when we die during transaction commit; tdb_check() fails on such a (valid) database. This is particularly noticable now we no longer truncate on recovery; if the recovery area was at the end of the file we used to remove it that way. Signed-off-by: Rusty Russell ru...@rustcorp.com.au (cherry picked from commit 9e0deff904877068d19b41e965732f145c2554b9) --- Summary of changes: lib/tdb/common/check.c | 71 +++-- lib/tdb/common/open.c| 55 - lib/tdb/common/tdb_private.h |6 +++- lib/tdb/configure.ac |2 +- lib/tdb/wscript |2 +- 5 files changed, 121 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c index 2c64043..b1b98d4 100644 --- a/lib/tdb/common/check.c +++ b/lib/tdb/common/check.c @@ -28,8 +28,9 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery) { struct tdb_header hdr; + uint32_t h1, h2; - if (tdb-methods-tdb_read(tdb, 0, hdr, sizeof(hdr), DOCONV()) == -1) + if (tdb-methods-tdb_read(tdb, 0, hdr, sizeof(hdr), 0) == -1) return false; if (strcmp(hdr.magic_food, TDB_MAGIC_FOOD) != 0) goto corrupt; @@ -41,6 +42,11 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery) if (hdr.rwlocks != 0) goto corrupt; + tdb_header_hash(tdb, h1, h2); + if (hdr.magic1_hash hdr.magic2_hash + (hdr.magic1_hash != h1 || hdr.magic2_hash != h2)) + goto corrupt; + if (hdr.hash_size == 0) goto corrupt; @@ -301,6 +307,21 @@ static bool tdb_check_free_record(struct tdb_context *tdb, return true; } +/* Slow, but should be very rare. */ +static size_t dead_space(struct tdb_context *tdb, tdb_off_t off) +{ +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f1b21be param: Only include param_proto.h for Samba builds, provide those prototypes necessary for external users (OpenChange) manually. from 95a0b68 s3: Fix a typo http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f1b21bee16258a85ab9a12a6a56a1cedda0955e1 Author: Jelmer Vernooij jel...@samba.org Date: Mon Sep 13 20:40:19 2010 +0200 param: Only include param_proto.h for Samba builds, provide those prototypes necessary for external users (OpenChange) manually. --- Summary of changes: source4/param/param.h |6 ++ source4/param/wscript_build |2 +- 2 files changed, 7 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/param/param.h b/source4/param/param.h index 7441493..93c7594 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -69,7 +69,13 @@ struct smbcli_options; struct smbcli_session_options; struct gensec_settings; +#ifdef CONFIG_H_IS_FROM_SAMBA #include param/param_proto.h +#endif + +const char **lpcfg_interfaces(struct loadparm_context *); +const char *lpcfg_realm(struct loadparm_context *); +const char *lpcfg_netbios_name(struct loadparm_context *); void reload_charcnv(struct loadparm_context *lp_ctx); diff --git a/source4/param/wscript_build b/source4/param/wscript_build index 0f0f1d0..749aab3 100644 --- a/source4/param/wscript_build +++ b/source4/param/wscript_build @@ -7,7 +7,7 @@ bld.SAMBA_LIBRARY('LIBSAMBA-HOSTCONFIG', deps='DYNCONFIG CHARSET', public_deps='LIBSAMBA-UTIL', public_headers='param.h', -autoproto='param_proto.h' + autoproto='param_proto.h', ) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6e720ec s4:SID handling - always encode the SID using ldap_encode_ndr_dom_sid for LDAP filters via a4b7fac s4:cosmetic - the SID attribute is called objectSid - not objectSID via 0a19290 testdata/samba3/provision_samba3sam.ldif - update also here the maximum domain controller functionality from f1b21be param: Only include param_proto.h for Samba builds, provide those prototypes necessary for external users (OpenChange) manually. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6e720ecd259742d274d6281088c5052070c955e6 Author: Matthias Dieter Wallnöfer m...@samba.org Date: Mon Sep 13 22:41:06 2010 +0200 s4:SID handling - always encode the SID using ldap_encode_ndr_dom_sid for LDAP filters This makes also lookups through special backends as samba3sam work. commit a4b7fac86d6f348d785409555849449527e22e58 Author: Matthias Dieter Wallnöfer m...@samba.org Date: Mon Sep 13 22:39:50 2010 +0200 s4:cosmetic - the SID attribute is called objectSid - not objectSID commit 0a19290ca7cb5531d71e65a37fd11276330b2a12 Author: Matthias Dieter Wallnöfer m...@samba.org Date: Mon Sep 13 21:18:13 2010 +0200 testdata/samba3/provision_samba3sam.ldif - update also here the maximum domain controller functionality And we do support also LDAPv2. --- Summary of changes: source4/cldap_server/netlogon.c |2 +- source4/dsdb/common/util.c | 10 +- source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 16 source4/dsdb/samdb/ldb_modules/samba3sid.c |2 +- source4/dsdb/samdb/ldb_modules/samldb.c | 20 ++-- source4/dsdb/schema/schema_init.c|2 +- source4/lib/policy/gp_ldap.c |7 +-- source4/ntp_signd/ntp_signd.c|3 ++- testdata/samba3/provision_samba3sam.ldif |3 ++- 9 files changed, 35 insertions(+), 30 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index aa5533d..d1fde89 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -146,7 +146,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, ret = ldb_search(sam_ctx, mem_ctx, dom_res, NULL, LDB_SCOPE_SUBTREE, dom_attrs, - ((objectCategory=DomainDNS)(objectSID=%s)), + ((objectCategory=DomainDNS)(objectSid=%s)), ldb_binary_encode(mem_ctx, sid_val)); } diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index c409adb..0e37108 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2525,7 +2525,7 @@ int dsdb_find_sid_by_dn(struct ldb_context *ldb, { int ret; struct ldb_result *res; - const char *attrs[] = { objectSID, NULL }; + const char *attrs[] = { objectSid, NULL }; TALLOC_CTX *tmp_ctx = talloc_new(ldb); struct dom_sid *s; @@ -2540,7 +2540,7 @@ int dsdb_find_sid_by_dn(struct ldb_context *ldb, talloc_free(tmp_ctx); return LDB_ERR_NO_SUCH_OBJECT; } - s = samdb_result_dom_sid(tmp_ctx, res-msgs[0], objectSID); + s = samdb_result_dom_sid(tmp_ctx, res-msgs[0], objectSid); if (s == NULL) { talloc_free(tmp_ctx); return LDB_ERR_NO_SUCH_OBJECT; @@ -2560,7 +2560,7 @@ int dsdb_find_dn_by_sid(struct ldb_context *ldb, int ret; struct ldb_result *res; const char *attrs[] = { NULL }; - char *sid_str = dom_sid_string(mem_ctx, sid); + char *sid_str = ldap_encode_ndr_dom_sid(mem_ctx, sid); if (!sid_str) { return ldb_operr(ldb); @@ -2570,7 +2570,7 @@ int dsdb_find_dn_by_sid(struct ldb_context *ldb, DSDB_SEARCH_SEARCH_ALL_PARTITIONS | DSDB_SEARCH_SHOW_EXTENDED_DN | DSDB_SEARCH_ONE_ONLY, - objectSID=%s, sid_str); + objectSid=%s, sid_str); talloc_free(sid_str); if (ret != LDB_SUCCESS) { return ret; @@ -3871,7 +3871,7 @@ int dsdb_validate_dsa_guid(struct ldb_context *ldb, - remove NTDS Settings component from DN - do a base search on that DN for serverReference with extended-dn enabled -- extract objectSID from resulting serverReference +- extract objectSid from resulting
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 69db4b4 ntlm_auth: Fix a valgrind error from 6e720ec s4:SID handling - always encode the SID using ldap_encode_ndr_dom_sid for LDAP filters http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 69db4b4ccf051b05517e6eb9039ab48f90608075 Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 18:09:20 2010 +0200 ntlm_auth: Fix a valgrind error --- Summary of changes: source3/utils/ntlm_auth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index fec98e5..0fa0c29 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1169,7 +1169,7 @@ static void offer_gss_spnego_mechs(void) { /* Server negTokenInit (mech offerings) */ spnego.type = SPNEGO_NEG_TOKEN_INIT; - spnego.negTokenInit.mechTypes = talloc_array(ctx, const char *, 2); + spnego.negTokenInit.mechTypes = talloc_array(ctx, const char *, 3); #ifdef HAVE_KRB5 spnego.negTokenInit.mechTypes[0] = talloc_strdup(ctx, OID_KERBEROS5_OLD); spnego.negTokenInit.mechTypes[1] = talloc_strdup(ctx, OID_NTLMSSP); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via a2daf0e ntlm_auth: Fix a valgrind error from 6356255 lib/tdb: change version to 1.2.4 after hash checking improvments http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit a2daf0ef0e0c33349753ca4962e129911ac695ac Author: Volker Lendecke v...@samba.org Date: Mon Sep 13 18:09:20 2010 +0200 ntlm_auth: Fix a valgrind error --- Summary of changes: source3/utils/ntlm_auth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index b14c2b7..b396ce8 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1169,7 +1169,7 @@ static void offer_gss_spnego_mechs(void) { /* Server negTokenInit (mech offerings) */ spnego.type = SPNEGO_NEG_TOKEN_INIT; - spnego.negTokenInit.mechTypes = talloc_array(ctx, const char *, 2); + spnego.negTokenInit.mechTypes = talloc_array(ctx, const char *, 3); #ifdef HAVE_KRB5 spnego.negTokenInit.mechTypes[0] = talloc_strdup(ctx, OID_KERBEROS5_OLD); spnego.negTokenInit.mechTypes[1] = talloc_strdup(ctx, OID_NTLMSSP); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b3fccd1 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath. from 69db4b4 ntlm_auth: Fix a valgrind error http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b3fccd10a63058f982082887cefd77af633f516c Author: Jeremy Allison j...@samba.org Date: Mon Sep 13 16:54:21 2010 -0700 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath. Don't log this at level 1 - every EACCES will generate one. Thanks to muehlf...@medizinische-genetik.de for pointing this out. Jeremy. --- Summary of changes: source3/smbd/vfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index d561a6b..d516456 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -930,7 +930,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname) break; } default: - DEBUG(1,(check_reduced_name: couldn't get + DEBUG(3,(check_reduced_name: couldn't get realpath for %s\n, fname)); return map_nt_error_from_unix(errno); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via f4c8bda Fix bug 7409 - Thousands of reduce_name: couldn't get realpath. from a2daf0e ntlm_auth: Fix a valgrind error http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit f4c8bdace12391b78edd36e0221ce360da067248 Author: Jeremy Allison j...@samba.org Date: Mon Sep 13 16:54:21 2010 -0700 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath. Don't log this at level 1 - every EACCES will generate one. Thanks to muehlf...@medizinische-genetik.de for pointing this out. Jeremy. (cherry picked from commit b3fccd10a63058f982082887cefd77af633f516c) --- Summary of changes: source3/smbd/vfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 1a08dec..49ed67e 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -930,7 +930,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname) break; } default: - DEBUG(1,(check_reduced_name: couldn't get + DEBUG(3,(check_reduced_name: couldn't get realpath for %s\n, fname)); return map_nt_error_from_unix(errno); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9271570 s3: Remove some unnecessary if-statements from b3fccd1 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9271570516087e006cf167895d51550a4ee858ab Author: Volker Lendecke v...@samba.org Date: Tue Sep 14 00:02:01 2010 +0200 s3: Remove some unnecessary if-statements --- Summary of changes: source3/utils/ntlm_auth.c | 15 +-- 1 files changed, 5 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 0fa0c29..241dc56 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -856,8 +856,7 @@ static void manage_squid_ntlmssp_request(struct ntlm_auth_state *state, } if (strncmp(buf, YR, 2) == 0) { - if (state-ntlmssp_state) - TALLOC_FREE(state-ntlmssp_state); + TALLOC_FREE(state-ntlmssp_state); state-svr_state = SERVER_INITIAL; } else if (strncmp(buf, KK, 2) == 0) { /* No special preprocessing required */ @@ -1012,8 +1011,7 @@ static void manage_client_ntlmssp_request(struct ntlm_auth_state *state, } if (strncmp(buf, YR, 2) == 0) { - if (state-ntlmssp_state) - TALLOC_FREE(state-ntlmssp_state); + TALLOC_FREE(state-ntlmssp_state); state-cli_state = CLIENT_INITIAL; } else if (strncmp(buf, TT, 2) == 0) { /* No special preprocessing required */ @@ -1104,14 +1102,12 @@ static void manage_client_ntlmssp_request(struct ntlm_auth_state *state, DEBUG(10, (NTLMSSP OK!\n)); state-cli_state = CLIENT_FINISHED; - if (state-ntlmssp_state) - TALLOC_FREE(state-ntlmssp_state); + TALLOC_FREE(state-ntlmssp_state); } else { x_fprintf(x_stdout, BH %s\n, nt_errstr(nt_status)); DEBUG(0, (NTLMSSP BH: %s\n, nt_errstr(nt_status))); state-cli_state = CLIENT_ERROR; - if (state-ntlmssp_state) - TALLOC_FREE(state-ntlmssp_state); + TALLOC_FREE(state-ntlmssp_state); } data_blob_free(request); @@ -1225,8 +1221,7 @@ static void manage_gss_spnego_request(struct ntlm_auth_state *state, } if (strncmp(buf, YR, 2) == 0) { - if (ntlmssp_state) - TALLOC_FREE(ntlmssp_state); + TALLOC_FREE(ntlmssp_state); } else if (strncmp(buf, KK, 2) == 0) { ; } else { -- Samba Shared Repository
[SCM] CTDB repository - branch master updated - ctdb-1.0.114-315-gc386f2c
The branch, master has been updated via c386f2c62f06f1c60047b7d4b1ec7a9eec11873c (commit) via 80b8889267339b870868841ff077e850bc5b52e2 (commit) via 93df096773c89f21f77b3bcf9aa90bf28881b852 (commit) via 942f44123350d4d0c4ad7f3fcd5ff2d0d175739b (commit) from 1261f3d9702800a4e59550c881350daf479f00ef (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit c386f2c62f06f1c60047b7d4b1ec7a9eec11873c Author: Stefan Metzmacher me...@samba.org Date: Tue Aug 31 09:28:34 2010 +0200 server/banning: also release all ips if we're banning ourself metze commit 80b8889267339b870868841ff077e850bc5b52e2 Author: Stefan Metzmacher me...@samba.org Date: Mon Aug 30 18:25:28 2010 +0200 server/recoverd: if we can't get the recovery lock, ban ourself metze commit 93df096773c89f21f77b3bcf9aa90bf28881b852 Author: Stefan Metzmacher me...@samba.org Date: Tue Aug 31 08:42:32 2010 +0200 server/recoverd: do takeover_run after verifying the reclock file metze commit 942f44123350d4d0c4ad7f3fcd5ff2d0d175739b Author: Stefan Metzmacher me...@samba.org Date: Tue Aug 24 09:22:49 2010 +0200 server/monitor: ask for a takeoverrun after propagating our new flags metze --- Summary of changes: include/ctdb_private.h |1 + server/ctdb_banning.c | 30 +- server/ctdb_monitor.c | 48 +++- server/ctdb_recoverd.c | 15 +-- 4 files changed, 54 insertions(+), 40 deletions(-) Changeset truncated at 500 lines: diff --git a/include/ctdb_private.h b/include/ctdb_private.h index b707afd..89b8f08 100644 --- a/include/ctdb_private.h +++ b/include/ctdb_private.h @@ -1291,6 +1291,7 @@ int ctdb_vacuum_init(struct ctdb_db_context *ctdb_db); int32_t ctdb_control_enable_script(struct ctdb_context *ctdb, TDB_DATA indata); int32_t ctdb_control_disable_script(struct ctdb_context *ctdb, TDB_DATA indata); +int32_t ctdb_local_node_got_banned(struct ctdb_context *ctdb); int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata); int32_t ctdb_control_get_ban_state(struct ctdb_context *ctdb, TDB_DATA *outdata); int32_t ctdb_control_set_db_priority(struct ctdb_context *ctdb, TDB_DATA indata); diff --git a/server/ctdb_banning.c b/server/ctdb_banning.c index 3d5f216..5684907 100644 --- a/server/ctdb_banning.c +++ b/server/ctdb_banning.c @@ -42,6 +42,31 @@ ctdb_ban_node_event(struct event_context *ev, struct timed_event *te, } } +int32_t ctdb_local_node_got_banned(struct ctdb_context *ctdb) +{ + uint32_t i; + + /* make sure we are frozen */ + DEBUG(DEBUG_NOTICE,(This node has been banned - forcing freeze and recovery\n)); + + /* Reset the generation id to 1 to make us ignore any + REQ/REPLY CALL/DMASTER someone sends to us. + We are now banned so we shouldnt service database calls + anymore. + */ + ctdb-vnn_map-generation = INVALID_GENERATION; + + for (i=1; i=NUM_DB_PRIORITIES; i++) { + if (ctdb_start_freeze(ctdb, i) != 0) { + DEBUG(DEBUG_ERR,(__location__ Failed to freeze db priority %u\n, i)); + } + } + ctdb_release_all_ips(ctdb); + ctdb-recovery_mode = CTDB_RECOVERY_ACTIVE; + + return 0; +} + int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata) { struct ctdb_ban_time *bantime = (struct ctdb_ban_time *)indata.dptr; @@ -96,7 +121,10 @@ int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata) ctdb-nodes[bantime-pnn]-flags |= NODE_FLAGS_BANNED; event_add_timed(ctdb-ev, ctdb-banning_ctx, timeval_current_ofs(bantime-time,0), ctdb_ban_node_event, ctdb); - + if (bantime-pnn == ctdb-pnn) { + return ctdb_local_node_got_banned(ctdb); + } + return 0; } diff --git a/server/ctdb_monitor.c b/server/ctdb_monitor.c index 7f5da5c..dff6f42 100644 --- a/server/ctdb_monitor.c +++ b/server/ctdb_monitor.c @@ -114,6 +114,7 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p) int ret; TDB_DATA rddata; struct takeover_run_reply rd; + const char *state_str = NULL; c.pnn = ctdb-pnn; c.old_flags = node-flags; @@ -141,28 +142,12 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p) ctdb-monitor-next_interval = 5; ctdb_run_notification_script(ctdb, unhealthy); - - /* ask the recmaster to reallocate all addresses */ - DEBUG(DEBUG_ERR,(Node became UNHEALTHY. Ask recovery master %u to perform ip reallocation\n, ctdb-recovery_master)); - ret =