]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
3 years agosmbd: Factor out extract_snapshot_token() from canonicalize_snapshot_path()
Volker Lendecke [Thu, 14 Jul 2022 13:13:40 +0000 (15:13 +0200)] 
smbd: Factor out extract_snapshot_token() from canonicalize_snapshot_path()

We'll use this elsewhere soon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbd: Simplify canonicalize_snapshot_path()
Volker Lendecke [Tue, 12 Jul 2022 15:08:19 +0000 (17:08 +0200)] 
smbd: Simplify canonicalize_snapshot_path()

All we need to do is to convert the @GMT-Token and move the
rest. Before this patch we did a lot of talloc to move the @GMT token
to the beginning of the path only to cut it off immediately
again. Merge that logic into a simple memmove()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbd: Don't create a fsp->base_fsp for a "::$DATA" stream
Volker Lendecke [Mon, 13 Jun 2022 14:15:21 +0000 (16:15 +0200)] 
smbd: Don't create a fsp->base_fsp for a "::$DATA" stream

"::$DATA" is the main file, we don't need the overhead of base_fsp here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agotorture3: Fix an error check in torture_delete_fn()
Volker Lendecke [Tue, 28 Jun 2022 09:58:19 +0000 (11:58 +0200)] 
torture3: Fix an error check in torture_delete_fn()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoregistry3: Align an integer type
Volker Lendecke [Fri, 1 Jul 2022 16:24:53 +0000 (18:24 +0200)] 
registry3: Align an integer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoregistry3: Align function types to what is returned
Volker Lendecke [Fri, 1 Jul 2022 16:24:31 +0000 (18:24 +0200)] 
registry3: Align function types to what is returned

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agolib: Simplify canonicalize_absolute_path()
Volker Lendecke [Tue, 5 Jul 2022 11:48:18 +0000 (13:48 +0200)] 
lib: Simplify canonicalize_absolute_path()

We don't need the separate "wrote_slash" boolean variable, we can just
look at what we wrote into p[-1]

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agolib: Remove a few #include "includes.h"
Volker Lendecke [Sat, 25 Jun 2022 09:07:44 +0000 (11:07 +0200)] 
lib: Remove a few #include "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbd: Avoid a "? True : False"
Volker Lendecke [Fri, 17 Jun 2022 07:38:24 +0000 (09:38 +0200)] 
smbd: Avoid a "? True : False"

Just came across this, looked weird...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbd: Open up openat_internal_dir_from_pathref() for general dirs
Volker Lendecke [Fri, 15 Jul 2022 13:26:33 +0000 (15:26 +0200)] 
smbd: Open up openat_internal_dir_from_pathref() for general dirs

We open "." fixed here, and fd_openat (or rather SMB_VFS_OPENAT) will
tell us if "dirfsp" does not point at a proper directory

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agolib: On FreeBSD util_paths.c does not find struct stat
Volker Lendecke [Fri, 22 Jul 2022 17:08:10 +0000 (19:08 +0200)] 
lib: On FreeBSD util_paths.c does not find struct stat

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Jul 24 00:25:49 UTC 2022 on sn-devel-184

3 years agolib: Fix the 32-bit build
Volker Lendecke [Fri, 22 Jul 2022 17:25:20 +0000 (19:25 +0200)] 
lib: Fix the 32-bit build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agotorture: Fix the 32-bit build
Volker Lendecke [Fri, 22 Jul 2022 17:25:37 +0000 (19:25 +0200)] 
torture: Fix the 32-bit build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Fix the FreeBSD build
Volker Lendecke [Fri, 22 Jul 2022 17:36:59 +0000 (19:36 +0200)] 
lib: Fix the FreeBSD build

"time_t" only comes in via a proper include of <time.h>

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agowinbind: Fix a "format string is not a string literal" warning
Volker Lendecke [Fri, 22 Jul 2022 17:34:57 +0000 (19:34 +0200)] 
winbind: Fix a "format string is not a string literal" warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agowinbind: Fix the 32-bit build
Volker Lendecke [Fri, 22 Jul 2022 17:17:15 +0000 (19:17 +0200)] 
winbind: Fix the 32-bit build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agogpo: samba-gpupdate use s3 param for registry conf
David Mulder [Mon, 18 Jul 2022 15:19:24 +0000 (09:19 -0600)] 
gpo: samba-gpupdate use s3 param for registry conf

Cause samba-gpupdate to use an s3 param so that
it can load settings from registry configuration.

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): Fri Jul 22 20:40:51 UTC 2022 on sn-devel-184

3 years agoctdb-build: Add missing dependency on talloc
Martin Schwenke [Fri, 22 Jul 2022 01:41:57 +0000 (11:41 +1000)] 
ctdb-build: Add missing dependency on talloc

The include isn't strictly necessary, since it is included via
common/reqid.c anyway.  However, it is a useful hint.

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 Jul 22 17:01:00 UTC 2022 on sn-devel-184

3 years agoctdb-tests: Work around unreadable file test failure when root
Martin Schwenke [Fri, 22 Jul 2022 01:05:21 +0000 (11:05 +1000)] 
ctdb-tests: Work around unreadable file test failure when root

root can read files for which the mode prohibits reading, so this test
case fails when run as root.  Work around this when running as root.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Use "git config" as last resort to parse nfs.conf
Martin Schwenke [Thu, 21 Jul 2022 04:22:25 +0000 (14:22 +1000)] 
ctdb-scripts: Use "git config" as last resort to parse nfs.conf

Some versions of nfs-utils (e.g. recent CentOS 7) use /etc/nfs.conf
but do not include the nfsconf utility to extract values from the
file.  However, git has an excellent conf file parser, so use it as a
last resort.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Avoid ShellCheck warning SC2295
Martin Schwenke [Fri, 27 May 2022 13:23:48 +0000 (23:23 +1000)] 
ctdb-scripts: Avoid ShellCheck warning SC2295

For example:

In /home/martins/samba/samba/ctdb/tools/onnode line 304:
    [ "$nodes" != "${nodes%[ ${nl}]*}" ] && verbose=true
                             ^---^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
    [ "$nodes" != "${nodes%[ "${nl}"]*}" ] && verbose=true

For more information:
  https://www.shellcheck.net/wiki/SC2295 -- Expansions inside ${..} need to b...

Who knew?  Thanks ShellCheck!

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-common: Use POSIX if_nameindex() to check interface existence
Martin Schwenke [Tue, 5 Jul 2022 02:31:57 +0000 (12:31 +1000)] 
ctdb-common: Use POSIX if_nameindex() to check interface existence

This works as an unprivileged user, so avoids unnecessary errors when
running in test mode (and not as root):

  2022-02-18T12:21:12.436491+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket
  2022-02-18T12:21:12.436534+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket
  2022-02-18T12:21:12.436557+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket
  2022-02-18T12:21:12.436577+11:00 node.0 ctdbd[6958]: ctdb_sys_check_iface_exists: Failed to open raw socket

The corresponding porting test would now become pointless because it
would just confirm that "fake" does not exist.  Attempt to make it
useful by using a less likely name than "fake" and attempting to
detect the loopback interface.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoreplace: Add check for if_nameindex()
Martin Schwenke [Thu, 21 Jul 2022 01:25:37 +0000 (11:25 +1000)] 
replace: Add check for if_nameindex()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-daemon: Modernise debug in ctdb_add_public_address()
Martin Schwenke [Tue, 5 Jul 2022 02:17:05 +0000 (12:17 +1000)] 
ctdb-daemon: Modernise debug in ctdb_add_public_address()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-daemon: Avoid spurious error sending ARPs for released IP
Martin Schwenke [Thu, 23 Jun 2022 04:30:34 +0000 (14:30 +1000)] 
ctdb-daemon: Avoid spurious error sending ARPs for released IP

A public IP address can be released in between (and probably before)
attempts to send ARPs.  One situation when this can occur is when a
cluster is shutting down: node A shuts down first, public IPs from
node A are taken over by node B, node B is shutdown.

Notice this when it occurs and cancel further attempts to send ARPs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-daemon: Modernise debug in ctdb_control_send_arp()
Martin Schwenke [Tue, 5 Jul 2022 09:33:15 +0000 (19:33 +1000)] 
ctdb-daemon: Modernise debug in ctdb_control_send_arp()

For the tickle ACK logging, render the connection in a buffer.  This
produces more complete information.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-protocol: Add separator argument to ctdb_connection_to_buf()
Martin Schwenke [Tue, 19 Jul 2022 01:53:15 +0000 (11:53 +1000)] 
ctdb-protocol: Add separator argument to ctdb_connection_to_buf()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-daemon: Drop unused ban_state element from CTDB node structure
Martin Schwenke [Wed, 29 Jul 2020 03:39:03 +0000 (13:39 +1000)] 
ctdb-daemon: Drop unused ban_state element from CTDB node structure

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Clean up banning culprit code
Martin Schwenke [Wed, 29 Jul 2020 03:30:04 +0000 (13:30 +1000)] 
ctdb-recoverd: Clean up banning culprit code

Make this fully self-contained in the recovery daemon and avoid
indexing by PNN.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Add pnn field to banning state structure
Martin Schwenke [Wed, 29 Jul 2020 02:15:03 +0000 (12:15 +1000)] 
ctdb-recoverd: Add pnn field to banning state structure

This structure is now standalone, so indexing by PNN can be avoided
via a subsequent commit.  Index by culprit here to make this commit
simple.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-recoverd: Add function node_flags() and use it in elections
Martin Schwenke [Wed, 29 Jul 2020 07:57:53 +0000 (17:57 +1000)] 
ctdb-recoverd: Add function node_flags() and use it in elections

Indexing a node map by PNN is suboptimal.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Only run unhealthy call-out when passing threshold
Martin Schwenke [Fri, 10 Jun 2022 00:32:01 +0000 (10:32 +1000)] 
ctdb-scripts: Only run unhealthy call-out when passing threshold

For memory usage, no need to dump all of this data on every failed
monitor event.  The first call will be enough to diagnose the problem.
The node will then go unhealthy, drop clients and memory usage should
then drop.

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 Jul 22 07:32:54 UTC 2022 on sn-devel-184

3 years agoctdb-scripts: Always check memory usage
Martin Schwenke [Fri, 10 Jun 2022 00:03:41 +0000 (10:03 +1000)] 
ctdb-scripts: Always check memory usage

If filesystem usage exceeds the unhealthy threshold then checking
memory usage checking is not done.  Always do them both.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Avoid ShellCheck info SC2162
Martin Schwenke [Fri, 10 Jun 2022 00:28:56 +0000 (10:28 +1000)] 
ctdb-scripts: Avoid ShellCheck info SC2162

SC2162 (info): read without -r will mangle backslashes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Reduce length of very long lines
Martin Schwenke [Wed, 29 Jun 2022 22:55:28 +0000 (08:55 +1000)] 
ctdb-scripts: Reduce length of very long lines

Use printf to allow easier line breaks and use some early returns.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: De-clutter validate_percentage()
Martin Schwenke [Fri, 10 Jun 2022 00:17:28 +0000 (10:17 +1000)] 
ctdb-scripts: De-clutter validate_percentage()

It always takes 2 arguments.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Reformat using shfmt -w -p -i 0 -fn
Martin Schwenke [Fri, 10 Jun 2022 00:13:22 +0000 (10:13 +1000)] 
ctdb-scripts: Reformat using shfmt -w -p -i 0 -fn

About to modify this file, so reformat first as per recent Samba
convention.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agoctdb-scripts: Avoid ShellCheck warning SC2164
Martin Schwenke [Fri, 10 Jun 2022 00:11:27 +0000 (10:11 +1000)] 
ctdb-scripts: Avoid ShellCheck warning SC2164

SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

A problem can only occur if /etc/ctdb/ or an important subdirectory is
removed, which means the script itself would not be found.  Use && to
silence ShellCheck.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
3 years agosmbd: Bypass the vfs_gethandle data for default share IPC$
dinesh [Thu, 26 May 2022 05:06:04 +0000 (10:36 +0530)] 
smbd: Bypass the vfs_gethandle data for default share IPC$

During gpfs_connect for default share of IPC$ not setting the handle data but during the vfs_gpfs_capabilities
for the default share IPC$ the get handle data was called and observing error log failed to get vfs_handle->data!
so to bypass this error log the condition check if IS_IPC share is added in make_connection_snum while calling SMB_VFS_FS_CAPABILITIES

Signed-off-by:Dinesh <dinesh.kumar.reddy@ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 22 05:27:53 UTC 2022 on sn-devel-184

3 years agothird_party: Update socket_wrapper to version 1.3.4
Andreas Schneider [Thu, 21 Jul 2022 12:55:31 +0000 (14:55 +0200)] 
third_party: Update socket_wrapper to version 1.3.4

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3:winbind: Add additional debug level check to wb_lookupsids_send()
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Add additional debug level check to wb_lookupsids_send()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 21 14:41:53 UTC 2022 on sn-devel-184

3 years agos3:winbind: Add additional debug level check to winbindd_getsidaliases_send()
Pavel Filipenský [Tue, 19 Jul 2022 14:25:13 +0000 (16:25 +0200)] 
s3:winbind: Add additional debug level check to winbindd_getsidaliases_send()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Add additional debug level check to winbindd_getgroups_recv()
Pavel Filipenský [Tue, 19 Jul 2022 14:21:57 +0000 (16:21 +0200)] 
s3:winbind: Add additional debug level check to winbindd_getgroups_recv()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Add additional debug level check to wb_gettoken_recv()
Pavel Filipenský [Tue, 19 Jul 2022 14:48:09 +0000 (16:48 +0200)] 
s3:winbind: Add additional debug level check to wb_gettoken_recv()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getsidaliases.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getsidaliases.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_xids_to_sids.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_xids_to_sids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_sids_to_xids.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_sids_to_xids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_list_users.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_list_users.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_list_groups.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_list_groups.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getusersids.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getusersids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getuserdomgroups.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getuserdomgroups.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getpwent.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getpwent.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgroups.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgroups.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrnam.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:11 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrnam.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrgid.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrgid.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrent.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in winbindd_getgrent.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupsids.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupsids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_xids2sids.c
Pavel Filipenský [Tue, 19 Jul 2022 09:11:53 +0000 (11:11 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_xids2sids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_sids2xids.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_sids2xids.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_queryuser.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_queryuser.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_query_user_list.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_query_user_list.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_query_group_list.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_query_group_list.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_next_pwent.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_next_pwent.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupusergroups.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupusergroups.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupuseraliases.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_lookupuseraliases.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_group_members.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_group_members.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_gettoken.c
Pavel Filipenský [Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)] 
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_gettoken.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoREADME.Coding: PRINT format specifiers PRIuxx
Pavel Filipenský [Tue, 19 Jul 2022 09:46:13 +0000 (11:46 +0200)] 
README.Coding: PRINT format specifiers PRIuxx

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agoAdd a .clang-format file
Andreas Schneider [Tue, 19 Jul 2022 13:38:27 +0000 (15:38 +0200)] 
Add a .clang-format file

How to use:

Install 'git-format-clang' which is part of the clang suite (Fedora:
git-clang-format, openSUSE: clang-tools).

Now do your changes and stage them with `git add`. Once they are staged
format the code using `git clang-format` before you commit.

Now the formatting changed can be viewed with `git diff` against the
staged changes.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jul 20 18:23:49 UTC 2022 on sn-devel-184

3 years agotestprogs: Reformat common_test_fns.inc
Andreas Schneider [Wed, 8 Jun 2022 12:49:51 +0000 (14:49 +0200)] 
testprogs: Reformat common_test_fns.inc

shfmt -w -p -i 0 -fn testprogs/blackbox/common_test_fns.inc

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Jul 20 11:59:26 UTC 2022 on sn-devel-184

3 years agotestprogs: Reformat common-links.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat common-links.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/common-links.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agowaf: Check for -Wno-error=array-bounds flags
Andreas Schneider [Mon, 18 Jul 2022 08:39:05 +0000 (10:39 +0200)] 
waf: Check for -Wno-error=array-bounds flags

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jul 19 12:17:35 UTC 2022 on sn-devel-184

3 years agos3:tests: Add test to access msdfs path with smbget
Andreas Schneider [Tue, 12 Jul 2022 09:19:13 +0000 (11:19 +0200)] 
s3:tests: Add test to access msdfs path with smbget

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): Tue Jul 19 00:10:10 UTC 2022 on sn-devel-184

3 years agos3:rpcclient: Goto done in cmd_samr_setuserinfo_int()
Andreas Schneider [Thu, 19 Aug 2021 10:09:28 +0000 (12:09 +0200)] 
s3:rpcclient: Goto done in cmd_samr_setuserinfo_int()

We need to free the frame or we will run into:
    smb_panic (why=0x7fa8c511aa88 "Frame not freed in order.")

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

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): Mon Jul 18 21:21:59 UTC 2022 on sn-devel-184

3 years agos3:winbind: Add additional debug level check to wb_xids2sids_recv()
Andreas Schneider [Mon, 18 Jul 2022 11:28:50 +0000 (13:28 +0200)] 
s3:winbind: Add additional debug level check to wb_xids2sids_recv()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 18 14:44:07 UTC 2022 on sn-devel-184

3 years agos3:winbind: Fix pointer access in wb_xids2sids_recv()
Andreas Schneider [Mon, 18 Jul 2022 07:20:22 +0000 (09:20 +0200)] 
s3:winbind: Fix pointer access in wb_xids2sids_recv()

CID 1507348
CID 1507349

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbind: Add additional debug level check to wb_lookupusergroups_recv()
Andreas Schneider [Mon, 18 Jul 2022 11:26:58 +0000 (13:26 +0200)] 
s3:winbind: Add additional debug level check to wb_lookupusergroups_recv()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbind: Fix pointer access in wb_lookupusergroups_recv()
Andreas Schneider [Mon, 18 Jul 2022 07:18:59 +0000 (09:18 +0200)] 
s3:winbind: Fix pointer access in wb_lookupusergroups_recv()

Fixes CID 1507350

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3:winbind: Change max_users, num_users from int to uint32_t in winbindd_getpwent_state
Pavel Filipenský [Thu, 14 Jul 2022 11:19:44 +0000 (13:19 +0200)] 
s3:winbind: Change max_users, num_users from int to uint32_t in winbindd_getpwent_state

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 15 15:21:23 UTC 2022 on sn-devel-184

3 years agos3:winbind: Change num_gids from int to uint32_t in winbindd_getgroups_state
Pavel Filipenský [Thu, 14 Jul 2022 11:19:44 +0000 (13:19 +0200)] 
s3:winbind: Change num_gids from int to uint32_t in winbindd_getgroups_state

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change max_groups, num_groups from int to uint32_t in getpwent_state
Pavel Filipenský [Thu, 14 Jul 2022 11:19:44 +0000 (13:19 +0200)] 
s3:winbind: Change max_groups, num_groups from int to uint32_t in getpwent_state

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_groups, next_group from int to uint32_t in wb_group_members.c
Pavel Filipenský [Thu, 14 Jul 2022 11:19:43 +0000 (13:19 +0200)] 
s3:winbind: Change num_groups, next_group from int to uint32_t in wb_group_members.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_groups from int to uint32_t in wb_query_group_list_recv()
Pavel Filipenský [Thu, 14 Jul 2022 11:19:44 +0000 (13:19 +0200)] 
s3:winbind: Change num_groups from int to uint32_t in wb_query_group_list_recv()

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_received, num_domains from int to uint32_t in winbindd_list_gr...
Pavel Filipenský [Thu, 14 Jul 2022 11:19:44 +0000 (13:19 +0200)] 
s3:winbind: Change num_received, num_domains from int to uint32_t in winbindd_list_groups_state

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_sids from int to uint32_t in wb_lookupusergroups_recv()
Pavel Filipenský [Mon, 11 Jul 2022 20:41:46 +0000 (22:41 +0200)] 
s3:winbind: Change num_sids from int to uint32_t in wb_lookupusergroups_recv()

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_sids from int to uint32_t in wb_lookupuseraliases_send()
Pavel Filipenský [Mon, 11 Jul 2022 20:39:06 +0000 (22:39 +0200)] 
s3:winbind: Change num_sids from int to uint32_t in wb_lookupuseraliases_send()

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Change num_sids from int to uint32_t in wb_gettoken_recv()
Pavel Filipenský [Mon, 11 Jul 2022 19:40:08 +0000 (21:40 +0200)] 
s3:winbind: Change num_sids from int to uint32_t in wb_gettoken_recv()

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Fix trailing whitespace in winbindd.h
Pavel Filipenský [Thu, 14 Jul 2022 11:44:16 +0000 (13:44 +0200)] 
s3:winbind: Fix trailing whitespace in winbindd.h

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_sids2xids.c
Pavel Filipenský [Tue, 7 Jun 2022 17:42:37 +0000 (19:42 +0200)] 
s3:winbind: Improve logging in wb_sids2xids.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_query_user_list.c
Pavel Filipenský [Fri, 24 Jun 2022 13:31:03 +0000 (15:31 +0200)] 
s3:winbind: Improve logging in wb_query_user_list.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_queryuser.c
Pavel Filipenský [Tue, 7 Jun 2022 17:35:16 +0000 (19:35 +0200)] 
s3:winbind: Improve logging in wb_queryuser.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_query_group_list.c
Pavel Filipenský [Fri, 24 Jun 2022 13:41:21 +0000 (15:41 +0200)] 
s3:winbind: Improve logging in wb_query_group_list.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_next_pwent.c
Pavel Filipenský [Wed, 22 Jun 2022 18:18:35 +0000 (20:18 +0200)] 
s3:winbind: Improve logging in wb_next_pwent.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_next_grent.c
Pavel Filipenský [Fri, 24 Jun 2022 13:10:39 +0000 (15:10 +0200)] 
s3:winbind: Improve logging in wb_next_grent.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_lookupusergroups.c
Pavel Filipenský [Sun, 19 Jun 2022 18:48:31 +0000 (20:48 +0200)] 
s3:winbind: Improve logging in wb_lookupusergroups.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_lookupuseraliases.c
Pavel Filipenský [Tue, 7 Jun 2022 17:36:59 +0000 (19:36 +0200)] 
s3:winbind: Improve logging in wb_lookupuseraliases.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_lookupsids.c
Pavel Filipenský [Sat, 11 Jun 2022 15:45:15 +0000 (17:45 +0200)] 
s3:winbind: Improve logging in wb_lookupsids.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_lookupsid.c
Pavel Filipenský [Tue, 7 Jun 2022 17:36:16 +0000 (19:36 +0200)] 
s3:winbind: Improve logging in wb_lookupsid.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_lookupname.c
Pavel Filipenský [Wed, 22 Jun 2022 21:39:52 +0000 (23:39 +0200)] 
s3:winbind: Improve logging in wb_lookupname.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
3 years agos3:winbind: Improve logging in wb_group_members.c
Pavel Filipenský [Thu, 23 Jun 2022 08:40:53 +0000 (10:40 +0200)] 
s3:winbind: Improve logging in wb_group_members.c

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