summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* selftest: Use self.account_lockout_duration in self.update_lockout_settings ↵Andrew Bartlett2018-07-051-2/+3
| | | | | | | | | | | for password_lockout tests This allows the account_lockout_duration and lockout_observation_window to be updated with longer values to cope with slower build servers. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* Document that vfs_full_audit defaults are "none" for the successful and ↵Timur I. Bakeyev2018-07-051-2/+2
| | | | | | | | failed operations. Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Make "none" the default setting for the successful and failed operations in ↵Timur I. Bakeyev2018-07-051-2/+3
| | | | | | | | the vfs_full_audit, so you don't blow up your server by just adding this module to the configuration. Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Make sure that vfs*audit modules recognize and accept all the syslog facilities.Timur I. Bakeyev2018-07-053-33/+81
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13436 Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-tests: Switch to using new event daemonAmitay Isaacs2018-07-051-3/+3
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Jul 5 09:39:33 CEST 2018 on sn-devel-144
* ctdb-daemon: Add client code to talk to new event daemonAmitay Isaacs2018-07-053-24/+27
| | | | | | | This fixes the build and now new eventd is integrated completely in CTDB. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-protocol: Remove protocol for old event daemonAmitay Isaacs2018-07-058-1560/+0
| | | | | | | | This breaks the build. The new eventd protocol cannot be introduced without removing the old eventd protocol. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Remove client code for old event daemonAmitay Isaacs2018-07-052-93/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tools: Remove old event daemon toolAmitay Isaacs2018-07-052-542/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Remove old event daemonAmitay Isaacs2018-07-052-1098/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Remove tests for old event daemonAmitay Isaacs2018-07-0525-1296/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tools: Switch to using new event daemon toolAmitay Isaacs2018-07-052-36/+9
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Switch to starting new event daemonAmitay Isaacs2018-07-052-73/+9
| | | | | | | | | | From this patch onwards, CTDB daemon is broken till the client code for new eventd is integrated. This requires getting rid of the old eventd protocol and client code and then switching to the new eventd protocol and client code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-event: Add tests for event daemonAmitay Isaacs2018-07-0539-0/+905
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Rename eventd testsuite to ctdb_eventdAmitay Isaacs2018-07-0526-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-event: Add event daemon client toolAmitay Isaacs2018-07-053-0/+541
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-event: Add event daemon client codeAmitay Isaacs2018-07-053-0/+411
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-event: Add event daemon implementationAmitay Isaacs2018-07-057-0/+1645
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-event: Add event daemon protocolAmitay Isaacs2018-07-057-0/+1782
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Add client pid to connect callback in sock_daemonAmitay Isaacs2018-07-055-3/+18
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Separate testing code for basic data typesAmitay Isaacs2018-07-056-348/+415
| | | | | | | This will be used for testing other daemons' protocol code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Add ctdb prefix to build targetAmitay Isaacs2018-07-051-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-protocol: Separate protocol-basic subsystemAmitay Isaacs2018-07-054-68/+94
| | | | | | | | This includes marshalling code for basic data types. This will be used by other daemons. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* autobuild: Fix random-sleep.sh invocation in autobuild.pyAndrew Bartlett2018-07-051-11/+13
| | | | | | | | | | | The scripts were not running with the correct path and this causes sn-devel to hit a very high load as many of the compile jobs start at once. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Thu Jul 5 06:51:26 CEST 2018 on sn-devel-144
* samba_tool_showrepl_pull_summary_all_good is flappingDouglas Bagnall2018-07-051-0/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool drs showrepl test: turn subprocess error into failureDouglas Bagnall2018-07-051-15/+21
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* netcmd: Use dbcheck to fix DB problems introduced by restore itselfTim Beale2018-07-051-0/+29
| | | | | | | | | | | | | | | As part of the restore process, we remove all the old DCs from the DB. However, this introduces some dbcheck errors - there are some DN attributes and one-way links that reference the deleted objects that need fixing up. To resolve this, we can run dbcheck as part of the restore process. This problem affects both renames and plain restores. The dbcheck.sh test didn't spot this problem because it fixes this type of DB error first, before it checks the DB. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests: Add new tests for backup-rename commandTim Beale2018-07-051-1/+121
| | | | | | | | | | | | | | Extend the existing 'backup online' tests to also test the domain rename case. This mostly involves some extra assertions that the restored DB has been modified appropriatelt (i.e. domain NetBIOS name is updated, etc). I've also added an extra test case that creates a few objects and links and specifically asserts that they get renamed appropriately. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Add dedicated RENAMEDC testenv for 'backup rename'Tim Beale2018-07-053-5/+52
| | | | | | | | | | | | | | | Add a new testenv that's similar to the existing restoredc, except we use 'backup rename' to rename the domain as we back it up. Restoring this backup then proves that a valid DC can be started from a renamed backup. Run the same sub-set of RESTOREDC tests to prove that the new testenv is sound. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* netcmd: Extend 'backup restore' command to handle renamed domainsTim Beale2018-07-053-8/+61
| | | | | | | | | | | | | | | | When restoring a renamed domain backup, we need to register the new realm's DNS zone. We do this in the restore step because we don't know the new server's IP/hostname in the backup step. Because we may have removed the old realm's DNS entries in the rename step, the remove_dc() code may fail to find the expected DNS entries for the DC's domain (the DCs' dnsHostname still maps to the old DNS realm). We just needed to adjust remove_dns_references() as it was getting a slightly different error code. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* netcmd: Add 'samba-tool domain backup rename' commandTim Beale2018-07-052-1/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command that takes a clone of the domain's DB, and renames the domain as well. (We rename the domain during the clone because it's easier to implement - the DRS code handles most of the renaming for us, as it applies the received replication chunks). The new option is similar to an online backup, except we also do the following: - use the new DCCloneAndRenameContext code to clone the DB - run dbcheck to fix up any residual old DNs (mostly objectCategory references) - rename the domain's netBIOSName - add dnsRoot objects for the new DNS realm - by default, remove the old realm's DNS objects (optional) - add an extra backupRename marker to the backed-up DB. In the restore code, if the backup was renamed, then we need to register the new domain's DNS zone at that point (we only know the new DC's host IP at the restore stage). Note that the backup will contain the old DC entries that still use the old dnsHostname, but these DC entries will all be removed during the restore, and a new DC will be added with the correct dnsHostname. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests: Tweak the backup online tests so they're genericTim Beale2018-07-051-15/+42
| | | | | | | | | | | | | | | | Update backup-online tests to be more generic. We can then re-use the common framework for other types of backups (offline, rename), and just change what's specific to those particular cases. This change includes asserting the restored backup's domain/realm are correct, which we weren't doing previously but makes sense. The new 'return samdb' is for convenience, so that child classes can easily extend the checks we run over the restored DB. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* drs_utils: Always set the GET_TGT flag for clone renamesTim Beale2018-07-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | The DCCloneAndRenameContext replication was a little inefficient, in that it would essentially replicate the entire DB twice. This was due to resolving the link targets - it finds a target object it doesn't know about, so retries the entire replication again with the GET_TGT flag set this time. Normally, the repl_meta_data code will use the target object's GUID, however, it can't do this for cross-partition links (if it hasn't replicated the target partition yet). The repl_md code can normally detect that the link is a cross-parition link by checking the base-DN, however, this doesn't work in the DCCloneAndRenameContext case because we have renamed the base-DN. This is not a big deal - it just means extra work. However, because the domains being backed up could potentially be quite large, it probably makes sense to just always set the GET_TGT in the rename case and skip this extra work. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* join: Add more framework for renaming a domainTim Beale2018-07-051-3/+97
| | | | | | | | | | | | | | | | Add a DCCloneContext subclass which will rename the DB objects as they get cloned. This uses the drs_ReplicateRenamer class added to drs_utils in an earlier patch. Where the drs_Replicate object currently gets created has been split out into a simple new function, which we can then override in the rename case. The other important difference is overriding the provision step, so that we use the new domain-DN/realm when setting up the initial SAM DB (and smb.conf, secrets.ldb, etc). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* uid_wrapper: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-051-1/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Jul 5 03:01:33 CEST 2018 on sn-devel-144
* resolv_wrapper: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* pam_wrapper: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* nss_wrapper: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* replace: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* socket_wrapper: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: Be strict when checking __attribute__ featuresAmitay Isaacs2018-07-041-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: Add strict option to CHECK_CODEAmitay Isaacs2018-07-041-1/+11
| | | | | | | | | | | | | | Some compilers (e.g. xlc) ignores unsupported features, generates a warning, but does not fail compilation. This ensures that any compiler warnings are treated as errors and the feature support is correctly identified. This adds equivalent compiler option to -Werror for xlc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* ctdb-daemon: Set environment variable if running in interactive modeAmitay Isaacs2018-07-041-0/+1
| | | | | | | | CTDB_INTERACTIVE will be used to tell the other daemons if the ctdb daemon is started in interactive mode. This is primarily used only for testing. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Avoid closing stdin when running in interactive modeAmitay Isaacs2018-07-041-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Avoid segfault by initializing loggingAmitay Isaacs2018-07-0412-3/+33
| | | | | | | | | | | | | Setting DEBUGLEVEL before calling debug_init() causes segmentation violation with gcc8. DEBUGLEVEL_CLASS is statically initialized to debug_class_list_initial which is defined as const. Only after debug_init() is called, DEBUGLEVEL_CLASS becomes a talloc'd array. So before modifying DEBUGLEVEL, ensure debug_init() is called via setup_logging(). (debug_init is a static function.) Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Use correct return type for tevent_queue_add_entryAmitay Isaacs2018-07-041-3/+3
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3:winbind: Do not lookup local system accounts in ADAndreas Schneider2018-07-042-2/+2
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Jul 4 23:55:56 CEST 2018 on sn-devel-144
* nsswitch: Add tests to lookup user via getpwnamAndreas Schneider2018-07-043-11/+66
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib: smb_threads: fix access before init bugRalph Boehme2018-07-041-0/+3
| | | | | | | | | | | | | talloc_stackframe_internal() calls SMB_THREAD_GET_TLS(global_ts) which calls smb_get_tls_pthread() in the POSIX pthread wrapper implementation. If SMB_THREAD_SET_TLS() hasn't been called before, global_ts is NULL and smb_get_tls_pthread dereferences it so it crashes. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13505 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* samba-gpupdate: Change machine option to targetDavid Mulder2018-07-044-6/+9
| | | | | | | | | | | | | | On a Windows client, you designate machine/user apply with a 'target' parameter. This change makes gpupdate work more like that command. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jul 4 13:23:09 CEST 2018 on sn-devel-144