]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agoctdb-tests: Add debug_locks.sh tests for mutexes
Martin Schwenke [Wed, 6 Jan 2021 10:38:31 +0000 (21:38 +1100)] 
ctdb-tests: Add debug_locks.sh tests for mutexes

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri May 28 07:34:23 UTC 2021 on sn-devel-184

4 years agoctdb-scripts: Add lock debugging for tdb mutex locks
Amitay Isaacs [Fri, 12 Feb 2021 08:13:48 +0000 (19:13 +1100)] 
ctdb-scripts: Add lock debugging for tdb mutex locks

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-utils: Add tdb_mutex_check utility
Amitay Isaacs [Fri, 12 Feb 2021 08:13:11 +0000 (19:13 +1100)] 
ctdb-utils: Add tdb_mutex_check utility

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-scripts: Simplify logic in debug_via_proc_locks()
Martin Schwenke [Mon, 4 Jan 2021 02:35:11 +0000 (13:35 +1100)] 
ctdb-scripts: Simplify logic in debug_via_proc_locks()

The path of the TDB is known, so calculate the file ID (device number
+ inode number) from it and use this to directly filter /proc/locks to
find processes holding locks.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Update debug_locks.sh to handle arguments
Martin Schwenke [Fri, 12 Feb 2021 08:08:37 +0000 (19:08 +1100)] 
ctdb-scripts: Update debug_locks.sh to handle arguments

Don't use the  arguments yet.  They will be used in a simplified
version of the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Move current lock debugging to a function
Martin Schwenke [Fri, 12 Feb 2021 08:07:55 +0000 (19:07 +1100)] 
ctdb-scripts: Move current lock debugging to a function

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-locking: Pass additional arguments to debug locks script
Amitay Isaacs [Tue, 24 Nov 2020 02:25:04 +0000 (13:25 +1100)] 
ctdb-locking: Pass additional arguments to debug locks script

1. PID of lock helper waiting for lock
2. Scope of lock: "record" or "db"
3. Path to database that lock helper is trying to lock
4. Whether the database uses mutexes: "mutex" or "fcntl"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Add debug_locks.sh testing
Martin Schwenke [Wed, 6 Jan 2021 10:38:31 +0000 (21:38 +1100)] 
ctdb-tests: Add debug_locks.sh testing

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Fix nonsense arguments to ps stub
Martin Schwenke [Fri, 12 Feb 2021 07:57:58 +0000 (18:57 +1100)] 
ctdb-tests: Fix nonsense arguments to ps stub

These were fine (though still lazy) when these tests were the only
user of this stub.  However, the ps stub is about to be enhanced, so
fix these uses of it to represent the intended usage.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Avoid direct /proc access
Martin Schwenke [Mon, 4 Jan 2021 00:54:38 +0000 (11:54 +1100)] 
ctdb-scripts: Avoid direct /proc access

The main reason for this is to facilitate testing.

Avoid some /proc accesses entirely by using ps(1) (which can be
replaced by a stub when testing) because this script might as well be
more portable in case anyone wants to add lock debugging for a
non-Linux platform.  While the "state" format specification isn't
POSIX-compliant, it works on both Linux and FreeBSD so it is a
reasonable improvement.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Factor out function dump_stacks()
Martin Schwenke [Fri, 12 Feb 2021 08:14:12 +0000 (19:14 +1100)] 
ctdb-scripts: Factor out function dump_stacks()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agos3:lib: Remove util_cmdline
Andreas Schneider [Wed, 13 Jan 2021 15:14:31 +0000 (16:14 +0100)] 
s3:lib: Remove util_cmdline

                  _  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |   1992 - 2021    ||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//

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): Fri May 28 03:41:52 UTC 2021 on sn-devel-184

4 years agos3:lib: Remove popt_samba3
Andreas Schneider [Wed, 13 Jan 2021 14:01:56 +0000 (15:01 +0100)] 
s3:lib: Remove popt_samba3

                _|_
                 |
             .-'''''-.
          .-'    '-.
       .-'  :::::_:::::  '-.
   ___/ ==:...:::-:::...:== \___
  /_____________________________\
':'-._________________________.-'_
 ':::\ @-,`-[-][-^-][-]-`,-@ / _| |_
  '::| .-------------------. ||_ @ _|
   ::|=|*   ___  _  ___   *|=|'.| |
   ':| |'   ))_) )) ))_)  '| |::.^|
   _:|=|'  ((`\ (( ((     '|=|::::::.
 _| || |'        _        '| |:::::::.
|_   |=|'2003  _( )_  2021'|=|':::::.
  | || |' (   (_ ~ _)   ) '| | ':::'
  |^||=|*  )    (_)    (  *|=| '::'
     | '-------------------' .::::'
     |_____________________.::::::'
   .'___________________.::::::''
   |_______________.::::'':::'''
 .'_____________.::::::''::::''
            .:::''''     .'::::'
         .:::::''':.   .:::::'

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:printing: Migrate samba-bgqd to new cmdline option parser
Andreas Schneider [Tue, 25 May 2021 07:36:48 +0000 (09:36 +0200)] 
s3:printing: Migrate samba-bgqd to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:libsmb: Use cli_credentials to store traversal creds
Andreas Schneider [Wed, 13 Jan 2021 15:11:17 +0000 (16:11 +0100)] 
s3:libsmb: Use cli_credentials to store traversal creds

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update net manpage for new cmdline opition parser
Andreas Schneider [Tue, 19 Jan 2021 06:42:08 +0000 (07:42 +0100)] 
docs-xml: Update net manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Use connection and credentials parser in net util
Andreas Schneider [Tue, 19 Jan 2021 06:49:26 +0000 (07:49 +0100)] 
s3:utils: Use connection and credentials parser in net util

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Add cli_credentials and loadparm_context to net_context
Andreas Schneider [Thu, 1 Apr 2021 10:03:45 +0000 (12:03 +0200)] 
s3:utils: Add cli_credentials and loadparm_context to net_context

Will be filled later.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate net to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:54:58 +0000 (14:54 +0100)] 
s3:utils: Migrate net to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Remove '-l' for '--long' from net
Andreas Schneider [Wed, 13 Jan 2021 13:54:03 +0000 (14:54 +0100)] 
s3:utils: Remove '-l' for '--long' from net

This conflicts with '--log-basename' from the commend cmdline parser.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoexamples: Migrate smb2mount to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:49:07 +0000 (14:49 +0100)] 
examples: Migrate smb2mount to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoexamples: Pass cli_credentials to connect_one in smb2mount
Andreas Schneider [Wed, 13 Jan 2021 13:47:01 +0000 (14:47 +0100)] 
examples: Pass cli_credentials to connect_one in smb2mount

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update smbtree manpage for new cmdline opition parser
Andreas Schneider [Tue, 19 Jan 2021 06:37:48 +0000 (07:37 +0100)] 
docs-xml: Update smbtree manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate smbtree to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:43:17 +0000 (14:43 +0100)] 
s3:utils: Migrate smbtree to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update smbcquotas manpage for new cmdline opition parser
Andreas Schneider [Tue, 19 Jan 2021 06:31:04 +0000 (07:31 +0100)] 
docs-xml: Update smbcquotas manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate smbcquotas to the new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:38:17 +0000 (14:38 +0100)] 
s3:utils: Migrate smbcquotas to the new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Rename --user to --quota-user in smbcquotas
Andreas Schneider [Wed, 13 Jan 2021 13:37:27 +0000 (14:37 +0100)] 
s3:utils: Rename --user to --quota-user in smbcquotas

This conflicts with the common -U|--user option

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Use samba_cmdline_burn() in smbget
Andreas Schneider [Wed, 13 Jan 2021 13:23:31 +0000 (14:23 +0100)] 
s3:utils: Use samba_cmdline_burn() in smbget

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update samba-regedit manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 15:52:48 +0000 (16:52 +0100)] 
docs-xml: Update samba-regedit manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate samba-regedit to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:18:58 +0000 (14:18 +0100)] 
s3:utils: Migrate samba-regedit to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update smbcacls manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 15:50:24 +0000 (16:50 +0100)] 
docs-xml: Update smbcacls manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate smbcacls to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 13:04:04 +0000 (14:04 +0100)] 
s3:utils: Migrate smbcacls to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Use cli_credentials in 'struct cacl_callback_state'
Andreas Schneider [Wed, 13 Jan 2021 13:07:02 +0000 (14:07 +0100)] 
s3:utils: Use cli_credentials in 'struct cacl_callback_state'

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Pass cli_credentials to connect_one()
Andreas Schneider [Wed, 13 Jan 2021 13:00:56 +0000 (14:00 +0100)] 
s3:utils: Pass cli_credentials to connect_one()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:param:py_param - allocate buffer for nt_name and comment
Andrew Walker [Wed, 26 May 2021 13:04:07 +0000 (09:04 -0400)] 
s3:param:py_param - allocate buffer for nt_name and comment

nt_name and comment are allocated via talloc_strdup(). Length
is not guaranteed to be sizeof(fstring) and so rather than use
fstrcpy into a possibly NULL buffer, free original string, then
talloc_strdup() the one provided to us.

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): Thu May 27 22:07:45 UTC 2021 on sn-devel-184

4 years agoloadparam: add option "acl flag inherited canonicalization"
Ralph Boehme [Tue, 25 May 2021 17:04:10 +0000 (19:04 +0200)] 
loadparam: add option "acl flag inherited canonicalization"

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

4 years agosmbd: pass fsp to canonicalize_inheritance_bits()
Ralph Boehme [Tue, 25 May 2021 15:17:17 +0000 (17:17 +0200)] 
smbd: pass fsp to canonicalize_inheritance_bits()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture/smb2: ACL inheritance flags test with non-canonical behaviour
Ralph Boehme [Wed, 26 May 2021 10:31:32 +0000 (12:31 +0200)] 
torture/smb2: ACL inheritance flags test with non-canonical behaviour

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: smbd: Fix uninitialized memory read in process_symlink_open() when used with...
Jeremy Allison [Thu, 27 May 2021 05:41:53 +0000 (22:41 -0700)] 
s3: smbd: Fix uninitialized memory read in process_symlink_open() when used with vfs_shadow_copy2().

Valgrind trace follows.

==3627798== Invalid read of size 1
==3627798==    at 0x483FF46: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==3627798==    by 0x55DE412: strdup (strdup.c:41)
==3627798==    by 0x4F4657E: smb_xstrdup (util.c:660)
==3627798==    by 0x4C62C2E: vfs_ChDir (vfs.c:988)
==3627798==    by 0x4C4A51C: process_symlink_open (open.c:656)
==3627798==    by 0x4C4ADE7: non_widelink_open (open.c:862)
==3627798==    by 0x4C4AFB7: fd_openat (open.c:918)
==3627798==    by 0x4BBE895: openat_pathref_fsp (files.c:506)
==3627798==    by 0x4C48A00: filename_convert_internal (filename.c:2027)
==3627798==    by 0x4C48B77: filename_convert (filename.c:2067)
==3627798==    by 0x4C32408: call_trans2qfilepathinfo (trans2.c:6173)
==3627798==    by 0x4C3C5DA: handle_trans2 (trans2.c:10143)
==3627798==  Address 0xda8bc90 is 96 bytes inside a block of size 217 free'd
==3627798==    at 0x483DA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==3627798==    by 0x4FCA3C9: _tc_free_internal (talloc.c:1222)
==3627798==    by 0x4FCA481: _talloc_free_internal (talloc.c:1248)
==3627798==    by 0x4FCB825: _talloc_free (talloc.c:1792)
==3627798==    by 0xDB248DD: store_cwd_data (vfs_shadow_copy2.c:1473)
==3627798==    by 0xDB24BEF: shadow_copy2_chdir (vfs_shadow_copy2.c:1542)
==3627798==    by 0x4C662A4: smb_vfs_call_chdir (vfs.c:2257)
==3627798==    by 0x4C62B48: vfs_ChDir (vfs.c:940)
==3627798==    by 0x4C4A51C: process_symlink_open (open.c:656)
==3627798==    by 0x4C4ADE7: non_widelink_open (open.c:862)
==3627798==    by 0x4C4AFB7: fd_openat (open.c:918)
==3627798==    by 0x4BBE895: openat_pathref_fsp (files.c:506)
==3627798==  Block was alloc'd at
==3627798==    at 0x483C7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==3627798==    by 0x4FC9365: __talloc_with_prefix (talloc.c:783)
==3627798==    by 0x4FC94FF: __talloc (talloc.c:825)
==3627798==    by 0x4FCCFDC: __talloc_strlendup (talloc.c:2454)
==3627798==    by 0x4FCD096: talloc_strdup (talloc.c:2470)
==3627798==    by 0xDB24977: store_cwd_data (vfs_shadow_copy2.c:1476)
==3627798==    by 0xDB24BEF: shadow_copy2_chdir (vfs_shadow_copy2.c:1542)
==3627798==    by 0x4C662A4: smb_vfs_call_chdir (vfs.c:2257)
==3627798==    by 0x4C62B48: vfs_ChDir (vfs.c:940)
==3627798==    by 0x4C4A92D: non_widelink_open (open.c:755)
==3627798==    by 0x4C4AFB7: fd_openat (open.c:918)
==3627798==    by 0x4BBE895: openat_pathref_fsp (files.c:506)
==3627798==

Even though SMB_VFS_CONNECTPATH() returns a const char,
vfs_shadow_copy2() can free and reallocate this whilst
in use inside process_symlink_open().

Take a copy to make sure we don't reference free'd memory.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 27 17:25:43 UTC 2021 on sn-devel-184

4 years agodocs-xml: Update pdbedit manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 15:28:28 +0000 (16:28 +0100)] 
docs-xml: Update pdbedit manpage for new cmdline opition 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): Tue May 25 01:14:09 UTC 2021 on sn-devel-184

4 years agos3:utils: Migrate pdbedit to the new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:42:53 +0000 (13:42 +0100)] 
s3:utils: Migrate pdbedit to the new cmdline option parser

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate sharesec to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:40:26 +0000 (13:40 +0100)] 
s3:utils: Migrate sharesec to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Remove '-V' for '--viewsddl' from sharesec
Andreas Schneider [Mon, 18 Jan 2021 08:02:22 +0000 (09:02 +0100)] 
s3:utils: Remove '-V' for '--viewsddl' from sharesec

The '-V' is already used for '-V|--version' in the common options.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate spilt_tokens to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:32:24 +0000 (13:32 +0100)] 
s3:utils: Migrate spilt_tokens to new cmdline option parser

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate smbcontrol to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:28:11 +0000 (13:28 +0100)] 
s3:utils: Migrate smbcontrol to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate dbwrap_torture to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:22:32 +0000 (13:22 +0100)] 
s3:utils: Migrate dbwrap_torture to new cmdline option parser

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate smbstatus to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:18:23 +0000 (13:18 +0100)] 
s3:utils: Migrate smbstatus to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update ntlm_auth manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 15:10:03 +0000 (16:10 +0100)] 
docs-xml: Update ntlm_auth manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate ntlm_auth to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 09:57:36 +0000 (10:57 +0100)] 
s3:utils: Migrate ntlm_auth to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib:cmdline: Add a --configfile only parser for ntlm_auth
Andreas Schneider [Wed, 13 Jan 2021 09:56:41 +0000 (10:56 +0100)] 
lib:cmdline: Add a --configfile only parser for ntlm_auth

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update mdfind manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 15:02:10 +0000 (16:02 +0100)] 
docs-xml: Update mdfind manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate mdfind to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 09:44:57 +0000 (10:44 +0100)] 
s3:utils: Migrate mdfind to new cmdline option parser

The signing_state is correctly handled by --client-protection now!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate testparm to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 08:54:52 +0000 (09:54 +0100)] 
s3:utils: Migrate testparm to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib:cmdline: Add a --option only parser for testparm
Andreas Schneider [Wed, 13 Jan 2021 08:57:19 +0000 (09:57 +0100)] 
lib:cmdline: Add a --option only parser for testparm

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate nmblookup to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 08:28:34 +0000 (09:28 +0100)] 
s3:utils: Migrate nmblookup to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Remove duplicate '-R' option from nmblookup
Andreas Schneider [Wed, 13 Jan 2021 08:27:07 +0000 (09:27 +0100)] 
s3:utils: Remove duplicate '-R' option from nmblookup

-R is already use for 'name-resolve'. The long option --recursive is
still working and available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update dbwrap_tool manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 13:10:00 +0000 (14:10 +0100)] 
docs-xml: Update dbwrap_tool manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate dbwrap_tool to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 08:16:31 +0000 (09:16 +0100)] 
s3:utils: Migrate dbwrap_tool to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update profiles manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 09:29:33 +0000 (10:29 +0100)] 
docs-xml: Update profiles manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:utils: Migrate profiles to new cmdline option parser
Andreas Schneider [Tue, 12 Jan 2021 14:45:21 +0000 (15:45 +0100)] 
s3:utils: Migrate profiles to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update smbcacls manpage
Pavel Filipenský [Wed, 19 May 2021 13:10:36 +0000 (15:10 +0200)] 
docs-xml: Update smbcacls manpage

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs: Update list of available commands in rpcclient
Pavel Filipenský [Wed, 19 May 2021 11:12:31 +0000 (13:12 +0200)] 
docs: Update list of available commands in rpcclient

The list of available commands in rpcclient.1 manpage is updated to
match the current state, which is visible via help commnad of rpcclient.

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:rpcclient: Document command of witness protocol
Pavel Filipenský [Wed, 19 May 2021 12:51:00 +0000 (14:51 +0200)] 
s3:rpcclient: Document command of witness protocol

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: smbd: Allow SMB1+UNIX extensions rename of dangling symlink.
Jeremy Allison [Fri, 21 May 2021 17:53:49 +0000 (10:53 -0700)] 
s3: smbd: Allow SMB1+UNIX extensions rename of dangling symlink.

Remove knownfail. Only in master, so no bug number needed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon May 24 17:47:40 UTC 2021 on sn-devel-184

4 years agos3: torture: Add regression test for renaming SMB1+POSIX symlinks, dangling and real.
Jeremy Allison [Fri, 21 May 2021 18:14:19 +0000 (11:14 -0700)] 
s3: torture: Add regression test for renaming SMB1+POSIX symlinks, dangling and real.

Mark as knownfail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: smbd: Remove use of synthetic_pathref() in rename_internals_fsp().
Jeremy Allison [Fri, 21 May 2021 17:27:09 +0000 (10:27 -0700)] 
s3: smbd: Remove use of synthetic_pathref() in rename_internals_fsp().

As we're renaming an open file we don't need to do another
open, we already have an fsp here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agosmbd: correctly initialize close timestamp fields
Ralph Boehme [Mon, 24 May 2021 10:03:28 +0000 (12:03 +0200)] 
smbd: correctly initialize close timestamp fields

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 24 16:56:22 UTC 2021 on sn-devel-184

4 years agotorture: add a test that verifies SMB2 close fields without postqueryattrib
Ralph Boehme [Mon, 24 May 2021 10:21:38 +0000 (12:21 +0200)] 
torture: add a test that verifies SMB2 close fields without postqueryattrib

The server must set all fields to 0 if postqueryattrib is not set.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/smbd: Fix stray line introduced in 470b6223e7283ce1308e0b273eb893d20ab72d5b
Noel Power [Fri, 21 May 2021 07:54:42 +0000 (08:54 +0100)] 
s3/smbd: Fix stray line introduced in 470b6223e7283ce1308e0b273eb893d20ab72d5b

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri May 21 14:14:38 UTC 2021 on sn-devel-184

4 years agos3: smbd: Change set_create_timespec_ea() to take the existing fsp.
Jeremy Allison [Thu, 20 May 2021 16:28:29 +0000 (09:28 -0700)] 
s3: smbd: Change set_create_timespec_ea() to take the existing fsp.

Removes an unneeded synthetic_pathref() call.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May 20 19:59:44 UTC 2021 on sn-devel-184

4 years agolib:util: Fix log level for normal startup message
Dmytro Bagrii [Thu, 13 May 2021 14:53:44 +0000 (17:53 +0300)] 
lib:util: Fix log level for normal startup message

Message "daemon 'smbd' finished starting up and ready to serve connections"
indicates normal startup but printed with 'error' log level and may be mistakenly
treated as error during logs analisys. This patch changes log level to 'info'.

Signed-off-by: Dmytro Bagrii <dimich.dmb@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May 20 15:07:28 UTC 2021 on sn-devel-184

4 years agogitlab-ci: Install devel files for tracker-sparql (spotlight backend)
Andreas Schneider [Tue, 18 May 2021 07:14:09 +0000 (09:14 +0200)] 
gitlab-ci: Install devel files for tracker-sparql (spotlight backend)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May 20 12:01:06 UTC 2021 on sn-devel-184

4 years agos3:smbd: Initialize command for spools printer control
Andreas Schneider [Wed, 19 May 2021 16:32:27 +0000 (18:32 +0200)] 
s3:smbd: Initialize command for spools printer control

./../source3/smbd/lanman.c: In function ‘api_WPrintQueueCtrl’:
../../source3/smbd/lanman.c:3342:9: error: ‘command’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:utils: Migrate tevent_glib_tracker to new cmdline option parser
Andreas Schneider [Tue, 12 Jan 2021 11:58:24 +0000 (12:58 +0100)] 
s3:utils: Migrate tevent_glib_tracker to new cmdline option 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): Thu May 20 03:49:30 UTC 2021 on sn-devel-184

4 years agos3:torture: Migrate pdbtest to new cmdline option parser
Andreas Schneider [Tue, 12 Jan 2021 11:53:08 +0000 (12:53 +0100)] 
s3:torture: Migrate pdbtest to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update vfstest manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 09:24:09 +0000 (10:24 +0100)] 
docs-xml: Update vfstest manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:torture: Migrate vfstest to new cmdline option parser
Andreas Schneider [Tue, 12 Jan 2021 11:08:18 +0000 (12:08 +0100)] 
s3:torture: Migrate vfstest to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Migrate test_mdsparser_es to new cmdline option parser
Andreas Schneider [Wed, 13 Jan 2021 12:53:55 +0000 (13:53 +0100)] 
s3:rpc_server: Migrate test_mdsparser_es to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:lib: Migrate smbconftort to new cmdline option parser
Andreas Schneider [Tue, 12 Jan 2021 10:59:58 +0000 (11:59 +0100)] 
s3:lib: Migrate smbconftort to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:param: Migrate test_lp_load to new cmdline option parser
Andreas Schneider [Fri, 8 Jan 2021 07:27:19 +0000 (08:27 +0100)] 
s3:param: Migrate test_lp_load to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE
Andreas Schneider [Wed, 13 Jan 2021 08:56:41 +0000 (09:56 +0100)] 
lib:cmdline: Add SAMBA_CMDLINE_CONFIG_NONE

This will prevent loading a config file. This will be needed for
testparm.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib:cmdline: Add a debug only option
Andreas Schneider [Tue, 5 Jan 2021 13:23:27 +0000 (14:23 +0100)] 
lib:cmdline: Add a debug only option

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotestprogs: Add additional rpcclient tests for new cmdline options
Andreas Schneider [Wed, 2 Dec 2020 16:15:05 +0000 (17:15 +0100)] 
testprogs: Add additional rpcclient tests for new cmdline options

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotestprogs: Rename test_rpc_getusername_legacy()
Andreas Schneider [Wed, 2 Dec 2020 16:07:14 +0000 (17:07 +0100)] 
testprogs: Rename test_rpc_getusername_legacy()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update rpcclient manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 09:04:47 +0000 (10:04 +0100)] 
docs-xml: Update rpcclient manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpcclient: Migrate rpcclient to new cmdline option parser
Andreas Schneider [Tue, 1 Dec 2020 12:48:03 +0000 (13:48 +0100)] 
s3:rpcclient: Migrate rpcclient to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpcclient: Pass cli_credentials to process_cmd()
Andreas Schneider [Tue, 1 Dec 2020 12:50:16 +0000 (13:50 +0100)] 
s3:rpcclient: Pass cli_credentials to process_cmd()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpcclient: Pass cli_credentials to do_cmd()
Andreas Schneider [Tue, 1 Dec 2020 12:49:16 +0000 (13:49 +0100)] 
s3:rpcclient: Pass cli_credentials to do_cmd()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotestprogs: Add more smbclient kerberos tests for new cmdline options
Andreas Schneider [Wed, 2 Sep 2020 08:44:36 +0000 (10:44 +0200)] 
testprogs: Add more smbclient kerberos tests for new cmdline options

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodocs-xml: Update smbclient manpage for new cmdline opition parser
Andreas Schneider [Mon, 18 Jan 2021 08:35:51 +0000 (09:35 +0100)] 
docs-xml: Update smbclient manpage for new cmdline opition parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:client: Use samba_popt_get_context()
Andreas Schneider [Wed, 11 Nov 2020 08:56:41 +0000 (09:56 +0100)] 
s3:client: Use samba_popt_get_context()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:client: Remove duplicate name-resolv (R) options
Andreas Schneider [Mon, 9 Nov 2020 15:05:38 +0000 (16:05 +0100)] 
s3:client: Remove duplicate name-resolv (R) options

Detected by samba_popt_get_context(), see next commit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:client: Migrate smbclient to new cmdline option parser
Andreas Schneider [Tue, 18 Aug 2020 14:58:19 +0000 (16:58 +0200)] 
s3:client: Migrate smbclient to new cmdline option parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: Rename offline logon env to ad_member_offlogon
Andreas Schneider [Wed, 19 May 2021 06:18:22 +0000 (08:18 +0200)] 
selftest: Rename offline logon env to ad_member_offlogon

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 19 20:01:00 UTC 2021 on sn-devel-184

4 years agos3: smbd: Ensure POSIX default ACL is mapped into returned Windows ACL for directory...
Jeremy Allison [Mon, 17 May 2021 22:34:55 +0000 (15:34 -0700)] 
s3: smbd: Ensure POSIX default ACL is mapped into returned Windows ACL for directory handles.

Remove knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed May 19 09:22:56 UTC 2021 on sn-devel-184