1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-14 00:58:38 +03:00

140335 Commits

Author SHA1 Message Date
Douglas Bagnall
c1cac5967e manpages:samba-tool: sort 'service-account' into place alphabetically
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Mar 12 20:55:01 UTC 2025 on atb-devel-224
2025-03-12 20:55:01 +00:00
Douglas Bagnall
2b09cc32d5 manpages: samba-tool gpo manage smb_conf list/set
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
1319a21c94 pytests: samba_tool.help checks you updated the man page
It tries to help by printing something that is a little bit like the
correct DocBook text to insert.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
71061b7f16 pytest:samba-tool: .check_output() can set environment
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
41ef18fe7e manpages:samba-tool user sensitive
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
192b871bca manpages:samba-tool user addunixattrs
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
439e7c8acc manpages:samba-tool ntacl getdosinfo (stub)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
218926d8a0 manpages:samba-tool group addunixattrs
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
aa30400622 manpages:samba-tool gpo restore typo
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
05137ca07a manpages:samba-tool gpo manage security set
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
bfa3ff6362 manpages:samba-tool gpo manage security list
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
73bc0a406c manpages:samba-tool: separate passwordsettings set/show
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
fbc34719ad manpages:samba-tool: document -V,--version
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
d481da327d manpages:samba-tool: document -H options
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
7501bcd7b9 manpages:samba-tool --help is not man text
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
a975f5c180 manpages:samba-tool preamble for common options
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
1f34e45b43 manpages: samba-tool gpo load
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
48b2103a8c manpages: samba-tool gpo cse register
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
b1be087180 manpages: samba-tool cse list
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
1bf60aa2ba manpages: samba-tool gpo backup
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
2e77a148dd manpages: samba-tool gpo admx load
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
0ab86dd7ca python:getopt: hack to generate docbook stubs from --help
We have many many samba-tool subcommands that are not documented in
the manpage. Often the --help text is a good place to start, but doing
it entirely manually is VERY tedious.

This automates some of the process.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
7ec9973f02 manpages: samba-tool gpo aclcheck
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
22d5d675a1 manpages: samba-tool drs uptodateness
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
7183da7583 manpages: samba-tool drs clone-dc-database
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
f778c883ab manpages:samba-tool domain tombstones expunge
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
5f1894485f manpages: samba-tool domain: consistent sddl example
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
6978e93896 manpages: samba-tool processes
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
7f01b474b7 manpages: samba-tool domain schemaupgrade
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
612cf9f01a manpages: samba-tool kds root-key sub-options
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
60ea603847 manpages: samba-tool domain functionalprep
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
4b5d66e288 manpages: samba-tool dns zoneoptions
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
786c77ff9e manpages: add samba-tool dns cleanup
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Douglas Bagnall
1c01a61268 manpages: add samba-tool delegation {add,del}-principal
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-03-12 19:57:34 +00:00
Dmitry Antipov
5e8f998efa pylibsmb: do not use obsolete PyEval_InitThreads() for Python > 3.6
Do not use obsolete PyEval_InitThreads() for Python > 3.6:

../../source3/libsmb/pylibsmb.c: In function ‘py_cli_state_setup_mt_ev’:
../../source3/libsmb/pylibsmb.c:271:9: warning: ‘PyEval_InitThreads’ is
deprecated [-Wdeprecated-declarations]
  271 |         PyEval_InitThreads();
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/Python.h:95,
                 from ../../source3/libsmb/pylibsmb.c:48:
/usr/include/python3.11/ceval.h:132:37: note: declared here
  132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Mar 12 04:36:21 UTC 2025 on atb-devel-224
2025-03-12 04:36:21 +00:00
Dmitry Antipov
90c04dd62c pylibsmb: fix cast warnings in Python method definitions
Fix the following cast warnings in Python method definitions:

../../source3/libsmb/pylibsmb.c:1867:28: warning: cast between incompatible
function types from ‘PyObject * (*)(struct py_cli_notify_state *, PyObject *,
PyObject *)’ {aka ‘struct _object * (*)(struct py_cli_notify_state *, struct
_object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’
{aka ‘struct _object * (*)(struct _object *, struct _object *)’}
[-Wcast-function-type]
 1867 |                 .ml_meth = (PyCFunction)py_cli_notify_get_changes,
      |                            ^

../../source3/libsmb/pylibsmb.c:2661:11: warning: cast between incompatible
function types from ‘PyObject * (*)(struct py_cli_state *, PyObject *,
PyObject *)’ {aka ‘struct _object * (*)(struct py_cli_state *, struct
_object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’
{aka ‘struct _object * (*)(struct _object *, struct _object *)’}
[-Wcast-function-type]
 2661 |           (PyCFunction)py_cli_fsctl,
      |           ^

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-03-12 03:38:34 +00:00
Douglas Bagnall
e64e533c77 librpc/wsp: use unsigned char for high byte comparison
../../librpc/wsp/wsp_util.c:244:28: warning: result of comparison of constant 160 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
  244 |                 if (strlen(t) == 1 && *t == 0xa0) {

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
2025-03-12 03:38:34 +00:00
Douglas Bagnall
495ca09cb7 s4/ldap server: avoid NULL deref if search control has no data
We switch to ldb_request_replace_control() so that the old search
control is removed in the NULL data case.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
2025-03-12 03:38:34 +00:00
Ralph Boehme
b85f056e73 s3/lib: fix matching interfaces with multiple assigned IPs
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15823

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Mar 12 01:32:30 UTC 2025 on atb-devel-224
2025-03-12 01:32:30 +00:00
Xavi Hernandez
a52602030e vfs_ceph_new: detect case sensitivity in CephFS
CephFS has recently added support for case insensitive access to the
file system. This modification detects whether the shared volume is case
sensitive or not and reports the FILE_CASE_SENSITIVE_SEARCH capability
accordingly.

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

Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Mar 11 20:34:26 UTC 2025 on atb-devel-224
2025-03-11 20:34:26 +00:00
Pavel Filipenský
5cadaf91bc s3:utils: Remove call of ads_startup() from net_ads_keytab_create()
Calling ads_startup() is not needed in net_ads_keytab_create.  Keytab
creation code in sync_pw2keytabs() decides if it needs to talk to DC or
not and connects to AD accordingly.

Fixing this, makes the bug below easier to reproduce using
'net ads keytab create'.

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Mon Mar 10 11:09:29 UTC 2025 on atb-devel-224
2025-03-10 11:09:29 +00:00
Pavel Filipenský
c72554260c s3:libads: Make sure that REALM is always added to keytab principals
The code responsible for adding SPNs to keytab should always set the
REALM part.  Current code is not adding it for e.g. SPNs synced from AD.

If REALM is missing, krb5_parse_name() will succeed (and add the REALM)
only if the krb5.conf contains libdefaults section with
default_realm set and will fail otherwise. E.g.:

[libdefaults]
	default_realm = SOMETESTDOMAIN1.MY.COM

When calling 'net ads join' we get the following error if SPN is missing
REALM and krb5.conf does not provide the default_realm:

pw2kt_process_add_info: Failed to parse principal:
RestrictedKrbHost/$MACHINE_NAME
Failed to join domain: failed to create kerberos keytab

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

Pair-Programmed-With: Noel Power <noel.power@suse.com>

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Sun Mar  9 00:25:08 UTC 2025 on atb-devel-224
2025-03-09 00:25:08 +00:00
Pavel Filipenský
cf34645050 lib:krb5_wrap: Add smb_krb5_parse_name_flags()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15727

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2025-03-08 23:26:30 +00:00
Ralph Boehme
8831eec914 docs-xml: enable SMB3 Unix Extensions by default
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Mar  7 20:06:31 UTC 2025 on atb-devel-224
2025-03-07 20:06:31 +00:00
Ralph Boehme
a2f127db4a s3/param: remove widelinks check and warning for SMB3 UNIX Extensions
SMB3 POSIX clients won't be able to create real symlinks, so we can relax these
checks.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2025-03-07 19:00:32 +00:00
Ralph Boehme
e8b49a59ee s3:locking: make sure brl_conflict_posix() is only called with 2 POSIX_LOCKS
Otherwise we hit the assert if the caller is a windows lock
and the conflicting one a posix lock.

Or in the non-developer build we don't enforce the windows locking
rules.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-03-07 19:00:32 +00:00
Ralph Boehme
0a1e363815 s3:locking: assert POSIX_LOCK in brl_[un]lock_posix()
This makes it clearer and prevents possible problems in future.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-03-07 19:00:32 +00:00
Stefan Metzmacher
c779bb7c85 s3:locking: init_strict_lock_struct() already calls lp_posix_cifsu_locktype()
There is no need to do it in the caller and pass an unused argument.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-03-07 19:00:32 +00:00
Ralph Boehme
2bdf72a822 smbd: fix lock_flav initialization in smbd_smb2_lock_send()
Right above we did

        if (posix_handle) {
                locks[i].lock_flav = POSIX_LOCK;
        } else {
                locks[i].lock_flav = WINDOWS_LOCK;
        }

which came in with commit f68fffa85d1de992384a210bb0b9261cda3fb168,
apparently forgetting to remove the previously existing initialization
locks[i].lock_flav=WINDOWS_LOCK.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-03-07 19:00:32 +00:00
Ralph Boehme
ce8a65054d smbd: fix check for POSIX opens in have_file_open_below()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-03-07 19:00:32 +00:00