samba.git
3 years agos3/modules: VFS: stream_xattr: Remove SMB_VFS_STREAMINFO
Noel Power [Wed, 28 Apr 2021 16:40:07 +0000 (17:40 +0100)]
s3/modules: VFS: stream_xattr: Remove SMB_VFS_STREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/modules: VFS: streams_depo: Remove SMB_VFS_STREAMINFO
Noel Power [Wed, 28 Apr 2021 16:32:33 +0000 (17:32 +0100)]
s3/modules: VFS: streams_depo: Remove SMB_VFS_STREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/modules: VFS: media_harmony: Remove SMB_VFS_STREAMINFO
Noel Power [Wed, 28 Apr 2021 16:30:23 +0000 (17:30 +0100)]
s3/modules: VFS: media_harmony: Remove SMB_VFS_STREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/modules: VFS: fruit: Remove SMB_VFS_STREAMINFO
Noel Power [Wed, 28 Apr 2021 16:20:21 +0000 (17:20 +0100)]
s3/modules: VFS: fruit: Remove SMB_VFS_STREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/modules: VFS: catia: Remove SMB_VFS_STREAMINFO
Noel Power [Wed, 28 Apr 2021 15:13:55 +0000 (16:13 +0100)]
s3/modules: VFS: catia: Remove SMB_VFS_STREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: Remove vfs_streaminfo function
Noel Power [Wed, 28 Apr 2021 15:59:11 +0000 (16:59 +0100)]
s3: Remove vfs_streaminfo function

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/module: VFS: fruit: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 15:58:35 +0000 (16:58 +0100)]
s3/module: VFS: fruit: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/lib: adouble: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 15:00:52 +0000 (16:00 +0100)]
s3/lib: adouble: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: open: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 14:35:59 +0000 (15:35 +0100)]
s3/smbd: open: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: filename: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 14:10:07 +0000 (15:10 +0100)]
s3/smbd: filename: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: close vfs_streaminfo->vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 13:33:02 +0000 (14:33 +0100)]
s3/smbd: close vfs_streaminfo->vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: trans2: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 12:59:22 +0000 (13:59 +0100)]
s3/smbd: trans2: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: ntrans: vfs_streaminfo -> vfs_fstreaminfo
Noel Power [Wed, 28 Apr 2021 12:13:36 +0000 (13:13 +0100)]
s3/smbd: ntrans: vfs_streaminfo -> vfs_fstreaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3/smbd: add new toplevel vfs_fstreaminfo wrapper
Noel Power [Wed, 28 Apr 2021 08:51:05 +0000 (09:51 +0100)]
s3/smbd: add new toplevel vfs_fstreaminfo wrapper

This will allow for calling SMB_VFS_FSTREAMINFO in a piecemeal
fashion, at the end of the patch set vfs_fstreaminfo will replace
vfs_streaminfo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: VFS: streams_xattr: Add impl for SMB_VFS_FSTREAMINFO
Noel Power [Tue, 27 Apr 2021 15:57:57 +0000 (16:57 +0100)]
s3: VFS: streams_xattr: Add impl for SMB_VFS_FSTREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: VFS: streams_depot SMB_VFS_FSTREAMINFO impl
Noel Power [Tue, 27 Apr 2021 15:51:35 +0000 (16:51 +0100)]
s3: VFS: streams_depot SMB_VFS_FSTREAMINFO impl

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: VFS: glusterfs: Initialise fstreaminfo_fn to NULL
Noel Power [Tue, 27 Apr 2021 15:14:27 +0000 (16:14 +0100)]
s3: VFS: glusterfs: Initialise fstreaminfo_fn to NULL

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: vfs: fruit: Implement SMB_VFS_FSTREAMINFO
Noel Power [Tue, 27 Apr 2021 15:09:35 +0000 (16:09 +0100)]
s3: vfs: fruit: Implement SMB_VFS_FSTREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: VFS: catia: Implement SMB_VFS_FSTREAMINFO
Noel Power [Tue, 27 Apr 2021 14:49:36 +0000 (15:49 +0100)]
s3: VFS: catia: Implement SMB_VFS_FSTREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoVFS: Add SMB_VFS_FSTREAMINFO
Noel Power [Fri, 7 May 2021 23:11:46 +0000 (16:11 -0700)]
VFS: Add SMB_VFS_FSTREAMINFO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agoaudit logging tests: Fix flapping test
Joseph Sutton [Mon, 10 May 2021 22:03:34 +0000 (10:03 +1200)]
audit logging tests: Fix flapping test

On Linux, gettimeofday() uses the clock's microsecond field to adjust
the returned time in seconds, while time() only takes the seconds field
into account. As a result, time() would occasionally return a smaller
value than gettimeofday(), despite being called later.

Changing the time() calls to gettimeofday() as used in audit_logging.c
makes the time values consistent.

https://stackoverflow.com/questions/22917318/time-and-gettimeofday-return-different-seconds

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May 11 07:03:35 UTC 2021 on sn-devel-184

3 years agos3:smbd - support streams larger than 64 KiB
Andrew Walker [Fri, 7 May 2021 10:37:25 +0000 (06:37 -0400)]
s3:smbd - support streams larger than 64 KiB

Add support for streams that are larger than 64 KiB in size. Upper
and lower bound are controlled by the parameters smbd max_xattr_size.
Testing against ReFS on Windows (where ADS size is limited in size
shows the server responding with STATUS_FILESYSTEM_LIMITATION.
Do the same in samba for this case.

Currently, large xattrs are supported in FreeBSD.

Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 10 20:16:21 UTC 2021 on sn-devel-184

3 years agobootstrap: Add Fedora 34 CI runner
Andreas Schneider [Thu, 6 May 2021 13:24:06 +0000 (15:24 +0200)]
bootstrap: Add Fedora 34 CI runner

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): Fri May  7 07:18:02 UTC 2021 on sn-devel-184

3 years agobootstrap: Remove libnsl as we dropped NIS support
Andreas Schneider [Thu, 6 May 2021 13:36:20 +0000 (15:36 +0200)]
bootstrap: Remove libnsl as we dropped NIS support

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
3 years agolib:replace: Do not build strndup test with gcc 11 or newer
Andreas Schneider [Thu, 6 May 2021 17:07:04 +0000 (19:07 +0200)]
lib:replace: Do not build strndup test with gcc 11 or newer

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14699

gcc11 with -O3 detects that the size is incorrect:

lib/replace/tests/testsuite.c:286:13: error: ‘strndup’ specified bound 10 exceeds source size 4 [-Werror=stringop-overread]
  286 |         x = strndup("bla", 10);
      |             ^~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
3 years agoFix gcc11 compiler issue "-Werror=stringop-overflow="
Günther Deschner [Mon, 3 May 2021 19:27:58 +0000 (21:27 +0200)]
Fix gcc11 compiler issue "-Werror=stringop-overflow="

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14699

[3548/3991] Compiling source3/winbindd/winbindd_pam.c
../../source3/winbindd/winbindd_pam.c: In function ‘winbindd_dual_pam_auth_cached’:
../../source3/winbindd/winbindd_pam.c:1069:18: error: ‘winbindd_get_creds’ accessing 128 bytes in a region of size 8 [-Werror=stringop-overflow=]
 1069 |         result = winbindd_get_creds(domain,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
 1070 |                                     state->mem_ctx,
      |                                     ~~~~~~~~~~~~~~~
 1071 |                                     &sid,
      |                                     ~~~~~
 1072 |                                     &my_info3,
      |                                     ~~~~~~~~~~
 1073 |                                     &cached_nt_pass,
      |                                     ~~~~~~~~~~~~~~~~
 1074 |                                     &cached_salt);
      |                                     ~~~~~~~~~~~~~
../../source3/winbindd/winbindd_pam.c:1069:18: note: referencing argument 5 of type ‘const uint8_t **’ {aka ‘const unsigned char **’}
../../source3/winbindd/winbindd_pam.c:1069:18: error: ‘winbindd_get_creds’ accessing 128 bytes in a region of size 8 [-Werror=stringop-overflow=]
../../source3/winbindd/winbindd_pam.c:1069:18: note: referencing argument 6 of type ‘const uint8_t **’ {aka ‘const unsigned char **’}
In file included from ../../source3/winbindd/winbindd.h:359,
                 from ../../source3/winbindd/winbindd_pam.c:26:
../../source3/winbindd/winbindd_proto.h:251:10: note: in a call to function ‘winbindd_get_creds’
  251 | NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
      |          ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoFix gcc11 compiler issue "-Werror=maybe-uninitialized"
Günther Deschner [Mon, 3 May 2021 19:27:43 +0000 (21:27 +0200)]
Fix gcc11 compiler issue "-Werror=maybe-uninitialized"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14699

../../source4/dsdb/common/util_links.c: In function ‘ndr_guid_compare’:
../../source4/dsdb/common/util_links.c:38:29: error: ‘v1_data’ may be used uninitialized [-Werror=maybe-uninitialized]
   38 |         struct ldb_val v1 = data_blob_const(v1_data, sizeof(v1_data));
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/dsdb/common/util_links.c:22:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/dsdb/common/util_links.c:37:17: note: ‘v1_data’ declared here
   37 |         uint8_t v1_data[16];
      |                 ^~~~~~~
cc1: all warnings being treated as errors

[1729/3991] Compiling source3/smbd/smbXsrv_open.c
../../libcli/auth/smbencrypt.c: In function ‘decode_wkssvc_join_password_buffer’:
../../libcli/auth/smbencrypt.c:1045:32: error: ‘_confounder’ may be used uninitialized [-Werror=maybe-uninitialized]
 1045 |         DATA_BLOB confounder = data_blob_const(_confounder, 8);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../libcli/auth/smbencrypt.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../libcli/auth/smbencrypt.c:1044:17: note: ‘_confounder’ declared here
 1044 |         uint8_t _confounder[8];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

[2624/3991] Compiling source4/torture/rpc/samr.c
../../source3/rpc_client/cli_samr.c: In function ‘dcerpc_samr_chgpasswd_user2’:
../../source3/rpc_client/cli_samr.c:158:33: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
  158 |         DATA_BLOB session_key = data_blob_const(old_nt_hash, 16);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/rpc_client/cli_samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/rpc_client/cli_samr.c:152:17: note: ‘old_nt_hash’ declared here
  152 |         uint8_t old_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source3/rpc_client/cli_samr.c: In function ‘dcerpc_samr_chgpasswd_user3’:
../../source3/rpc_client/cli_samr.c:365:33: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
  365 |         DATA_BLOB session_key = data_blob_const(old_nt_hash, 16);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/rpc_client/cli_samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/rpc_client/cli_samr.c:358:17: note: ‘old_nt_hash’ declared here
  358 |         uint8_t old_nt_hash[16];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

[3399/3991] Compiling source3/rpcclient/cmd_spotlight.c
../../source3/smbd/smbXsrv_open.c: In function ‘smbXsrv_open_set_replay_cache’:
../../source3/smbd/smbXsrv_open.c:936:26: error: ‘data’ may be used uninitialized [-Werror=maybe-uninitialized]
  936 |         DATA_BLOB blob = data_blob_const(data, ARRAY_SIZE(data));
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source3/../lib/util/samba_util.h:48,
                 from ../../source3/include/includes.h:256,
                 from ../../source3/smbd/smbXsrv_open.c:21:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source3/smbd/smbXsrv_open.c:935:17: note: ‘data’ declared here
  935 |         uint8_t data[SMBXSRV_OPEN_REPLAY_CACHE_FIXED_SIZE];
      |                 ^~~~
cc1: all warnings being treated as errors

../../source3/rpcclient/cmd_spotlight.c: In function ‘cmd_mdssvc_fetch_properties’:
../../source3/rpcclient/cmd_spotlight.c:60:18: error: ‘share_path’ may be used uninitialized [-Werror=maybe-uninitialized]
   60 |         status = dcerpc_mdssvc_open(b, mem_ctx,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 |                                     &device_id,
      |                                     ~~~~~~~~~~~
   62 |                                     &unkn1,
      |                                     ~~~~~~~
   63 |                                     &unkn2,
      |                                     ~~~~~~~
   64 |                                     argv[2],
      |                                     ~~~~~~~~
   65 |                                     argv[1],
      |                                     ~~~~~~~~
   66 |                                     share_path,
      |                                     ~~~~~~~~~~~
   67 |                                     &share_handle);
      |                                     ~~~~~~~~~~~~~~
In file included from ../../source3/rpcclient/cmd_spotlight.c:24:
source3/../librpc/gen_ndr/ndr_mdssvc_c.h:26:10: note: by argument 8 of type ‘const char *’ to ‘dcerpc_mdssvc_open’ declared here
   26 | NTSTATUS dcerpc_mdssvc_open(struct dcerpc_binding_handle *h,
      |          ^~~~~~~~~~~~~~~~~~
../../source3/rpcclient/cmd_spotlight.c:40:14: note: ‘share_path’ declared here
   40 |         char share_path[1025];
      |              ^~~~~~~~~~
cc1: all warnings being treated as errors

../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser2’:
../../source4/torture/rpc/samr.c:2266:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2266 |                 = data_blob_const(old_nt_hash, sizeof(old_nt_hash));
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2263:17: note: ‘old_nt_hash’ declared here
 2263 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser2_ntstatus’:
../../source4/torture/rpc/samr.c:2371:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2371 |                 = data_blob_const(old_nt_hash, sizeof(old_nt_hash));
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2368:17: note: ‘old_nt_hash’ declared here
 2368 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordUser3’:
../../source4/torture/rpc/samr.c:2478:38: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2478 |         DATA_BLOB old_nt_hash_blob = data_blob_const(old_nt_hash, 16);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2473:17: note: ‘old_nt_hash’ declared here
 2473 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
../../source4/torture/rpc/samr.c: In function ‘test_ChangePasswordRandomBytes’:
../../source4/torture/rpc/samr.c:2794:19: error: ‘old_nt_hash’ may be used uninitialized [-Werror=maybe-uninitialized]
 2794 |                 = data_blob_const(old_nt_hash,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2795 |                                   sizeof(old_nt_hash));
      |                                   ~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/../lib/util/samba_util.h:48,
                 from ../../source4/include/includes.h:62,
                 from ../../source4/torture/rpc/samr.c:24:
../../lib/util/data_blob.h:116:20: note: by argument 1 of type ‘const void *’ to ‘data_blob_const’ declared here
  116 | _PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
      |                    ^~~~~~~~~~~~~~~
../../source4/torture/rpc/samr.c:2792:17: note: ‘old_nt_hash’ declared here
 2792 |         uint8_t old_nt_hash[16], new_nt_hash[16];
      |                 ^~~~~~~~~~~
cc1: all warnings being treated as errors

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3: utils: Remove debug2html utility. Not used, installed or tested.
Richard Sharpe [Thu, 6 May 2021 20:33:18 +0000 (13:33 -0700)]
s3: utils: Remove debug2html utility. Not used, installed or tested.

No reference to it on the web since the year 2000.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May  7 03:20:46 UTC 2021 on sn-devel-184

3 years agolib:cmdline: Align integer types
Andreas Schneider [Thu, 6 May 2021 10:01:05 +0000 (12:01 +0200)]
lib:cmdline: Align integer types

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May  6 13:29:28 UTC 2021 on sn-devel-184

3 years agolib:cmdline: We need to always set a log file
Andreas Schneider [Thu, 6 May 2021 09:21:53 +0000 (11:21 +0200)]
lib:cmdline: We need to always set a log file

We need to always set a log file name based on the process name. This
defines e.g. the log file for smbd.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agolib:cmdline: Also set logfilebase for -l|--log-basename
Andreas Schneider [Fri, 30 Apr 2021 14:12:29 +0000 (16:12 +0200)]
lib:cmdline: Also set logfilebase for -l|--log-basename

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agolib:cmdline: Rename to cmdline_sanity_checker
Andreas Schneider [Mon, 3 May 2021 11:35:37 +0000 (13:35 +0200)]
lib:cmdline: Rename to cmdline_sanity_checker

Will give nicer output if we find duplicates!

$ net help
cmdline_sanity_checker: Duplicate option --long|-l detected!

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agolib:cmdline: Improve error message for duplicate options
Andreas Schneider [Thu, 29 Apr 2021 15:04:43 +0000 (17:04 +0200)]
lib:cmdline: Improve error message for duplicate options

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agogpo: Correct name of files gpo
David Mulder [Wed, 28 Apr 2021 16:32:44 +0000 (10:32 -0600)]
gpo: Correct name of files gpo

This is important, since having the incorrect
name will prevent policies from removing
correctly on an unapply, or when the policy
is deleted from AD.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 29 22:27:20 UTC 2021 on sn-devel-184

3 years agos3: smbd: SMB1 SMBsplwr doesn't send a reply packet on success.
Jeremy Allison [Thu, 29 Apr 2021 16:50:30 +0000 (09:50 -0700)]
s3: smbd: SMB1 SMBsplwr doesn't send a reply packet on success.

Missing call to set up req->outbuf means no reply is sent.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14696

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 29 21:27:58 UTC 2021 on sn-devel-184

3 years agowinbindd: remove obsolete sequence_number from struct winbindd_methods
Ralph Boehme [Tue, 27 Apr 2021 14:03:29 +0000 (16:03 +0200)]
winbindd: remove obsolete sequence_number from struct winbindd_methods

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Apr 29 15:49:16 UTC 2021 on sn-devel-184

3 years agowinbindd: remove obsolete sequence_number() from winbindd_reconnect.c
Ralph Boehme [Tue, 27 Apr 2021 14:02:32 +0000 (16:02 +0200)]
winbindd: remove obsolete sequence_number() from winbindd_reconnect.c

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agowinbindd: remove obsolete sequence_number() from winbindd_reconnect_ads.c
Ralph Boehme [Tue, 27 Apr 2021 14:01:45 +0000 (16:01 +0200)]
winbindd: remove obsolete sequence_number() from winbindd_reconnect_ads.c

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbindd: Remove unused rpc_sequence_number()
Andreas Schneider [Mon, 26 Apr 2021 12:03:38 +0000 (14:03 +0200)]
s3:winbindd: Remove unused rpc_sequence_number()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbindd: Remove obsolete sequence_number callback from ads backend
Andreas Schneider [Mon, 26 Apr 2021 11:54:30 +0000 (13:54 +0200)]
s3:winbindd: Remove obsolete sequence_number callback from ads backend

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbindd: Remove obsolete sequence_number callback from samr backend
Andreas Schneider [Mon, 26 Apr 2021 11:53:09 +0000 (13:53 +0200)]
s3:winbindd: Remove obsolete sequence_number callback from samr backend

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbindd: Remove obsolete sequence_number callback from msrpc backend
Andreas Schneider [Mon, 26 Apr 2021 11:52:14 +0000 (13:52 +0200)]
s3:winbindd: Remove obsolete sequence_number callback from msrpc backend

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbindd: Do not call backends sequence number code
Andreas Schneider [Mon, 26 Apr 2021 12:01:39 +0000 (14:01 +0200)]
s3:winbindd: Do not call backends sequence number code

This is not needed anymore.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbindd: Simplfy sequence number caching
Andreas Schneider [Fri, 23 Apr 2021 12:16:02 +0000 (14:16 +0200)]
s3:winbindd: Simplfy sequence number caching

The sequence number is used to detect if the cache is still valid. It
expires when the `winbind cache time` is over. After that time we want
to fetch new information from a DC to make sure we are up to date.

If a DC goes down and we recreate the connection, we want to expire the
caches sooner. So we reset the sequence number and the next call should
refill the caches.

Using the current time as the sequence number is more reliable, as the
sequence number of two DCs could in theory be equal. All we have to do
is to make sure we reset it after we reconnect to a DC.

Previously the sequence number check was based on the AD database change
sequence number. Now this is based on a current time value which gets
reset after a successful (re)connect.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoCVE-2021-20254 passdb: Simplify sids_to_unixids()
Volker Lendecke [Sat, 20 Feb 2021 14:50:12 +0000 (15:50 +0100)]
CVE-2021-20254 passdb: Simplify sids_to_unixids()

Best reviewed with "git show -b", there's a "continue" statement that
changes subsequent indentation.

Decouple lookup status of ids from ID_TYPE_NOT_SPECIFIED

Add comments to explain the use of the three lookup
loops.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14571

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Apr 29 09:55:51 UTC 2021 on sn-devel-184

3 years agos3:winbind: For 'security = ADS' require realm/workgroup to be set
Andreas Schneider [Wed, 28 Apr 2021 10:25:42 +0000 (12:25 +0200)]
s3:winbind: For 'security = ADS' require realm/workgroup to be set

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14695

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Apr 29 04:48:37 UTC 2021 on sn-devel-184

3 years agos3:utils: Tell users that workgroup/realm is required for ADS mode
Andreas Schneider [Wed, 28 Apr 2021 10:09:21 +0000 (12:09 +0200)]
s3:utils: Tell users that workgroup/realm is required for ADS mode

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14695

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Update samba.8 manpage for new cmdline opition parser
Andreas Schneider [Thu, 11 Feb 2021 13:31:26 +0000 (14:31 +0100)]
docs-xml: Update samba.8 manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:samba: Migrate samba daemon to new cmdline option parser
Andreas Schneider [Thu, 14 Jan 2021 08:50:10 +0000 (09:50 +0100)]
s4:samba: Migrate samba daemon to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:samba: Pass a talloc memory context to binary_smbd_main()
Andreas Schneider [Thu, 14 Jan 2021 08:36:47 +0000 (09:36 +0100)]
s4:samba: Pass a talloc memory context to binary_smbd_main()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Update winbindd manpage for new cmdline opition parser
Andreas Schneider [Fri, 15 Jan 2021 14:14:39 +0000 (15:14 +0100)]
docs-xml: Update winbindd manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Update smbd manpage for new cmdline opition parser
Andreas Schneider [Fri, 15 Jan 2021 13:41:51 +0000 (14:41 +0100)]
docs-xml: Update smbd manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Update nmbd manpage for new cmdline opition parser
Andreas Schneider [Fri, 15 Jan 2021 14:10:46 +0000 (15:10 +0100)]
docs-xml: Update nmbd manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3: Remove --log-stdout from daemons
Andreas Schneider [Mon, 11 Jan 2021 08:52:36 +0000 (09:52 +0100)]
s3: Remove --log-stdout from daemons

The common cmdline parser provides --debug-stdout.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:util: Add debug_get_log_type() function
Andreas Schneider [Fri, 8 Jan 2021 07:31:24 +0000 (08:31 +0100)]
lib:util: Add debug_get_log_type() function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:winbind: Migrate winbindd to new cmdline option parser
Andreas Schneider [Mon, 11 Jan 2021 09:20:41 +0000 (10:20 +0100)]
s3:winbind: Migrate winbindd to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:smbd: Migrate smbd to new cmdline option parser
Andreas Schneider [Tue, 5 Jan 2021 13:35:39 +0000 (14:35 +0100)]
s3:smbd: Migrate smbd to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:nmbd: Migrate nmbd to new cmdline option parser
Andreas Schneider [Tue, 5 Jan 2021 13:28:53 +0000 (14:28 +0100)]
s3:nmbd: Migrate nmbd to new cmdline option parser

This removes --log-stdout as we already have --debug-stdout in the
common options!

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoWHATSNEW: Document removal of NIS support
Andreas Schneider [Tue, 27 Apr 2021 12:58:20 +0000 (14:58 +0200)]
WHATSNEW: Document removal of NIS support

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Wed Apr 28 08:47:21 UTC 2021 on sn-devel-184

3 years agodocs-xml: Add doc entities for the options of the new cmdline parser
Andreas Schneider [Fri, 21 Aug 2020 11:33:09 +0000 (13:33 +0200)]
docs-xml: Add doc entities for the options of the new cmdline parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Apr 28 04:32:47 UTC 2021 on sn-devel-184

3 years agolib:cmdline: Add sanity check for options
Andreas Schneider [Wed, 2 Sep 2020 15:19:00 +0000 (17:19 +0200)]
lib:cmdline: Add sanity check for options

Make sure we don't have duplicate options!

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Add samba_cmdline_burn()
Andreas Schneider [Wed, 19 Aug 2020 07:07:47 +0000 (09:07 +0200)]
lib:cmdline: Add samba_cmdline_burn()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Set kerberos=required for --use-krb5-ccache=CCACHE
Andreas Schneider [Thu, 12 Nov 2020 10:45:05 +0000 (11:45 +0100)]
lib:cmdline: Set kerberos=required for --use-krb5-ccache=CCACHE

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Implement legacy kerberos options
Andreas Schneider [Mon, 31 Aug 2020 15:42:57 +0000 (17:42 +0200)]
lib:cmdline: Implement legacy kerberos options

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Parse cmdline options with popt
Andreas Schneider [Tue, 11 Aug 2020 14:37:16 +0000 (16:37 +0200)]
lib:cmdline: Parse cmdline options with popt

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Add callback for loading the config file
Andreas Schneider [Mon, 10 Aug 2020 13:09:54 +0000 (15:09 +0200)]
lib:cmdline: Add callback for loading the config file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Add client credentials
Andreas Schneider [Mon, 27 Jul 2020 14:13:53 +0000 (16:13 +0200)]
lib:cmdline: Add client credentials

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:cmdline: Add initial code for new cmdline option parser
Andreas Schneider [Thu, 16 Jul 2020 13:15:07 +0000 (15:15 +0200)]
lib:cmdline: Add initial code for new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds:tests: Add test for cli_credentials_get_password_and_obtained()
Andreas Schneider [Tue, 1 Sep 2020 13:36:20 +0000 (15:36 +0200)]
auth:creds:tests: Add test for cli_credentials_get_password_and_obtained()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds: Add cli_credentials_get_password_and_obtained()
Andreas Schneider [Tue, 1 Sep 2020 13:33:18 +0000 (15:33 +0200)]
auth:creds: Add cli_credentials_get_password_and_obtained()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds:tests: Add test for cli_credentials_get_username_and_obtained()
Andreas Schneider [Tue, 1 Sep 2020 11:33:19 +0000 (13:33 +0200)]
auth:creds:tests: Add test for cli_credentials_get_username_and_obtained()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds: Add cli_credentials_get_username_and_obtained()
Andreas Schneider [Mon, 31 Aug 2020 16:52:44 +0000 (18:52 +0200)]
auth:creds: Add cli_credentials_get_username_and_obtained()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds:tests: Add test for cli_credentials_set_gensec_features()
Andreas Schneider [Tue, 1 Sep 2020 11:28:12 +0000 (13:28 +0200)]
auth:creds:tests: Add test for cli_credentials_set_gensec_features()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds: Add obtained arg to cli_credentials_set_gensec_features()
Andreas Schneider [Thu, 20 Aug 2020 08:50:30 +0000 (10:50 +0200)]
auth:creds: Add obtained arg to cli_credentials_set_gensec_features()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds: Use 'client protection' option for smb sign and encrypt defaults
Andreas Schneider [Thu, 20 Aug 2020 14:44:32 +0000 (16:44 +0200)]
auth:creds: Use 'client protection' option for smb sign and encrypt defaults

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:param: Add 'client protection' config option
Andreas Schneider [Thu, 20 Aug 2020 08:18:08 +0000 (10:18 +0200)]
lib:param: Add 'client protection' config option

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds:tests: Add test for cli_credentials_set_kerberos_state()
Andreas Schneider [Tue, 1 Sep 2020 11:01:56 +0000 (13:01 +0200)]
auth:creds:tests: Add test for cli_credentials_set_kerberos_state()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth:creds: Add obtained arg to cli_credentials_set_kerberos_state()
Andreas Schneider [Wed, 19 Aug 2020 13:46:11 +0000 (15:46 +0200)]
auth:creds: Add obtained arg to cli_credentials_set_kerberos_state()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:rpc_server: Set Kerberos to desired
Andreas Schneider [Thu, 8 Apr 2021 13:45:42 +0000 (15:45 +0200)]
s4:rpc_server: Set Kerberos to desired

This is required for ncalrpc_as_system to work. In FIPS enabled mode,
'client use kerberos' is forced to required. We need to allow
non-kerberos use for ncalrpc_as_system here.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoselftest: Check the return code of setup_namespaces()
Andreas Schneider [Thu, 8 Apr 2021 13:54:18 +0000 (15:54 +0200)]
selftest: Check the return code of setup_namespaces()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib:param: Add 'client use kerberos' config parameter
Andreas Schneider [Wed, 19 Aug 2020 09:34:02 +0000 (11:34 +0200)]
lib:param: Add 'client use kerberos' config parameter

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:tests: Check for 'Client started' in the log
Andreas Schneider [Wed, 26 Aug 2020 09:27:59 +0000 (11:27 +0200)]
s3:tests: Check for 'Client started' in the log

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotests: Use --configfile instead of -s
Andreas Schneider [Wed, 14 Apr 2021 09:44:51 +0000 (11:44 +0200)]
tests: Use --configfile instead of -s

We should use long options in tests to make clear what we are trying to
do.

Also the -s short option will be removed for --configfile later.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotestprogs: Use --suppress-prompt instead of -s for testparm
Andreas Schneider [Fri, 9 Apr 2021 12:33:09 +0000 (14:33 +0200)]
testprogs: Use --suppress-prompt instead of -s for testparm

We should use long options in tests to make clear what we are trying to
do.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotests: Use ldbsearch '--scope instead of '-s'
Andreas Schneider [Thu, 17 Dec 2020 11:25:15 +0000 (12:25 +0100)]
tests: Use ldbsearch '--scope instead of '-s'

We should use long options in tests to make clear what we are trying to
do.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Use 'desired' and 'required' for option 'client ipc signing'
Andreas Schneider [Thu, 3 Dec 2020 14:29:28 +0000 (15:29 +0100)]
docs-xml: Use 'desired' and 'required' for option 'client ipc signing'

For a better user experience we use disabled, desired, required
everywhere now. The arguments auto and mandatory are still working and
synonyms.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodocs-xml: Use 'desired' and 'required' for option 'client signing'
Andreas Schneider [Thu, 3 Dec 2020 14:25:59 +0000 (15:25 +0100)]
docs-xml: Use 'desired' and 'required' for option 'client signing'

For a better user experience we use disabled, desired, required
everywhere now. The arguments auto and mandatory are still working and
synonyms.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoselftest: Specify /dev/null as the smbd config file
Andreas Schneider [Tue, 12 Jan 2021 09:07:56 +0000 (10:07 +0100)]
selftest: Specify /dev/null as the smbd config file

smbd will require a smb.conf later.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:winbind: Pass the 'samba' daemon config file to winbindd
Andreas Schneider [Mon, 11 Jan 2021 15:30:44 +0000 (16:30 +0100)]
s3:winbind: Pass the 'samba' daemon config file to winbindd

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:winbind: Add a missing no memory check
Andreas Schneider [Mon, 11 Jan 2021 15:27:48 +0000 (16:27 +0100)]
s4:winbind: Add a missing no memory check

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agofile_server: Pass the 'samba' daemon config file to smbd
Andreas Schneider [Mon, 11 Jan 2021 15:24:23 +0000 (16:24 +0100)]
file_server: Pass the 'samba' daemon config file to smbd

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agofile_server: Add a missing no memory check
Andreas Schneider [Mon, 11 Jan 2021 15:24:00 +0000 (16:24 +0100)]
file_server: Add a missing no memory check

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:utils: Link py_net only against needed cmdline_contexts library
Andreas Schneider [Mon, 26 Apr 2021 06:15:00 +0000 (08:15 +0200)]
s3:utils: Link py_net only against needed cmdline_contexts library

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agobuild: Use bison at build time rather than lexyacc.sh to build the embedded heimdal
Andrew Bartlett [Mon, 29 Mar 2021 20:39:00 +0000 (09:39 +1300)]
build: Use bison at build time rather than lexyacc.sh to build the embedded heimdal

Because the filenames are changed to the *.tab.{h,c} format
a transitional header is added.

While the built compilers differ, the output of the compilers
and the resulting .o files have been verified not to have changed
on Ubuntu 20.04.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoheimdal: use correct prototype of yyparse()
Andrew Bartlett [Sun, 18 Apr 2021 19:03:47 +0000 (07:03 +1200)]
heimdal: use correct prototype of yyparse()

As noted in 92c6891c368cae5c2402727c1f66f1c60778199d in upstream
Heimdal yyparse() returns an int.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoheimdal_build: Make HEIMDAL_BINARY be based on HEIMDAL_SUBSYSTEM
Andrew Bartlett [Mon, 19 Apr 2021 00:57:38 +0000 (12:57 +1200)]
heimdal_build: Make HEIMDAL_BINARY be based on HEIMDAL_SUBSYSTEM

This is imporatant as it ensures that the warning -> error
logic and overrides are done for source files directly
listed in a HEIMDAL_BINARY and a HEIMDAL_SUBSYSTEM.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoHEIMDAL: Avoid yydebug compiler warning
Viktor Dukhovni [Sun, 13 Nov 2016 19:51:17 +0000 (06:51 +1100)]
HEIMDAL: Avoid yydebug compiler warning

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry-picked from Heimdal commit 17d6d0ac1e8597e91d723399cbe9af9ea2e13f42)

3 years agopython: remove 'from __future__ import unicode_literals'
Douglas Bagnall [Wed, 28 Apr 2021 01:07:51 +0000 (01:07 +0000)]
python: remove 'from __future__ import unicode_literals'

as well as a comment about Python 2 strings, which we don't want to be
reminded of.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/hostconfig: remove 'from __future__ import absolute_import'
Douglas Bagnall [Wed, 28 Apr 2021 01:06:06 +0000 (01:06 +0000)]
python/hostconfig: remove 'from __future__ import absolute_import'

obsolete in Python 3.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython: remove all 'from __future__ import division'
Douglas Bagnall [Wed, 28 Apr 2021 01:04:57 +0000 (01:04 +0000)]
python: remove all 'from __future__ import division'

This made '//' and '/' in Python 2 behave as in Python 3.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>