[SCM] Samba Shared Repository - branch master updated

2021-10-12 Thread Jeremy Allison
The branch, master has been updated
   via  fc2347be4ed Fix detection of rpc/xdr.h on macOS
   via  99ee7f3d89c vfs_preopen.c: Fix -Wformat error on macOS
   via  1d893f72320 source3/smbd/statcache.c: Fix -Wformat build error on 
macOS
   via  6dadf251fc0 sec_ctx.c: Fix -Wunused-function warning on macOS
   via  e4eb1f15101 source3/printing/queue_process.c: fix build on macOS
   via  d3675e66fe8 audit_logging.c: fix compilation on macOS
   via  2564e96e831 charset_macosxfs.c: fix compilation on macOS
  from  1719ef7893a ctdb-tests: Drop unused function 
ctdb_get_all_public_addresses()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit fc2347be4ed9a9083a56468ca5e43070059038c5
Author: Alex Richardson 
Date:   Wed Sep 8 14:42:57 2021 +0100

Fix detection of rpc/xdr.h on macOS

We need to include rpc/types.h first to include this header.

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Oct 13 02:33:05 UTC 2021 on sn-devel-184

commit 99ee7f3d89cce9b07b8ed3f55f7e8e67baed6ee1
Author: Alex Richardson 
Date:   Wed Sep 8 14:42:25 2021 +0100

vfs_preopen.c: Fix -Wformat error on macOS

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

commit 1d893f723207040c285ed061db3a690099f8c929
Author: Alex Richardson 
Date:   Wed Sep 8 13:29:54 2021 +0100

source3/smbd/statcache.c: Fix -Wformat build error on macOS

The format string uses PRIx64, so we should be using uint64_t and not
uintmax_t.

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

commit 6dadf251fc02c2b3237c48d316f5cb8791ab4f76
Author: Alex Richardson 
Date:   Wed Sep 8 13:27:41 2021 +0100

sec_ctx.c: Fix -Wunused-function warning on macOS

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

commit e4eb1f151011d2bd6a2d39b156663ddd9126d345
Author: Alex Richardson 
Date:   Wed Sep 8 13:25:04 2021 +0100

source3/printing/queue_process.c: fix build on macOS

On macOS environ is defined to (*_NSGetEnviron()) in lib/replace/replace.h
and otherwise the `extern char **environ` can be found there.

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

commit d3675e66fe8eec15076c6b88e47b627ee80c6f9e
Author: Alex Richardson 
Date:   Wed Sep 8 12:57:03 2021 +0100

audit_logging.c: fix compilation on macOS

On macOS tv_usec is an int so failus the build with -Werror,-Wformat.

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

commit 2564e96e8319b4cb4c987dd2a03cf8a293db985a
Author: Alex Richardson 
Date:   Wed Sep 8 12:52:57 2021 +0100

charset_macosxfs.c: fix compilation on macOS

The DEBUG macro was missing and the CFStringGetBytes() was triggering a
-Werror,-Wpointer-sign build failure.

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

Signed-off-by: Alex Richardson 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 lib/audit_logging/audit_logging.c   |  2 +-
 lib/util/charset/charset_macosxfs.c |  3 ++-
 source3/modules/vfs_preopen.c   |  2 +-
 source3/printing/queue_process.c|  2 --
 source3/smbd/sec_ctx.c  | 20 +---
 source3/smbd/statcache.c|  2 +-
 source3/wscript |  2 +-
 7 files changed, 15 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/audit_logging/audit_logging.c 
b/lib/audit_logging/audit_logging.c
index 9fe2d3ba45d..87378e1bb95 100644
--- a/lib/audit_logging/audit_logging.c
+++ b/lib/audit_logging/audit_logging.c
@@ -70,7 +70,7 @@ char* audit_get_timestamp(TALLOC_CTX *frame)
 
strftime(buffer, sizeof(buffer)-1, "%a, %d %b %Y %H:%M:%S", tm_info);
strftime(tz, sizeof(tz)-1, "%Z", tm_info);
-   ts = talloc_asprintf(frame, "%s.%06ld %s", buffer, tv.tv_usec, tz);
+   ts = talloc_asprintf(frame, "%s.%06ld %s", buffer, (long)tv.tv_usec, 
tz);
if (ts == NULL) {
DBG_ERR("Out of memory formatting time stamp\n");
}
diff --git a/lib/util/charset/charset_macosxfs.c 
b/lib/util/charset/charset_macosxfs.c

[SCM] Samba Shared Repository - branch master updated

2021-10-12 Thread Martin Schwenke
The branch, master has been updated
   via  1719ef7893a ctdb-tests: Drop unused function 
ctdb_get_all_public_addresses()
   via  4e3676cb3c4 ctdb-tests: add a comment to the generated 
public_addresses file used by eventscript UNIT tests
   via  5426c104f50 ctdb-tests: Fix typo in ctdb stub comment matching
   via  530e8d4b9e4 ctdb-scripts: filter out comments in public_addresses 
file
  from  0a376b23dba s3: VFS: zfsacl: Ensure we use a pathref fd, not an io 
fd, for getting/setting ZFS ACLs.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1719ef7893ae5dc87e452c24bafd55db598464bc
Author: Martin Schwenke 
Date:   Tue Oct 12 12:27:51 2021 +1100

ctdb-tests: Drop unused function ctdb_get_all_public_addresses()

Signed-off-by: Martin Schwenke 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Tue Oct 12 23:24:18 UTC 2021 on sn-devel-184

commit 4e3676cb3c4d24cd4c287703d2cd812a2a8c36ff
Author: Ralph Boehme 
Date:   Fri Oct 8 05:58:37 2021 +0200

ctdb-tests: add a comment to the generated public_addresses file used by 
eventscript UNIT tests

test stub code has been updated to handle this, so now let's put it
to work.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826
RN: Correctly ignore comments in CTDB public addresses file

Signed-off-by: Ralph Boehme 
Reviewed-by: Martin Schwenke 

commit 5426c104f5090751c1ea02f0c0667d8d071a4a83
Author: Martin Schwenke 
Date:   Tue Oct 12 12:19:27 2021 +1100

ctdb-tests: Fix typo in ctdb stub comment matching

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Ralph Boehme 

commit 530e8d4b9e47601b88e20bcaefa2d502efcebe60
Author: Ralph Boehme 
Date:   Wed Sep 8 16:53:12 2021 +0200

ctdb-scripts: filter out comments in public_addresses file

Note that order of sed expressions matters: the expression to delete
comment lines must come first as the second expression would transform

  # comment

to

  comment

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Martin Schwenke 

---

Summary of changes:
 ctdb/config/events/legacy/10.interface.script |  3 ++-
 ctdb/config/functions |  3 +++
 ctdb/tests/UNIT/eventscripts/scripts/local.sh | 11 +--
 ctdb/tests/UNIT/eventscripts/stubs/ctdb   |  2 +-
 4 files changed, 7 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/config/events/legacy/10.interface.script 
b/ctdb/config/events/legacy/10.interface.script
index 72e0c101d47..d87f6c52c58 100755
--- a/ctdb/config/events/legacy/10.interface.script
+++ b/ctdb/config/events/legacy/10.interface.script
@@ -25,7 +25,8 @@ fi
 get_all_interfaces ()
 {
 # Get all the interfaces listed in the public_addresses file
-all_interfaces=$(sed -e 's/^[^\t ]*[\t ]*//' \
+all_interfaces=$(sed -e '/^#.*/d' \
+-e 's/^[^\t ]*[\t ]*//' \
 -e 's/,/ /g' \
 -e 's/[\t ]*$//' "$ctdb_public_addresses")
 
diff --git a/ctdb/config/functions b/ctdb/config/functions
index 2395d8d4dc8..a4e73ad0594 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -611,6 +611,9 @@ drop_all_public_ips ()
# _x is intentionally ignored
# shellcheck disable=SC2034
while read _ip _x ; do
+   case "$_ip" in
+   \#*) continue ;;
+   esac
drop_ip "$_ip"
done <"${CTDB_BASE}/public_addresses"
 }
diff --git a/ctdb/tests/UNIT/eventscripts/scripts/local.sh 
b/ctdb/tests/UNIT/eventscripts/scripts/local.sh
index 0f78fcb3845..84a5fc9772f 100644
--- a/ctdb/tests/UNIT/eventscripts/scripts/local.sh
+++ b/ctdb/tests/UNIT/eventscripts/scripts/local.sh
@@ -282,6 +282,7 @@ setup_public_addresses ()
 
echo "Setting up public addresses in ${_f}"
cat >"$_f" <

[SCM] Samba Shared Repository - branch master updated

2021-10-12 Thread Jeremy Allison
The branch, master has been updated
   via  0a376b23dba s3: VFS: zfsacl: Ensure we use a pathref fd, not an io 
fd, for getting/setting ZFS ACLs.
  from  14db80fe613 docs-xml: Use /var/tmp for spooling in smb.conf.5

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0a376b23dbaaec551d0ed48b7098129c09eec1bc
Author: Jeremy Allison 
Date:   Mon Oct 11 12:26:57 2021 -0700

s3: VFS: zfsacl: Ensure we use a pathref fd, not an io fd, for 
getting/setting ZFS ACLs.

Don't use path-based calls.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Böhme 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Tue Oct 12 18:14:27 UTC 2021 on sn-devel-184

---

Summary of changes:
 source3/modules/vfs_zfsacl.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index b04c6e560ad..69a1db59249 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -235,13 +235,12 @@ static bool zfs_process_smbacl(vfs_handle_struct *handle, 
files_struct *fsp,
SMB_ASSERT(i == naces);
 
/* store acl */
-   fd = fsp_get_io_fd(fsp);
-   if (fd != -1) {
-   rv = facl(fd, ACE_SETACL, naces, acebuf);
-   }
-   else {
-   rv = acl(fsp->fsp_name->base_name, ACE_SETACL, naces, acebuf);
+   fd = fsp_get_pathref_fd(fsp);
+   if (fd == -1) {
+   errno = EBADF;
+   return false;
}
+   rv = facl(fd, ACE_SETACL, naces, acebuf);
if (rv != 0) {
if(errno == ENOSYS) {
DEBUG(9, ("acl(ACE_SETACL, %s): Operation is not "
@@ -322,11 +321,11 @@ static int fget_zfsacl(TALLOC_CTX *mem_ctx,
ace_t *acebuf = NULL;
int fd;
 
-   fd = fsp_get_io_fd(fsp);
+   fd = fsp_get_pathref_fd(fsp);
if (fd == -1) {
-   return get_zfsacl(mem_ctx, fsp->fsp_name, outbuf);
+   errno = EBADF;
+   return -1;
}
-
naces = facl(fd, ACE_GETACLCNT, 0, NULL);
if (naces == -1) {
int dbg_level = 10;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2021-10-12 Thread Andreas Schneider
The branch, master has been updated
   via  14db80fe613 docs-xml: Use /var/tmp for spooling in smb.conf.5
   via  3262f69690c docs-xml: Remove trailing spaces in smb.conf.5.xml
  from  12d04d9a928 docs-xml: Update winbindd(8) manpage

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 14db80fe6139ced8b118e5e95b37f9a73c9d20aa
Author: Andreas Schneider 
Date:   Wed Oct 6 14:02:10 2021 +0200

docs-xml: Use /var/tmp for spooling in smb.conf.5

This is a world writeable directory which exists on Linux distributions by
default already.

Signed-off-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Oct 12 17:24:01 UTC 2021 on sn-devel-184

commit 3262f69690cd3fa915fc593193a4d03194d978af
Author: Andreas Schneider 
Date:   Wed Oct 6 14:01:42 2021 +0200

docs-xml: Remove trailing spaces in smb.conf.5.xml

Signed-off-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 

---

Summary of changes:
 docs-xml/manpages/smb.conf.5.xml | 128 +++
 1 file changed, 64 insertions(+), 64 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml
index 72664a2e457..4b33c0f59e8 100644
--- a/docs-xml/manpages/smb.conf.5.xml
+++ b/docs-xml/manpages/smb.conf.5.xml
@@ -2,7 +2,7 @@
 http://www.samba.org/samba/DTD/samba-doc;>
 http://www.w3.org/2003/XInclude;
 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc;>
-   
+
 
smb.conf
5
@@ -83,7 +83,7 @@

 

-   Any line beginning with a semicolon (;) or a hash 
(#) 
+   Any line beginning with a semicolon (;) or a hash 
(#)
character is ignored, as are lines containing only whitespace.

 
@@ -117,12 +117,12 @@
A share consists of a directory to which access is being given plus a 
description of the access rights
which are granted to the user of the service. Some housekeeping options 
are also specifiable.

-   
+

Sections are either file share services (used by the client as an 
extension of their native file systems)
or printable services (used by the client to access print services on 
the host running the server).

-   
+

Sections may be designated guest services, in 
which case no password is required to
access them. A specified UNIX guest account is 
used to define access privileges in this
@@ -134,13 +134,13 @@
username. As older clients only provide passwords and not usernames, 
you may specify a list of usernames to
check against the password using the user = option 
in the share definition. For modern clients
such as Windows 95/98/ME/NT/2000, this should not be necessary.
-
+   
 

The access rights granted by the server are masked by the access rights 
granted to the specified or guest
UNIX user by the host system. The server does not grant more access 
than the host system grants.

-   
+

The following sample section defines a file space share.  The user has 
write access to the path /home/bar.  The share is accessed via the 
share name foo:
@@ -157,7 +157,7 @@
ok parameter means access will be permitted as the default 
guest user (specified elsewhere):
 

-   /usr/spool/public
+   /var/tmp
yes
yes
yes
@@ -168,19 +168,19 @@
 
 
SPECIAL SECTIONS
-   
+

The [global] section
-   
+

Parameters in this section apply to the server as a whole, or 
are defaults for sections that do not
specifically define certain items. See the notes under 
PARAMETERS for more information.


-   
+

The [homes] section
-   
+

If a section called [homes] is included in the configuration 
file, services connecting clients
to their home directories can be created on the fly by the 
server.
@@ -192,11 +192,11 @@
password file. If the name exists and the correct password has 
been given, a share is created by cloning the
[homes] section.

-   
+

Some modifications are then made to the newly created share:

-   
+


The share name is changed from homes to the located 
username.
@@ -208,7 +208,7 @@

 

-   If you decide to use a path = line in your 
[homes] section, it may be useful 

[SCM] Samba Shared Repository - branch master updated

2021-10-12 Thread Ralph Böhme
The branch, master has been updated
   via  12d04d9a928 docs-xml: Update winbindd(8) manpage
   via  b92589c31f0 s3:winbindd: Fix winbindd child logfile name handling
  from  4fe96583624 s3: smbd: Ensure when we change security context we 
delete any $cwd cache.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 12d04d9a9288a9358d5f5aebaec126cc610952b1
Author: Pavel Filipenský 
Date:   Fri Oct 8 13:16:05 2021 +0200

docs-xml: Update winbindd(8) manpage

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

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Oct 12 09:30:02 UTC 2021 on sn-devel-184

commit b92589c31f0eb3eaf2b3b1867e10b759f6a2edda
Author: Pavel Filipenský 
Date:   Thu Oct 7 12:08:22 2021 +0200

s3:winbindd: Fix winbindd child logfile name handling

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

Handling of logfile name for main and child winbindd must ensure:

1) Log directory is selected in this order:
  * -l option of winbindd
  * "log file" parameter in smb.conf
  * compile time value '/usr/local/samba/var'

2) Log filename pattern
  * parent process uses log.winbindd
  * child uses log.wb-

3) Log reopen works for both parent and child (i.e. log filename is not 
changed)
  * kill -HUP 
  * smbcontrol  reload-config

This commit removes 3 calls of is_default_dyn_LOGFILEBASE() to make sure 
that:
  - 1st removal: child uses log.wb- after the fork
  - 2nd removal: child after HUP signal, does not switch to log.winbindd
  - 3rd removal: child after smbcontrol reload-config, does not switch to
log.winbindd

Interesting commits: bfa1b2a8 1484b7f3 3b015a4c d1f7a371

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 
Reviewed-by: Andreas Schneider 

---

Summary of changes:
 docs-xml/manpages/winbindd.8.xml | 20 +++-
 source3/winbindd/winbindd_dual.c | 11 ++-
 2 files changed, 25 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/winbindd.8.xml b/docs-xml/manpages/winbindd.8.xml
index 3b7487c1b1c..7a643b8879c 100644
--- a/docs-xml/manpages/winbindd.8.xml
+++ b/docs-xml/manpages/winbindd.8.xml
@@ -195,7 +195,25 @@ hosts: files wins


 
-   
+   
+   
+   
+
+   
+   -l|--log-basename=logdirectory
+   
+   
+   Base directory name for log/debug 
files. The parent process
+   uses filename log.winbindd, the child 
process uses filename
+   log.wb-name>. The log file is never 
removed by winbindd.
+   
+   
+   
+
+   
+   
+   
+

 

diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index e19dfafc52f..b275dfb128c 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1544,15 +1544,16 @@ NTSTATUS winbindd_reinit_after_fork(const struct 
winbindd_child *myself,
 
close_conns_after_fork();
 
-   if (is_default_dyn_LOGFILEBASE() && logfilename) {
+   if (logfilename != NULL) {
lp_set_logfile(logfilename);
reopen_logs();
}
 
-   if (!winbindd_setup_sig_term_handler(false))
+   if (!winbindd_setup_sig_term_handler(false)) {
return NT_STATUS_NO_MEMORY;
-   if (!winbindd_setup_sig_hup_handler(
-   !is_default_dyn_LOGFILEBASE() ? NULL : logfilename)) {
+   }
+
+   if (!winbindd_setup_sig_hup_handler(logfilename)) {
return NT_STATUS_NO_MEMORY;
}
 
@@ -1777,7 +1778,7 @@ static bool fork_domain_child(struct winbindd_child 
*child)
   winbind_msg_disconnect_dc);
messaging_register(
global_messaging_context(),
-   !is_default_dyn_LOGFILEBASE() ? NULL : child->logfilename,
+   child->logfilename,
MSG_SMB_CONF_UPDATED,
winbindd_msg_reload_services_child);
 


-- 
Samba Shared Repository