samba.git
3 years agosmbd: Fix a typo
Volker Lendecke [Tue, 13 Apr 2021 15:48:44 +0000 (15:48 +0000)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoauth: Simplify DEBUG statements in make_auth3_context_for_ntlm()
Volker Lendecke [Tue, 13 Apr 2021 15:14:01 +0000 (15:14 +0000)]
auth: Simplify DEBUG statements in make_auth3_context_for_ntlm()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Remove two unused historic macros
Volker Lendecke [Tue, 13 Apr 2021 15:00:39 +0000 (15:00 +0000)]
lib: Remove two unused historic macros

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agovfs: Remove a call to TALLOC_ZERO()
Volker Lendecke [Tue, 13 Apr 2021 14:59:14 +0000 (14:59 +0000)]
vfs: Remove a call to TALLOC_ZERO()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agovfs: Replace a call to TALLOC_ZERO()
Volker Lendecke [Tue, 13 Apr 2021 14:57:26 +0000 (14:57 +0000)]
vfs: Replace a call to TALLOC_ZERO()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Replace a call to TALLOC_ZERO()
Volker Lendecke [Tue, 13 Apr 2021 14:55:47 +0000 (14:55 +0000)]
lib: Replace a call to TALLOC_ZERO()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoauth3: Fix a error path memleak
Volker Lendecke [Tue, 13 Apr 2021 14:50:16 +0000 (14:50 +0000)]
auth3: Fix a error path memleak

(find the missing TALLOC_FREE() in the - part of the patch...)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoauth3: Use talloc_move() instead of talloc_steal()
Volker Lendecke [Tue, 13 Apr 2021 14:45:54 +0000 (14:45 +0000)]
auth3: Use talloc_move() instead of talloc_steal()

More recent coding style, avoid ambiguities about ownership

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agowinbindd: Fix a typo
Volker Lendecke [Tue, 13 Apr 2021 13:42:37 +0000 (13:42 +0000)]
winbindd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoregistry: Fix a typo
Volker Lendecke [Tue, 6 Apr 2021 19:29:06 +0000 (19:29 +0000)]
registry: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agorpc_client: talloc_stackframe() aborts on failure
Volker Lendecke [Wed, 7 Apr 2021 15:45:18 +0000 (15:45 +0000)]
rpc_client: talloc_stackframe() aborts on failure

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agorpc_client: Direct struct initialization in dcerpc_winreg_enumvals()
Volker Lendecke [Wed, 7 Apr 2021 15:44:35 +0000 (15:44 +0000)]
rpc_client: Direct struct initialization in dcerpc_winreg_enumvals()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoprinting: talloc_stackframe() aborts on failure
Volker Lendecke [Wed, 7 Apr 2021 15:42:46 +0000 (15:42 +0000)]
printing: talloc_stackframe() aborts on failure

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoprinting: Straighten winreg_get_printer() slightly
Volker Lendecke [Wed, 7 Apr 2021 15:41:11 +0000 (15:41 +0000)]
printing: Straighten winreg_get_printer() slightly

Use the common done: exit for everything. This involves initializing
the handles on the stack, but this is good practice anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoprinting: Make winreg_get_printer() a bit easier to understand
Volker Lendecke [Wed, 7 Apr 2021 15:37:35 +0000 (15:37 +0000)]
printing: Make winreg_get_printer() a bit easier to understand

This is more lines, but the FILL_STRING macro did not really gain much
in clarity for me.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoprinting: Make winreg_get_printer() a bit easier to read
Volker Lendecke [Wed, 7 Apr 2021 15:25:09 +0000 (15:25 +0000)]
printing: Make winreg_get_printer() a bit easier to read

EMPTY_STRING does not gain clarity over "" for me.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Simplify tdb_fetch_int32()
Volker Lendecke [Mon, 12 Apr 2021 08:37:11 +0000 (08:37 +0000)]
lib: Simplify tdb_fetch_int32()

With tdb_parse_record we don't need malloc/SAFE_FREE.

The semantics are a bit different from tdb_parse_uint32: We just return
-1 on error, but this could be overloaded with a valid -1 record value.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Simplify tdb_fetch_uint32_t()
Volker Lendecke [Mon, 12 Apr 2021 08:29:02 +0000 (08:29 +0000)]
lib: Simplify tdb_fetch_uint32_t()

With tdb_parse_record() we don't need malloc/SAFE_FREE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Remove unused tdb_traverse_delete_fn()
Volker Lendecke [Mon, 12 Apr 2021 08:06:18 +0000 (08:06 +0000)]
lib: Remove unused tdb_traverse_delete_fn()

We have tdb_wipe_all() for that now.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Fix nonempty line endings
Volker Lendecke [Sun, 11 Apr 2021 19:43:51 +0000 (21:43 +0200)]
lib: Fix nonempty line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Fix includes in util_tdb.h
Volker Lendecke [Fri, 9 Apr 2021 07:59:48 +0000 (07:59 +0000)]
lib: Fix includes in util_tdb.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Fix includes in strv.h
Volker Lendecke [Fri, 9 Apr 2021 07:59:26 +0000 (07:59 +0000)]
lib: Fix includes in strv.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3:script: Remove findsmb from default installation
Andreas Schneider [Mon, 19 Apr 2021 07:12:24 +0000 (09:12 +0200)]
s3:script: Remove findsmb from default installation

This tool is the only client tool which requires perl. Distributions are
removing perl from the default installation now.

Also this is a wrapper around nmblookup which is obsolete in the AD
world. However it might still be used by someone so move it just to
examples/scripts/nmb/

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 19 14:37:04 UTC 2021 on sn-devel-184

3 years agos3: VFS: Remove SMB_VFS_NTIMES(), no longer used
Samuel Cabrero [Tue, 13 Apr 2021 16:00:29 +0000 (18:00 +0200)]
s3: VFS: Remove SMB_VFS_NTIMES(), no longer used

                         ---------------
                        /               \
                       /      REST       \
                      /        IN         \
                     /        PEACE        \
                    /                       \
                    |                       |
                    |     SMB_VFS_NTIMES    |
                    |                       |
                    |                       |
                    |       13 April        |
                    |         2021          |
                    |                       |
                    |                       |
                   *|     *  *  *           | *
          _________)/\\_//(\/(/\)/\//\/\////|_)_______

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Mon Apr 19 13:19:35 UTC 2021 on sn-devel-184

3 years agos3: VFS: default: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:18:20 +0000 (17:18 +0200)]
s3: VFS: default: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: unityed_media: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:45:51 +0000 (17:45 +0200)]
s3: VFS: unityed_media: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: time_audit: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:45:12 +0000 (17:45 +0200)]
s3: VFS: time_audit: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: snapper: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:42:56 +0000 (17:42 +0200)]
s3: VFS: snapper: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: shadow_copy2: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:27:41 +0000 (17:27 +0200)]
s3: VFS: shadow_copy2: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: not_implemented: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:27:08 +0000 (17:27 +0200)]
s3: VFS: not_implemented: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: media_harmony: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:26:29 +0000 (17:26 +0200)]
s3: VFS: media_harmony: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agogpfswrap: Remove wrapper for gpfs_set_times_path()
Samuel Cabrero [Tue, 13 Apr 2021 15:25:39 +0000 (17:25 +0200)]
gpfswrap: Remove wrapper for gpfs_set_times_path()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: gpfs: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:23:49 +0000 (17:23 +0200)]
s3: VFS: gpfs: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: glusterfs: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:21:15 +0000 (17:21 +0200)]
s3: VFS: glusterfs: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: full_audit: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:20:35 +0000 (17:20 +0200)]
s3: VFS: full_audit: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: fruit: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:19:50 +0000 (17:19 +0200)]
s3: VFS: fruit: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: delay_inject: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:19:01 +0000 (17:19 +0200)]
s3: VFS: delay_inject: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: ceph_snapshots: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:17:35 +0000 (17:17 +0200)]
s3: VFS: ceph_snapshots: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: ceph: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:17:00 +0000 (17:17 +0200)]
s3: VFS: ceph: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: catia: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:16:02 +0000 (17:16 +0200)]
s3: VFS: catia: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: cap: Remove SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:15:12 +0000 (17:15 +0200)]
s3: VFS: cap: Remove SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: torture: Change cmd_utime to use SMB_VFS_FNTIMES()
Samuel Cabrero [Wed, 14 Apr 2021 12:21:41 +0000 (14:21 +0200)]
s3: torture: Change cmd_utime to use SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: recycle: set the recycled file times using SMB_VFS_FNTIMES()
Samuel Cabrero [Wed, 14 Apr 2021 09:26:38 +0000 (11:26 +0200)]
s3: VFS: recycle: set the recycled file times using SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: smbd: Use SMB_VFS_FNTIMES() instead of SMB_VFS_NTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 15:13:39 +0000 (17:13 +0200)]
s3: smbd: Use SMB_VFS_FNTIMES() instead of SMB_VFS_NTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: smbd: Pass full fsp to file_ntimes()
Samuel Cabrero [Tue, 13 Apr 2021 15:05:57 +0000 (17:05 +0200)]
s3: smbd: Pass full fsp to file_ntimes()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: smbd: Update file times right before closing the underlying fd
Samuel Cabrero [Thu, 15 Apr 2021 09:53:13 +0000 (11:53 +0200)]
s3: smbd: Update file times right before closing the underlying fd

Next commits will update file_ntimes() to use handle-based SMB_VFS_FNTIMES().
Move the update_write_time_on_close() call immediately before closing the fd.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: smbd: Use new debug macros
Samuel Cabrero [Tue, 13 Apr 2021 15:03:33 +0000 (17:03 +0200)]
s3: smbd: Use new debug macros

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: snapper: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 11:39:09 +0000 (13:39 +0200)]
s3: VFS: snapper: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: shadow_copy2: Implement VFS_SMB_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 11:48:36 +0000 (13:48 +0200)]
s3: VFS: shadow_copy2: Implement VFS_SMB_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: gpfs: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 12:40:24 +0000 (14:40 +0200)]
s3: VFS: gpfs: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agogpfswrap: Add wrapper for gpfs_set_times()
Samuel Cabrero [Tue, 13 Apr 2021 12:38:08 +0000 (14:38 +0200)]
gpfswrap: Add wrapper for gpfs_set_times()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: glusterfs: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:07:13 +0000 (16:07 +0200)]
s3: VFS: glusterfs: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: fruit: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:23:41 +0000 (16:23 +0200)]
s3: VFS: fruit: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: delay_inject: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:25:12 +0000 (16:25 +0200)]
s3: VFS: delay_inject: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: ceph_snapshots: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:28:34 +0000 (16:28 +0200)]
s3: VFS: ceph_snapshots: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: ceph: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:49:25 +0000 (16:49 +0200)]
s3: VFS: ceph: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: catia: Implement SMB_VFS_FNTIMES()
Samuel Cabrero [Tue, 13 Apr 2021 14:53:18 +0000 (16:53 +0200)]
s3: VFS: catia: Implement SMB_VFS_FNTIMES()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoVFS: Add SMB_VFS_FNTIMES
Samuel Cabrero [Tue, 13 Apr 2021 10:07:52 +0000 (12:07 +0200)]
VFS: Add SMB_VFS_FNTIMES

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agobuild: Do not check for unused functions futimes() and futimens()
Samuel Cabrero [Tue, 13 Apr 2021 10:33:16 +0000 (12:33 +0200)]
build: Do not check for unused functions futimes() and futimens()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: VFS: default: ntimes profile not ended when times not changed
Samuel Cabrero [Tue, 13 Apr 2021 11:00:51 +0000 (13:00 +0200)]
s3: VFS: default: ntimes profile not ended when times not changed

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoauth4: Remove unused auth_unix
Andrew Bartlett [Fri, 16 Apr 2021 19:25:18 +0000 (07:25 +1200)]
auth4: Remove unused auth_unix

auth_unix was in the source4/auth/ntlm for two reasons:
 - inherited from earlier Samba before the Samba4 fork
 - To support the ejs-backed SWAT (web administration tool)

Neither of these are good reasons to keep this unused code
around, there is very unlikely to be a need to support
plaintext PAM authentication in this part of the code in the
future.

See b16362fab65d0700bd6a8cf6569a9e21c7e6b069 for some
context on the historical use case.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Apr 19 07:07:01 UTC 2021 on sn-devel-184

3 years agoallow tests to be run against a PAM-less build
Philipp Gesang [Wed, 14 Apr 2021 06:35:40 +0000 (08:35 +0200)]
allow tests to be run against a PAM-less build

Indexing the config hash table fails for PAM related values:

    Traceback (most recent call last):
      File "/src/samba/samba/selftest/tests.py", line 49, in <module>
        pam_set_items_so_path = config_hash["PAM_SET_ITEMS_SO_PATH"]
    KeyError: 'PAM_SET_ITEMS_SO_PATH'
    Error creating recipe from python3 /src/samba/samba/selftest/tests.py| at /src/samba/samba/selftest/selftest.pl line 645.

which prevents the test suite from running when built
--without-pam. Access those values using the get() method
instead.

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
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): Fri Apr 16 10:27:41 UTC 2021 on sn-devel-184

3 years agolib/util: fix timespec normalization
Philipp Gesang [Thu, 17 Jan 2019 10:06:26 +0000 (11:06 +0100)]
lib/util: fix timespec normalization

When fixing up timespec structs, negative values for the ns part
should be taken into account. Also, the range for a valid ns part
is [0, 1000000000), not [0, 1000000000].

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth4: Remove sync check_password from auth_operations
Volker Lendecke [Wed, 14 Apr 2021 20:24:44 +0000 (22:24 +0200)]
auth4: Remove sync check_password from auth_operations

Remove complexity in the data structures, and pushes the async-ness
one level down.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth4: Make auth_sam pseudo-async
Volker Lendecke [Thu, 15 Apr 2021 08:04:21 +0000 (10:04 +0200)]
auth4: Make auth_sam pseudo-async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth4: Make auth_unix pseudo-async
Volker Lendecke [Wed, 14 Apr 2021 19:59:55 +0000 (21:59 +0200)]
auth4: Make auth_unix pseudo-async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth4: Make auth_developer pseudo-async
Volker Lendecke [Wed, 14 Apr 2021 20:22:18 +0000 (22:22 +0200)]
auth4: Make auth_developer pseudo-async

This is a simpler approach to really just wrap the code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth4: Make auth_anonymous pseudo-async
Volker Lendecke [Wed, 14 Apr 2021 19:48:32 +0000 (21:48 +0200)]
auth4: Make auth_anonymous pseudo-async

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agowaf: Check correctly if gnutls has been compiled with fips mode support
Andreas Schneider [Tue, 13 Apr 2021 15:48:21 +0000 (17:48 +0200)]
waf: Check correctly if gnutls has been compiled with fips mode support

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 13 19:17:56 UTC 2021 on sn-devel-184

3 years agoadd .gitlab-ci-coverage.yml for a scheduled build
Stefan Metzmacher [Tue, 29 Dec 2020 14:15:13 +0000 (15:15 +0100)]
add .gitlab-ci-coverage.yml for a scheduled build

This will be used by the https://gitlab.com/samba-team/samba
configuration, while https://gitlab.com/samba-team/devel/samba
will still use .gitlab-ci.yml (via the legacy .gitlab-ci-private.yml).

The key point is the usage of the more powerful n1-standard-2
runners for testing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 13 09:33:14 UTC 2021 on sn-devel-184

3 years agoscript/autobuild.py: split samba-ad-dc-4* tests into two
Stefan Metzmacher [Wed, 30 Dec 2020 01:01:30 +0000 (02:01 +0100)]
script/autobuild.py: split samba-ad-dc-4* tests into two

As single job they used more than 1h.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split samba-nopython out of samba-minimal-smbd again
Stefan Metzmacher [Wed, 30 Dec 2020 00:58:48 +0000 (01:58 +0100)]
script/autobuild.py: split samba-nopython out of samba-minimal-smbd again

This was using more than 1h as a single job.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split samba-no-opath into two tests
Stefan Metzmacher [Wed, 30 Dec 2020 00:33:00 +0000 (01:33 +0100)]
script/autobuild.py: split samba-no-opath into two tests

This was is basically a combination of 'samba-nt4' and
'samba-fileserver'.

As a single job it used more than 1h only for testing,
while the samba-no-nopath-build uses ~ 10mins (with a filled ccache).
Now we have two test jobs with ~ 30mins.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: skip lcov step for samba-fips
Stefan Metzmacher [Wed, 30 Dec 2020 11:11:55 +0000 (12:11 +0100)]
script/autobuild.py: skip lcov step for samba-fips

This doesn't really work and only generates an empty samba-fips.info
file.

Someone familiar with gcov/lcov should look at this and fix it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci-main.yml: specify the image only by SAMBA_CI_JOB_IMAGE
Stefan Metzmacher [Thu, 8 Apr 2021 22:14:36 +0000 (00:14 +0200)]
.gitlab-ci-main.yml: specify the image only by SAMBA_CI_JOB_IMAGE

That way we can construct the url just in one place,
we can also add SAMBA_CI_JOB_IMAGE to the ccache identifier.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci*.yml: only use gitlab.org shared runners if possible
Stefan Metzmacher [Tue, 29 Dec 2020 09:21:51 +0000 (10:21 +0100)]
.gitlab-ci*.yml: only use gitlab.org shared runners if possible

We no longer fallback to our private runner, lets see how that works
out...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agobootstrap/.gitlab-ci.yml: make sure we force gitlab.com runners for now
Stefan Metzmacher [Thu, 8 Apr 2021 21:12:39 +0000 (23:12 +0200)]
bootstrap/.gitlab-ci.yml: make sure we force gitlab.com runners for now

We've just added our own runners with 'docker' and 'gce'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci-main.yml: build coverity using --with-cluster-support
Stefan Metzmacher [Wed, 30 Dec 2020 11:02:05 +0000 (12:02 +0100)]
.gitlab-ci-main.yml: build coverity using --with-cluster-support

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: move the content to .gitlab-ci-main.yml
Stefan Metzmacher [Tue, 29 Dec 2020 13:45:55 +0000 (14:45 +0100)]
.gitlab-ci.yml: move the content to .gitlab-ci-main.yml

We introduce an indirection from
gitlab-ci.yml via .gitlab-ci-default.yml to .gitlab-ci-main.yml

We do that in order to introduce a .gitlab-ci-coverage.yml later
as that will have to use different settings in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: move samba-ad-back{1,2} and samba-schemaupgrade to shared runners
Stefan Metzmacher [Tue, 29 Dec 2020 00:19:31 +0000 (01:19 +0100)]
.gitlab-ci.yml: move samba-ad-back{1,2} and samba-schemaupgrade to shared runners

This seems to work quite reliable now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split samba-ad-dc-backup into samba-ad-back{1,2}
Stefan Metzmacher [Mon, 28 Dec 2020 14:56:57 +0000 (15:56 +0100)]
script/autobuild.py: split samba-ad-dc-backup into samba-ad-back{1,2}

This will make it possible to run them in parallel (hopefully on shared
gitlab runners).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: move ad_dc_backup to samba-ad-dc-6
Stefan Metzmacher [Mon, 28 Dec 2020 14:38:52 +0000 (15:38 +0100)]
script/autobuild.py: move ad_dc_backup to samba-ad-dc-6

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: let private runners also make use of pre-builds
Stefan Metzmacher [Mon, 28 Dec 2020 14:47:27 +0000 (15:47 +0100)]
.gitlab-ci.yml: let private runners also make use of pre-builds

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split out samba-{nt4,h5l,no-opath}-build
Stefan Metzmacher [Mon, 28 Dec 2020 16:12:39 +0000 (17:12 +0100)]
script/autobuild.py: split out samba-{nt4,h5l,no-opath}-build

These will be used to move the build stages from private gitlab runner
jobs to shared runners.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: be more resilient to intrastructure failures
Stefan Metzmacher [Wed, 23 Dec 2020 15:49:19 +0000 (16:49 +0100)]
.gitlab-ci.yml: be more resilient to intrastructure failures

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: specify explicit job timeouts
Stefan Metzmacher [Wed, 23 Dec 2020 15:40:43 +0000 (16:40 +0100)]
.gitlab-ci.yml: specify explicit job timeouts

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: split out samba-{def,mit}-build into the build_first stage
Stefan Metzmacher [Fri, 20 Nov 2020 11:25:33 +0000 (12:25 +0100)]
.gitlab-ci.yml: split out samba-{def,mit}-build into the build_first stage

It's enough to have 2 jobs in build_first, so we can move 'samba-fips'
out of it again.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years ago.gitlab-ci.yml: print out information of the available cpus
Stefan Metzmacher [Fri, 20 Nov 2020 22:20:25 +0000 (23:20 +0100)]
.gitlab-ci.yml: print out information of the available cpus

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split out "samba-{def,mit}-build"
Stefan Metzmacher [Thu, 19 Nov 2020 14:23:00 +0000 (15:23 +0100)]
script/autobuild.py: split out "samba-{def,mit}-build"

This means we avoid a lot of cpu usage for the build.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: add support for dependencies
Stefan Metzmacher [Thu, 17 Dec 2020 10:53:21 +0000 (11:53 +0100)]
script/autobuild.py: add support for dependencies

This will make it possible to split build and test stages
in the next steps.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: store the directory for the running builder in self.builder_dir
Stefan Metzmacher [Thu, 17 Dec 2020 10:53:21 +0000 (11:53 +0100)]
script/autobuild.py: store the directory for the running builder in self.builder_dir

For now it keeps being the same as self.test_source_dir, but that will
change soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: defer cp and git clone
Stefan Metzmacher [Thu, 19 Nov 2020 14:11:39 +0000 (15:11 +0100)]
script/autobuild.py: defer cp and git clone

This will make further reconstruction easier.

Use 'git show -w' to see the minimal diff.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: pass --with-selftest-prefix via make instead of configure
Stefan Metzmacher [Thu, 19 Nov 2020 14:01:04 +0000 (15:01 +0100)]
script/autobuild.py: pass --with-selftest-prefix via make instead of configure

We do start for almost all jobs, just samba-ctdb keeps passing it via
configure in order to have a regression test for it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: split out a CLEAN_SOURCE_TREE_CMD
Stefan Metzmacher [Thu, 19 Nov 2020 13:41:16 +0000 (14:41 +0100)]
script/autobuild.py: split out a CLEAN_SOURCE_TREE_CMD

This works for all cases even if the builder runs in a subdirectory.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoscript/autobuild.py: change the task definitions into an dictionary
Stefan Metzmacher [Thu, 19 Nov 2020 10:49:25 +0000 (11:49 +0100)]
script/autobuild.py: change the task definitions into an dictionary

The will make it easier to add more meta data properties to task
definitions.

Use 'git show -w' to see the minimal diff.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agotestprogs:blackbox: create temporary files under $PREFIX/SELFTEST_TMPDIR
Stefan Metzmacher [Sun, 22 Nov 2020 19:20:56 +0000 (20:20 +0100)]
testprogs:blackbox: create temporary files under $PREFIX/SELFTEST_TMPDIR

Tests should not create files in the build nor the source directory!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos4:client:tests: create temporary files under $PREFIX/SELFTEST_TMPDIR
Stefan Metzmacher [Mon, 23 Nov 2020 08:58:30 +0000 (09:58 +0100)]
s4:client:tests: create temporary files under $PREFIX/SELFTEST_TMPDIR

Tests should not create files in the build nor the source directory!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agopython:tests:samba_tool: create temporary files under $SELFTEST_TMPDIR
Stefan Metzmacher [Sun, 22 Nov 2020 19:14:19 +0000 (20:14 +0100)]
python:tests:samba_tool: create temporary files under $SELFTEST_TMPDIR

Tests should not create files in the build nor the source directory!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:script:tests: create temporary files under $PREFIX/SELFTEST_TMPDIR
Stefan Metzmacher [Thu, 19 Nov 2020 17:10:02 +0000 (17:10 +0000)]
s3:script:tests: create temporary files under $PREFIX/SELFTEST_TMPDIR

Tests should not create files in the build nor the source directory!
They should cope with read only access to them.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agolib/audit_logging/test: fix typos
Philipp Gesang [Mon, 8 Oct 2018 12:59:50 +0000 (14:59 +0200)]
lib/audit_logging/test: fix typos

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Apr 12 20:07:47 UTC 2021 on sn-devel-184