summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* s4-auth: Don't check for NULL saltPrincipal if it doesn't need itGarming Sam2016-11-221-6/+6
| | | | | | | | | This check causes 4.1 domains to be unable to change their DNS backend correctly as they do not have the saltPrincipal value stored. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10882 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Ensure we catch errors from samba-tool domain tombstones expungeAndrew Bartlett2016-11-221-1/+1
| | | | | | | | The previous code would overwrite $? before the return, so always returned 0 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
* dbcheck: Correct message for orphaned backlinksAndrew Bartlett2016-11-221-4/+4
| | | | | | | | The backlink name is in attrname, not in link_name Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
* dbcheck: Be more careful with link checksAndrew Bartlett2016-11-222-10/+23
| | | | | | | | | | | | Here we are more careful when checking links, flagging errors only when a non-deleted forward link appears incorrect. In particular, we trust the GUID more than we trust the name, as otherwise we can get caught out if there is a swap of names, (the link should follow the swap, staying on the same target GUID). Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
* selftest: Add test for link and deleted link behaviour in dbcheckAndrew Bartlett2016-11-227-1/+289
| | | | | | | | | | The other dbcheck tests were getting over-complex, so we start a new test here based on tombestone-expunge.sh, as we are looking at very similar problems Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
* upgradeprovision: Remove objectCategory from constructed attrsGarming Sam2016-11-221-1/+1
| | | | | | | | | | | | The new dbcheck rules identify an error where the GUID of the objectCategory does not exist (pointing to a non-existent schema object). As objectClass was not copied over either, it makes sense not to copy over the objectCategory. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
* python/provision: Remove unused parameter schemaAndrew Bartlett2016-11-211-2/+2
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 21 18:49:12 CET 2016 on sn-devel-144
* s4-torture: test valid environment in spoolss_EnumMonitors level 2.Günther Deschner2016-11-211-0/+1
| | | | | Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-spoolss: use architecture in spoolss_MonitorInfo calls consistentlyGünther Deschner2016-11-211-2/+8
| | | | | Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* ctdb-recovery: Avoid NULL dereference in failure caseAmitay Isaacs2016-11-211-0/+1
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12434 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Nov 21 12:26:04 CET 2016 on sn-devel-144
* vfs: ceph: convert to new DBG_* macrosJeff Layton2016-11-211-132/+122
| | | | | | | | | | ...per Jeremy's recommendation. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 21 03:34:26 CET 2016 on sn-devel-144
* VFS: convert to using ceph_statx structures and functions, when availableJeff Layton2016-11-202-33/+178
| | | | | | | | | | | | | | | | Add a configure test for the ceph_statx function, and use that to determine whether to compile in new functions that use it and its variants, or whether to use a the older code that fetches birthtimes from an xattr. For cephwrap_lstat, we can use ceph_statx with the AT_SYMLINK_NOFOLLOW flag to get the right lookup semantics. For setting the times via cephwrap_ntimes, We can just use ceph_setattrx and pass them all in at the same time. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: Add tortue test for AddPrinterDriverEx with COPY_FROM_DIRECTORYAndreas Schneider2016-11-201-2/+165
| | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Nov 20 21:21:32 CET 2016 on sn-devel-144
* lib:torture: Make variables constAndreas Schneider2016-11-201-4/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:spoolss: Add some useful debug messages on errorAndreas Schneider2016-11-201-0/+6
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:spoolss: Add support for COPY_FROM_DIRECTORY in AddPrinterDriverExAndreas Schneider2016-11-203-21/+100
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ntlm_auth: Avoid some staticsVolker Lendecke2016-11-201-5/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove global xfile.h includesVolker Lendecke2016-11-2015-3/+12
| | | | | | | | | | This makes it more obvious where this legacy code is used Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Nov 20 06:23:19 CET 2016 on sn-devel-144
* lib: Move x_fgets_slash to xfile.cVolker Lendecke2016-11-204-99/+101
| | | | | | | This makes it easier to remove the global #include xfile.h Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Apply an overflow checkVolker Lendecke2016-11-201-3/+11
| | | | | | | | Very unlikely here, as the realloc will have failed long before, but still I would like to check overflow. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Reformat x_fgets_slashVolker Lendecke2016-11-201-64/+68
| | | | | | | | | | This is so old code that I'd like to move somewhere else next, but before that I'd like to clean it up a bit. No code change, just indentation changed and some {} added. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Rename fgets_slash to x_fgets_slashVolker Lendecke2016-11-208-9/+10
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:spoolss: Improve debug messages in construct_printer_driverAndreas Schneider2016-11-201-6/+4
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:spoolss: Return error when there is no driver assignedAndreas Schneider2016-11-201-0/+8
| | | | | | | | | If you create a new printer in Samba, there is no driver assinged. Detect that early and return the right error code. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: add test to compare PRINTER_INFO_STRESS version and OSVersionGünther Deschner2016-11-201-0/+53
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-spoolss: set the defaults for os_version defines globally.Günther Deschner2016-11-201-7/+16
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-spoolss: also set new os_major,minor,build values in printer info 0Günther Deschner2016-11-201-2/+14
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:spoolss: Set default OS Version to Windows Server 2003 R2 SP2Andreas Schneider2016-11-201-3/+9
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12416 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/smbd: fix the last resort check that sets the file type attributeJeremy Allison2016-11-191-6/+4
| | | | | | | | | | | | | | | | | The rule is, a directory (with any other attributes) should always also set FILE_ATTRIBUTE_DIRECTORY, a file should only set FILE_ATTRIBUTE_NORMAL if no other attributes is set. Iow, if a file contains any existing attributes (e.g. FILE_ATTRIBUTE_HIDDEN), don't add in the FILE_ATTRIBUTE_NORMAL attribute. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12436 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Nov 19 11:55:35 CET 2016 on sn-devel-144
* ctdb-locking: Reset real-time priority in lock helperAmitay Isaacs2016-11-181-0/+2
| | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12392 Earlier we were relying on SCHED_RESET_ON_FORK to reset the priority of lock helper processes. Since SCHED_RESET_ON_FORK support has been removed, the scheduling priority of child processes created using vfork() need to be reset explicitly in the helper processes. 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): Fri Nov 18 10:18:27 CET 2016 on sn-devel-144
* Update .ycm_extra_conf.pyAndreas Schneider2016-11-181-193/+72
| | | | | | | | | | | As we did a lot of cleanup it is time to update .ycm_extra_conf.py and set picky developer flags by default. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Nov 18 02:22:10 CET 2016 on sn-devel-144
* s4:torture: Fix cleanup of the secrets object in session_key testAndreas Schneider2016-11-171-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433 The test is known to be failing if sealing is turned on in some circumstances. In this case a secret is created and then the function dcerpc_fetch_session_key() fails. The secret is not removed! We use torturesecret-%08x with random() to fill in the number. Sometimes it happens that random() returns a number we already used. So we end up trying to create a secret for an entry which already exists and run into a collision This change makes sure we always cleanup behind us and do not leave secret objects we created. Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 17 22:30:36 CET 2016 on sn-devel-144
* s4:torture: Normalizes names in session_key testAndreas Schneider2016-11-171-1/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: Strip trailing whitespaces in session_key.cAndreas Schneider2016-11-171-29/+29
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Avoid includes.h in access.cVolker Lendecke2016-11-161-1/+3
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 16 22:26:14 CET 2016 on sn-devel-144
* lib: memcache.h needs some includesVolker Lendecke2016-11-161-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* source4: Change to use lib/util/access functions.Jeremy Allison2016-11-164-240/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 16 16:35:12 CET 2016 on sn-devel-144
* lib: util: Add allow_access_nolog().Jeremy Allison2016-11-162-5/+22
| | | | | | | | | Make allow_access() call allow_access_nolog(), then log. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Move source3/lib/access.c to toplevel lib/util/access.cJeremy Allison2016-11-165-10/+37
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: lib: Replace s3 strnequal with top level strncasecmp_m.Jeremy Allison2016-11-161-2/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: lib: Use top level function strequal_m not the s3 strequalJeremy Allison2016-11-161-8/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: lib: Change masked_match() from SMB_STRDUP macro to underlying ↵Jeremy Allison2016-11-161-3/+4
| | | | | | | | | smb_xstrdup function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/util: Move unix_wild_match() from source3/lib/util to lib/util/Jeremy Allison2016-11-165-161/+210
| | | | | | | | | Use top-level functions instead of source3 specific ones. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: lib: Move from talloc_strdup then lower to strlower_talloc()Jeremy Allison2016-11-161-10/+2
| | | | | | | | | Do things in one go. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: util: Remove unneeded strequal() call. Convert to simple character check.Jeremy Allison2016-11-161-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: lib - Fix formatting of unix_wild_match() sub-function to README.Coding ↵Jeremy Allison2016-11-161-20/+41
| | | | | | | | | standards. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* nss_wins: Fix errno values for HOST_NOT_FOUNDAndreas Schneider2016-11-161-2/+1
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12269 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 16 04:10:55 CET 2016 on sn-devel-144
* s3:net: Use messaging_init_client()Andreas Schneider2016-11-161-5/+17
| | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: Use messaging_init_client()Andreas Schneider2016-11-161-3/+13
| | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:messaging: Add messaging_init_client() functionAndreas Schneider2016-11-162-0/+12
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>