samba.git
15 months agoMerge samba (2:4.21.0+dfsg-1) import into refs/heads/workingbranch
Michael Tokarev [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Merge samba (2:4.21.0+dfsg-1) import into refs/heads/workingbranch

15 months agolower dns lookup mismatch messages
Michael Tokarev [Fri, 1 Mar 2024 13:16:20 +0000 (16:16 +0300)]
lower dns lookup mismatch messages

There's just too much useless noise in the logs,
especially when the PTR record just doesn't exist.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name lower-dns-lookup-mismatch-messages.patch

15 months agopasschange: error message fix
Michael Tokarev [Mon, 26 Feb 2024 12:35:35 +0000 (15:35 +0300)]
passchange: error message fix

Forwarded: yes

Missing space and newline.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name passchange-error-message.patch

15 months agoMinimal EDNS0 support for built-in DNS client
Michael Tokarev [Mon, 26 Feb 2024 11:15:00 +0000 (14:15 +0300)]
Minimal EDNS0 support for built-in DNS client

Forwarded: yes
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15536

Currently, samba built-in DNS client is UDP-only (it does
support TCP mode, but not all components use it).  In
particular, when winbind queries list of AD DCs (SRV
record) which can be quite large, it uses UDP-only query.
And at the same time, samba DNS client does not support
EDNS0 at all, so the reply is limited to standard DNS
packet size which is 512 bytes.

Add minimal EDNS0 OPT record to ADDITIONAL section when
sending a DNS request out, indicating we can accept
DNS packets up to 4Kb in size.

Since DNSSEC is in wide use today and DNSSEC requires
EDNS0, it is okay to assume ENDS0 is widely supported
these days, so there should be no regressions when
enabling EDNS0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name edns0.patch

15 months agosilence "Can not convert group sid" warnings in the log
Michael Tokarev [Wed, 14 Feb 2024 12:26:29 +0000 (15:26 +0300)]
silence "Can not convert group sid" warnings in the log

Forwarded: yes

/var/log/samba/log.winbind is full of messages like:

[2024/02/09 06:25:04.788182,  1, pid=74620] source3/winbindd/winbindd_getgroups.c:259(winbindd_getgroups_recv)
  Could not convert sid S-0-0: NT_STATUS_NONE_MAPPED

On a busy server these are logged several 1000s times per minute,
making any other messages basically invisible.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name silence-can-not-convert-group-sid.diff

15 months agoctdb: use /run/ctdb instead of /var/run/ctdb
Michael Tokarev [Fri, 2 Dec 2022 08:45:01 +0000 (11:45 +0300)]
ctdb: use /run/ctdb instead of /var/run/ctdb

Whole upstream path assignment needs a review.

Gbp-Pq: Name ctdb-use-run-instead-of-var-run.patch

15 months agoprint meaningful error message if python3-markdown is not installed
Michael Tokarev [Fri, 2 Dec 2022 08:08:27 +0000 (11:08 +0300)]
print meaningful error message if python3-markdown is not installed

Updated: Mon, 08 Apr 2024 14:14:38 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-python3-markdown.patch

15 months agoprint meaningful error message if samba-ad-provision is not installed
Michael Tokarev [Fri, 2 Dec 2022 07:54:31 +0000 (10:54 +0300)]
print meaningful error message if samba-ad-provision is not installed

Updated: Thu, 03 Aug 2023 17:06:24 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-samba-ad-provision.patch

15 months ago[PATCH] fruit: disable useless size_t overflow check
Michael Tokarev [Thu, 17 Nov 2022 20:51:03 +0000 (23:51 +0300)]
[PATCH] fruit: disable useless size_t overflow check

From e4bf63c976b0e3253f980360b2fe6244092b777c Mon Sep 17 00:00:00 2001
Bug-Debian: http://bugs.debian.org/974868

As has been said several times in
https://bugzilla.samba.org/show_bug.cgi?id=13622 ,
the check 'bandsize > SIZE_MAX/nbands' is useless.  But it
is also wrong, in 2 ways: first, nbands might be 0 (when
no bands has been allocated yet), and second, there's no
point in comparing this with SIZE_MAX, since size_t on 32bit
platforms is a 32bit integer, while bandsize is off_t which
is 64bits (samba always enables LFS).

This check causes the module to fail when bandsize*nbands
exceeds 32bits, which has been reported for example at
https://bugs.debian.org/974868 .

Whole thing can't overflow because it is already guarded
by time_machine_max_size.  Or at the very least, by current
disk sizes... :)

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name fruit-disable-useless-size_t-overflow-check.patch

15 months agoadd missing libs deps
Michael Tokarev [Thu, 19 May 2022 17:37:21 +0000 (20:37 +0300)]
add missing libs deps

Bug-Debian: https://bugs.debian.org/1010922

Lots of samba libraries has incomplete dependencies listed
in wscript files.  This usually is not a problem since the
link line includes dependencies of their dependencies of
their dependencies, and somewhere down that line all immediate
dependencies which are missing are actually present.  But
sometimes this becomes a problem when a library does not
declare direct dependency on at least one private library
which it actually uses: in case no private library is
listed as direct dependency, private library directory is
not put into RUNPATH of the resulting binary, so the binary
can not find its own dependencies.

Fix a few such places, including one library which is a part
of public abi (libsmbldap).

Gbp-Pq: Name add-missing-libs-deps.diff

15 months agotestparm: do not fail if /run/samba does not exist
Michael Tokarev [Tue, 26 Apr 2022 13:14:38 +0000 (16:14 +0300)]
testparm: do not fail if /run/samba does not exist

testparm explicitly fails if $piddir or $lockdir does not exist.
However, the daemons which actually use these directories, will
create it on demand, there is no need to fail even simple testparm
operations if the dirs are not there.

This change lets to (pre)configure samba without bothering to
pre-create the directories which are overwise needed only to fulfil
testparm criteria.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name testparm-do-not-fail-if-pid-dir-does-not-exist.patch

15 months agomove msg.sock from /var/lib/samba to /run/samba
Michael Tokarev [Tue, 26 Apr 2022 13:11:48 +0000 (16:11 +0300)]
move msg.sock from /var/lib/samba to /run/samba

This moves a socket directory from /var/lib/samba to /run/samba.

https://lists.samba.org/archive/samba-technical/2022-April/137322.html

Gbp-Pq: Name move-msg.sock-from-var-lib-samba-to-run-samba.patch

15 months agodisable setuid configure checks
Michael Tokarev [Fri, 8 Apr 2022 08:50:21 +0000 (11:50 +0300)]
disable setuid configure checks

For some strange reason, when running reprotest test on salsa-ci,
which apparently is running as root, - on the *second* build only
the configure fails (after successfully built package the first
time). The configure test tries to change gid and verifies it
actually changed (not that the syscall exist), - and that fails.
Since it is extremely uncommon to configure the build process as
root, salsa-ci test environment details are quite deep down the line,
and we know the syscall actually works, just disable the probe,
pretending we are not root.

Gbp-Pq: Name disable-setuid-confchecks.patch

15 months agosilence uselib_local warning produced by waf
Michael Tokarev [Sun, 3 Apr 2022 04:57:38 +0000 (07:57 +0300)]
silence uselib_local warning produced by waf

During config/build process in verbose mode, waf produces
about 2k repetitions of this warning:

  compat: "uselib_local" is deprecated, replace by "use"

which clutters the build log.

Comment this warning out for now until it will be
fixed properly.

Gbp-Pq: Name silence-waf-uselib_local.diff

15 months agocreate ctdb pid directory
Michael Tokarev [Fri, 9 Sep 2022 09:49:55 +0000 (12:49 +0300)]
create ctdb pid directory

(which is /run/ctdb/). Create it in the systemd service
file (using RuntimeDirectory directive) and in the sysv-init
script.

Gbp-Pq: Name ctdb-create-piddir.patch

15 months agofix pathname for ctdb_etcd_lock
Michael Tokarev [Sat, 2 Apr 2022 14:49:38 +0000 (17:49 +0300)]
fix pathname for ctdb_etcd_lock

Specify the actual installation path for this helper script.

Gbp-Pq: Name ctdb_etcd_lock-path.patch

15 months agouse bzero() instead of memset_s()
Debian Samba Maintainers [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
use bzero() instead of memset_s()

lib/replace/replace.h header defines ZERO_STRUCT macro
which uses memset_s() function (which is similar to
memset() but can not be optimized out by the compiler).
Glibc has bzero() with similar property, while memset_s()
have is implemented in lib/replace/replace.c, - this way,
some binaries needlessly link with libreplace-samba4 just
to get rep_memset_s() symbol. By using bzero() instead,
this endless linkage is eliminated, so we can package,
for example, libldb (which uses ZERO_STRUCT) without it
linking to libreplace-samba4.

Note: actually using explicit_bzero() so it is not optimized
out by the compiler - this is the original goal of using
memset_s().

Gbp-Pq: Name use-bzero-instead-of-memset_s.diff

15 months agoctdb-config-enable-syslog-by-default
Debian Samba Maintainers [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
ctdb-config-enable-syslog-by-default

ctdb-config: enable syslog by default

CTDB uses /var/log/ctdb/ directory for the default log files. With
syslog disabled, systemd journal is not able to correctly inform
errors happening during service initialization.

Upstream community creates generic config files to be used by different
distributions, so this change makes no big difference to be accepted by
upstream.

With this patch the end user will be able to identify initialization
errors by executing:

  systemctl status ctdb.service

or to follow ctdb logs by executing:

  journalctl -f -u ctdb

Signed-off-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
-
Author: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2022-03-24

Gbp-Pq: Name ctdb-config-enable-syslog-by-default.patch

15 months agofix nfs related service names
Rafael David Tinoco [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
fix nfs related service names

Upstream defines nfs related service names based on the Linux
distribution. This patch fixes the names for Debian and derivatives.

Update by Andreas Hasenack <andreas@canonical.com> (LP: #1961840):
Use nfsconf(8) if it's available, instead of parsing the old config
files in /etc/default/nfs-*

Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2024-07-30

Gbp-Pq: Name fix-nfs-service-name-to-nfs-kernel-server.patch

15 months agoAdd so version number to private libraries for dpkg-shlibdeps
Jeroen Dekkers [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Add so version number to private libraries for dpkg-shlibdeps

We also want dpkg-shlibdeps to generate correct dependency information
for the private libraries in our binary packages, but dpkg-shlibdeps
only works when the library has a version number.

Origin: vendor
Forwarded: not-needed

Gbp-Pq: Name add-so-version-to-private-libraries

15 months agoPatch in symbol table from rfc3454, for Heimdal scripts
Brian May [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Patch in symbol table from rfc3454, for Heimdal scripts

Forwarded: not-needed

Status: cherry-picked from heimdal package

Gbp-Pq: Name heimdal-rfc3454.txt

15 months agoEnable net usershares by default at build time
mathiaz@ubuntu.com [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Enable net usershares by default at build time

Enable net usershares by default at build time, with a limit of 100, and update
the corresponding documentation.

Bug-Debian: http://bugs.debian.org/443230
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
Forwarded: not-needed

Gbp-Pq: Name usershare.patch

15 months agoUse the pager alternative as pager is PAGER is undefined
Steve Langasek [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Use the pager alternative as pager is PAGER is undefined

Bug-Debian: http://bugs.debian.org/135603
Forwarded: not-needed

Gbp-Pq: Name smbclient-pager.patch

15 months agoMention smbldap-tools package in examples/LDAP/README
Christian Perrier [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Mention smbldap-tools package in examples/LDAP/README

Bug-Debian: http://bugs.debian.org/341934
Forwarded: not-needed

Gbp-Pq: Name README_nosmbldap-tools.patch

15 months agohurd compatibility changes
Michael Tokarev [Thu, 3 Nov 2022 17:49:33 +0000 (20:49 +0300)]
hurd compatibility changes

Hurd does not define PIPE_BUF, so lib/tevent/testsuite.c fails to compile
(yes, this file is used as part of *samba* testsuite, not tevent testsuite).
Define it to a safe minimal value like 512 bytes.

Hurd does not provide SA_NOCLDWAIT define, so lib/util/tests/tfork.c does
not compile. This is only needed during testing to omit zombie process
generation, which has only cosmetic effect.  Define it to be 0.

Based on prior work and ideas by Samuel Thibault.

Gbp-Pq: Name hurd-compat.patch

15 months agoensure libsmbclient.h is being used with LFS enabled
Michael Tokarev [Sat, 2 Apr 2022 16:01:55 +0000 (19:01 +0300)]
ensure libsmbclient.h is being used with LFS enabled

Bug-Debian: https://bugs.debian.org/221618

We build samba with LFS (Large File Support) even on 32bits.
This means some types like off_t are 64-bit wide, again,
even on a 32bit host.  libsmbclient.h uses off_t in function
prototypes, and thes prototypes muct match those which were
used at samba compile time - if some other source includes
libsmbclient.h without LFS, it'll get wrong prototypes and
the resulting binary will most likely crash when using
libsmbclient functions.

Detect and error-out this at compile time.

We can not do anything with this in the public header since
it is alredy too late to redefine things, since we can't
guarantee we're the first header a program #includes, and
at the time this libsmbclient.h is included, off_t can
already be defined so our (re)define of _FILE_OFFSET_BITS
does nothing already.

Patching libsmbclient.h to use off64_t means client program
should change their off_t to off64_t too when storing
file offsets returning from libsmbclient, so this is not
an option too.

With this change, we will error out even if the user source
does not use any off_t-related functions. Namely, it was ok
to #include <libsmbclient.h> and use smbc_open/smbc_read/
smbc_write/smbc_close without _F_O_B=64, - neither of these
functions uses off_t. smbc_lseek and others doesn't work,
but if a program does not use them anyway, whole thing will
just work even without enabling LFS.  Ideally we can probably
check each individual function which is being affected, by
replacing it with #error if sizeof(off_t) < 8.  But this
requires quite some hackery...

Gbp-Pq: Name libsmbclient-ensure-lfs-221618.patch

15 months agosamba (2:4.21.0+dfsg-1) unstable; urgency=medium
Michael Tokarev [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
samba (2:4.21.0+dfsg-1) unstable; urgency=medium

  * switch to 4.21 branch
  * update to 4.21.0 (new upstream)
  * fix-nfs-service-name-to-nfs-kernel-server.patch: refresh
  * Force-LDB-as-standalone.patch: remove (ldb is always internal now)
  * d/rules: ldb lib is now private by default, expose it as public
  * d/rules: ldb uses LDB_VERSION variable now, not VERSION
  * tilde-in-version.diff: remove (applied upstream)
  * heimdal-spelling.patch: disable for now
  * d/rules: s/vendor-name/vendor-suffix/
  * d/ctdb.install: no more sudoers file
  * d/samba-libs.symbols, d/control, d/samba-libs.install: libndr4=>libndr5
    This requires sssd to be rebuilt
  * samba-{libs,dev}.install, python3-{samba,ldb).install: refresh libs
    (with lintian-overrides)
  * samba-libs.install, samba-dev.install: new (semi-public) library:
    libsamba-policy.so (used by the python stuff only, for now)
  * samba-libs.install: new private library: libsamba-net-private-samba.so.0
  * libldb2.symbols: add new symbols & 2.10.0 version
    (and remove 2.9.1 minor version)
  * d/control: bump libtdb version dependency to 1.4.12
  * d/ctdb.install: install winbind_ctdb_updatekeytab.sh file

[dgit import unpatched samba 2:4.21.0+dfsg-1]

15 months agoImport samba_4.21.0+dfsg.orig.tar.xz
Michael Tokarev [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Import samba_4.21.0+dfsg.orig.tar.xz

[dgit import orig samba_4.21.0+dfsg.orig.tar.xz]

15 months agoImport samba_4.21.0+dfsg-1.debian.tar.xz
Michael Tokarev [Mon, 2 Sep 2024 14:48:34 +0000 (17:48 +0300)]
Import samba_4.21.0+dfsg-1.debian.tar.xz

[dgit import tarball samba 2:4.21.0+dfsg-1 samba_4.21.0+dfsg-1.debian.tar.xz]

16 months agoMerge samba (2:4.20.2+dfsg-10) import into refs/heads/workingbranch
Michael Tokarev [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Merge samba (2:4.20.2+dfsg-10) import into refs/heads/workingbranch

16 months agohandle tilde in version string
Michael Tokarev [Thu, 20 Jun 2024 06:47:47 +0000 (09:47 +0300)]
handle tilde in version string

Forwarded: yes

wafsamba dislikes when version string contains "special" chars.
For some of them, upstream already has code to deal with.
Add handling of tilde (~) to the same places too.

Gbp-Pq: Name tilde-in-version.diff

16 months agolower dns lookup mismatch messages
Michael Tokarev [Fri, 1 Mar 2024 13:16:20 +0000 (16:16 +0300)]
lower dns lookup mismatch messages

There's just too much useless noise in the logs,
especially when the PTR record just doesn't exist.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name lower-dns-lookup-mismatch-messages.patch

16 months agopasschange: error message fix
Michael Tokarev [Mon, 26 Feb 2024 12:35:35 +0000 (15:35 +0300)]
passchange: error message fix

Forwarded: yes

Missing space and newline.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name passchange-error-message.patch

16 months agoMinimal EDNS0 support for built-in DNS client
Michael Tokarev [Mon, 26 Feb 2024 11:15:00 +0000 (14:15 +0300)]
Minimal EDNS0 support for built-in DNS client

Forwarded: yes
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15536

Currently, samba built-in DNS client is UDP-only (it does
support TCP mode, but not all components use it).  In
particular, when winbind queries list of AD DCs (SRV
record) which can be quite large, it uses UDP-only query.
And at the same time, samba DNS client does not support
EDNS0 at all, so the reply is limited to standard DNS
packet size which is 512 bytes.

Add minimal EDNS0 OPT record to ADDITIONAL section when
sending a DNS request out, indicating we can accept
DNS packets up to 4Kb in size.

Since DNSSEC is in wide use today and DNSSEC requires
EDNS0, it is okay to assume ENDS0 is widely supported
these days, so there should be no regressions when
enabling EDNS0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name edns0.patch

16 months agosilence "Can not convert group sid" warnings in the log
Michael Tokarev [Wed, 14 Feb 2024 12:26:29 +0000 (15:26 +0300)]
silence "Can not convert group sid" warnings in the log

Forwarded: yes

/var/log/samba/log.winbind is full of messages like:

[2024/02/09 06:25:04.788182,  1, pid=74620] source3/winbindd/winbindd_getgroups.c:259(winbindd_getgroups_recv)
  Could not convert sid S-0-0: NT_STATUS_NONE_MAPPED

On a busy server these are logged several 1000s times per minute,
making any other messages basically invisible.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name silence-can-not-convert-group-sid.diff

16 months agoctdb: use /run/ctdb instead of /var/run/ctdb
Michael Tokarev [Fri, 2 Dec 2022 08:45:01 +0000 (11:45 +0300)]
ctdb: use /run/ctdb instead of /var/run/ctdb

Whole upstream path assignment needs a review.

Gbp-Pq: Name ctdb-use-run-instead-of-var-run.patch

16 months agoprint meaningful error message if python3-markdown is not installed
Michael Tokarev [Fri, 2 Dec 2022 08:08:27 +0000 (11:08 +0300)]
print meaningful error message if python3-markdown is not installed

Updated: Mon, 08 Apr 2024 14:14:38 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-python3-markdown.patch

16 months agoprint meaningful error message if samba-ad-provision is not installed
Michael Tokarev [Fri, 2 Dec 2022 07:54:31 +0000 (10:54 +0300)]
print meaningful error message if samba-ad-provision is not installed

Updated: Thu, 03 Aug 2023 17:06:24 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-samba-ad-provision.patch

16 months ago[PATCH] fruit: disable useless size_t overflow check
Michael Tokarev [Thu, 17 Nov 2022 20:51:03 +0000 (23:51 +0300)]
[PATCH] fruit: disable useless size_t overflow check

From e4bf63c976b0e3253f980360b2fe6244092b777c Mon Sep 17 00:00:00 2001
Bug-Debian: http://bugs.debian.org/974868

As has been said several times in
https://bugzilla.samba.org/show_bug.cgi?id=13622 ,
the check 'bandsize > SIZE_MAX/nbands' is useless.  But it
is also wrong, in 2 ways: first, nbands might be 0 (when
no bands has been allocated yet), and second, there's no
point in comparing this with SIZE_MAX, since size_t on 32bit
platforms is a 32bit integer, while bandsize is off_t which
is 64bits (samba always enables LFS).

This check causes the module to fail when bandsize*nbands
exceeds 32bits, which has been reported for example at
https://bugs.debian.org/974868 .

Whole thing can't overflow because it is already guarded
by time_machine_max_size.  Or at the very least, by current
disk sizes... :)

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name fruit-disable-useless-size_t-overflow-check.patch

16 months agoHeimdal: spelling fixes (underun prefered relase encyption confunder)
Michael Tokarev [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Heimdal: spelling fixes (underun prefered relase encyption confunder)

Gbp-Pq: Name heimdal-spelling.patch

16 months agoadd missing libs deps
Michael Tokarev [Thu, 19 May 2022 17:37:21 +0000 (20:37 +0300)]
add missing libs deps

Bug-Debian: https://bugs.debian.org/1010922

Lots of samba libraries has incomplete dependencies listed
in wscript files.  This usually is not a problem since the
link line includes dependencies of their dependencies of
their dependencies, and somewhere down that line all immediate
dependencies which are missing are actually present.  But
sometimes this becomes a problem when a library does not
declare direct dependency on at least one private library
which it actually uses: in case no private library is
listed as direct dependency, private library directory is
not put into RUNPATH of the resulting binary, so the binary
can not find its own dependencies.

Fix a few such places, including one library which is a part
of public abi (libsmbldap).

Gbp-Pq: Name add-missing-libs-deps.diff

16 months agotestparm: do not fail if /run/samba does not exist
Michael Tokarev [Tue, 26 Apr 2022 13:14:38 +0000 (16:14 +0300)]
testparm: do not fail if /run/samba does not exist

testparm explicitly fails if $piddir or $lockdir does not exist.
However, the daemons which actually use these directories, will
create it on demand, there is no need to fail even simple testparm
operations if the dirs are not there.

This change lets to (pre)configure samba without bothering to
pre-create the directories which are overwise needed only to fulfil
testparm criteria.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name testparm-do-not-fail-if-pid-dir-does-not-exist.patch

16 months agomove msg.sock from /var/lib/samba to /run/samba
Michael Tokarev [Tue, 26 Apr 2022 13:11:48 +0000 (16:11 +0300)]
move msg.sock from /var/lib/samba to /run/samba

This moves a socket directory from /var/lib/samba to /run/samba.

https://lists.samba.org/archive/samba-technical/2022-April/137322.html

Gbp-Pq: Name move-msg.sock-from-var-lib-samba-to-run-samba.patch

16 months agodisable setuid configure checks
Michael Tokarev [Fri, 8 Apr 2022 08:50:21 +0000 (11:50 +0300)]
disable setuid configure checks

For some strange reason, when running reprotest test on salsa-ci,
which apparently is running as root, - on the *second* build only
the configure fails (after successfully built package the first
time). The configure test tries to change gid and verifies it
actually changed (not that the syscall exist), - and that fails.
Since it is extremely uncommon to configure the build process as
root, salsa-ci test environment details are quite deep down the line,
and we know the syscall actually works, just disable the probe,
pretending we are not root.

Gbp-Pq: Name disable-setuid-confchecks.patch

16 months agosilence uselib_local warning produced by waf
Michael Tokarev [Sun, 3 Apr 2022 04:57:38 +0000 (07:57 +0300)]
silence uselib_local warning produced by waf

During config/build process in verbose mode, waf produces
about 2k repetitions of this warning:

  compat: "uselib_local" is deprecated, replace by "use"

which clutters the build log.

Comment this warning out for now until it will be
fixed properly.

Gbp-Pq: Name silence-waf-uselib_local.diff

16 months agocreate ctdb pid directory
Michael Tokarev [Fri, 9 Sep 2022 09:49:55 +0000 (12:49 +0300)]
create ctdb pid directory

(which is /run/ctdb/). Create it in the systemd service
file (using RuntimeDirectory directive) and in the sysv-init
script.

Gbp-Pq: Name ctdb-create-piddir.patch

16 months agofix pathname for ctdb_etcd_lock
Michael Tokarev [Sat, 2 Apr 2022 14:49:38 +0000 (17:49 +0300)]
fix pathname for ctdb_etcd_lock

Specify the actual installation path for this helper script.

Gbp-Pq: Name ctdb_etcd_lock-path.patch

16 months agouse bzero() instead of memset_s()
Debian Samba Maintainers [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
use bzero() instead of memset_s()

lib/replace/replace.h header defines ZERO_STRUCT macro
which uses memset_s() function (which is similar to
memset() but can not be optimized out by the compiler).
Glibc has bzero() with similar property, while memset_s()
have is implemented in lib/replace/replace.c, - this way,
some binaries needlessly link with libreplace-samba4 just
to get rep_memset_s() symbol. By using bzero() instead,
this endless linkage is eliminated, so we can package,
for example, libldb (which uses ZERO_STRUCT) without it
linking to libreplace-samba4.

Note: actually using explicit_bzero() so it is not optimized
out by the compiler - this is the original goal of using
memset_s().

Gbp-Pq: Name use-bzero-instead-of-memset_s.diff

16 months ago[PATCH] Force LDB as standalone
Mathieu Parent [Sun, 19 Dec 2021 21:29:13 +0000 (22:29 +0100)]
[PATCH] Force LDB as standalone

Gbp-Pq: Name Force-LDB-as-standalone.patch

16 months agoctdb-config-enable-syslog-by-default
Debian Samba Maintainers [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
ctdb-config-enable-syslog-by-default

ctdb-config: enable syslog by default

CTDB uses /var/log/ctdb/ directory for the default log files. With
syslog disabled, systemd journal is not able to correctly inform
errors happening during service initialization.

Upstream community creates generic config files to be used by different
distributions, so this change makes no big difference to be accepted by
upstream.

With this patch the end user will be able to identify initialization
errors by executing:

  systemctl status ctdb.service

or to follow ctdb logs by executing:

  journalctl -f -u ctdb

Signed-off-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
-
Author: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2022-03-24

Gbp-Pq: Name ctdb-config-enable-syslog-by-default.patch

16 months agofix nfs related service names
Rafael David Tinoco [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
fix nfs related service names

Upstream defines nfs related service names based on the Linux
distribution. This patch fixes the names for Debian and derivatives.

Update by Andreas Hasenack <andreas@canonical.com> (LP: #1961840):
Use nfsconf(8) if it's available, instead of parsing the old config
files in /etc/default/nfs-*

Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2022-09-09

Gbp-Pq: Name fix-nfs-service-name-to-nfs-kernel-server.patch

16 months agoAdd so version number to private libraries for dpkg-shlibdeps
Jeroen Dekkers [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Add so version number to private libraries for dpkg-shlibdeps

We also want dpkg-shlibdeps to generate correct dependency information
for the private libraries in our binary packages, but dpkg-shlibdeps
only works when the library has a version number.

Origin: vendor
Forwarded: not-needed

Gbp-Pq: Name add-so-version-to-private-libraries

16 months agoPatch in symbol table from rfc3454, for Heimdal scripts
Brian May [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Patch in symbol table from rfc3454, for Heimdal scripts

Forwarded: not-needed

Status: cherry-picked from heimdal package

Gbp-Pq: Name heimdal-rfc3454.txt

16 months agoEnable net usershares by default at build time
mathiaz@ubuntu.com [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Enable net usershares by default at build time

Enable net usershares by default at build time, with a limit of 100, and update
the corresponding documentation.

Bug-Debian: http://bugs.debian.org/443230
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
Forwarded: not-needed

Gbp-Pq: Name usershare.patch

16 months agoUse the pager alternative as pager is PAGER is undefined
Steve Langasek [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Use the pager alternative as pager is PAGER is undefined

Bug-Debian: http://bugs.debian.org/135603
Forwarded: not-needed

Gbp-Pq: Name smbclient-pager.patch

16 months agoMention smbldap-tools package in examples/LDAP/README
Christian Perrier [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Mention smbldap-tools package in examples/LDAP/README

Bug-Debian: http://bugs.debian.org/341934
Forwarded: not-needed

Gbp-Pq: Name README_nosmbldap-tools.patch

16 months agohurd compatibility changes
Michael Tokarev [Thu, 3 Nov 2022 17:49:33 +0000 (20:49 +0300)]
hurd compatibility changes

Hurd does not define PIPE_BUF, so lib/tevent/testsuite.c fails to compile
(yes, this file is used as part of *samba* testsuite, not tevent testsuite).
Define it to a safe minimal value like 512 bytes.

Hurd does not provide SA_NOCLDWAIT define, so lib/util/tests/tfork.c does
not compile. This is only needed during testing to omit zombie process
generation, which has only cosmetic effect.  Define it to be 0.

Based on prior work and ideas by Samuel Thibault.

Gbp-Pq: Name hurd-compat.patch

16 months agoensure libsmbclient.h is being used with LFS enabled
Michael Tokarev [Sat, 2 Apr 2022 16:01:55 +0000 (19:01 +0300)]
ensure libsmbclient.h is being used with LFS enabled

Bug-Debian: https://bugs.debian.org/221618

We build samba with LFS (Large File Support) even on 32bits.
This means some types like off_t are 64-bit wide, again,
even on a 32bit host.  libsmbclient.h uses off_t in function
prototypes, and thes prototypes muct match those which were
used at samba compile time - if some other source includes
libsmbclient.h without LFS, it'll get wrong prototypes and
the resulting binary will most likely crash when using
libsmbclient functions.

Detect and error-out this at compile time.

We can not do anything with this in the public header since
it is alredy too late to redefine things, since we can't
guarantee we're the first header a program #includes, and
at the time this libsmbclient.h is included, off_t can
already be defined so our (re)define of _FILE_OFFSET_BITS
does nothing already.

Patching libsmbclient.h to use off64_t means client program
should change their off_t to off64_t too when storing
file offsets returning from libsmbclient, so this is not
an option too.

With this change, we will error out even if the user source
does not use any off_t-related functions. Namely, it was ok
to #include <libsmbclient.h> and use smbc_open/smbc_read/
smbc_write/smbc_close without _F_O_B=64, - neither of these
functions uses off_t. smbc_lseek and others doesn't work,
but if a program does not use them anyway, whole thing will
just work even without enabling LFS.  Ideally we can probably
check each individual function which is being affected, by
replacing it with #error if sizeof(off_t) < 8.  But this
requires quite some hackery...

Gbp-Pq: Name libsmbclient-ensure-lfs-221618.patch

16 months agosamba (2:4.20.2+dfsg-10) unstable; urgency=medium
Michael Tokarev [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
samba (2:4.20.2+dfsg-10) unstable; urgency=medium

  * d/rules: shorten dpkg_late_eval
  * d/rules: stop renaming heimdal dir for mitkrb5 profile
  * d/rules: remove the only usage of ${with_mitkrb5}
  * d/rules: rearrange CFLAGS/LDFLAGS settings to use
    DEB_*_MAINT_APPEND due to dpkg #1077005
  * skip -9 release because of test upload to experimental

[dgit import unpatched samba 2:4.20.2+dfsg-10]

16 months agoImport samba_4.20.2+dfsg-10.debian.tar.xz
Michael Tokarev [Thu, 25 Jul 2024 08:35:21 +0000 (11:35 +0300)]
Import samba_4.20.2+dfsg-10.debian.tar.xz

[dgit import tarball samba 2:4.20.2+dfsg-10 samba_4.20.2+dfsg-10.debian.tar.xz]

17 months agoMerge samba (2:4.20.2+dfsg-7) import into refs/heads/workingbranch
Michael Tokarev [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Merge samba (2:4.20.2+dfsg-7) import into refs/heads/workingbranch

17 months agohandle tilde in version string
Michael Tokarev [Thu, 20 Jun 2024 06:47:47 +0000 (09:47 +0300)]
handle tilde in version string

Forwarded: yes

wafsamba dislikes when version string contains "special" chars.
For some of them, upstream already has code to deal with.
Add handling of tilde (~) to the same places too.

Gbp-Pq: Name tilde-in-version.diff

17 months agolower dns lookup mismatch messages
Michael Tokarev [Fri, 1 Mar 2024 13:16:20 +0000 (16:16 +0300)]
lower dns lookup mismatch messages

There's just too much useless noise in the logs,
especially when the PTR record just doesn't exist.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name lower-dns-lookup-mismatch-messages.patch

17 months agopasschange: error message fix
Michael Tokarev [Mon, 26 Feb 2024 12:35:35 +0000 (15:35 +0300)]
passchange: error message fix

Forwarded: yes

Missing space and newline.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name passchange-error-message.patch

17 months agoMinimal EDNS0 support for built-in DNS client
Michael Tokarev [Mon, 26 Feb 2024 11:15:00 +0000 (14:15 +0300)]
Minimal EDNS0 support for built-in DNS client

Forwarded: yes
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15536

Currently, samba built-in DNS client is UDP-only (it does
support TCP mode, but not all components use it).  In
particular, when winbind queries list of AD DCs (SRV
record) which can be quite large, it uses UDP-only query.
And at the same time, samba DNS client does not support
EDNS0 at all, so the reply is limited to standard DNS
packet size which is 512 bytes.

Add minimal EDNS0 OPT record to ADDITIONAL section when
sending a DNS request out, indicating we can accept
DNS packets up to 4Kb in size.

Since DNSSEC is in wide use today and DNSSEC requires
EDNS0, it is okay to assume ENDS0 is widely supported
these days, so there should be no regressions when
enabling EDNS0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name edns0.patch

17 months agosilence "Can not convert group sid" warnings in the log
Michael Tokarev [Wed, 14 Feb 2024 12:26:29 +0000 (15:26 +0300)]
silence "Can not convert group sid" warnings in the log

Forwarded: yes

/var/log/samba/log.winbind is full of messages like:

[2024/02/09 06:25:04.788182,  1, pid=74620] source3/winbindd/winbindd_getgroups.c:259(winbindd_getgroups_recv)
  Could not convert sid S-0-0: NT_STATUS_NONE_MAPPED

On a busy server these are logged several 1000s times per minute,
making any other messages basically invisible.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name silence-can-not-convert-group-sid.diff

17 months agoctdb: use /run/ctdb instead of /var/run/ctdb
Michael Tokarev [Fri, 2 Dec 2022 08:45:01 +0000 (11:45 +0300)]
ctdb: use /run/ctdb instead of /var/run/ctdb

Whole upstream path assignment needs a review.

Gbp-Pq: Name ctdb-use-run-instead-of-var-run.patch

17 months agoprint meaningful error message if python3-markdown is not installed
Michael Tokarev [Fri, 2 Dec 2022 08:08:27 +0000 (11:08 +0300)]
print meaningful error message if python3-markdown is not installed

Updated: Mon, 08 Apr 2024 14:14:38 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-python3-markdown.patch

17 months agoprint meaningful error message if samba-ad-provision is not installed
Michael Tokarev [Fri, 2 Dec 2022 07:54:31 +0000 (10:54 +0300)]
print meaningful error message if samba-ad-provision is not installed

Updated: Thu, 03 Aug 2023 17:06:24 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-samba-ad-provision.patch

17 months ago[PATCH] fruit: disable useless size_t overflow check
Michael Tokarev [Thu, 17 Nov 2022 20:51:03 +0000 (23:51 +0300)]
[PATCH] fruit: disable useless size_t overflow check

From e4bf63c976b0e3253f980360b2fe6244092b777c Mon Sep 17 00:00:00 2001
Bug-Debian: http://bugs.debian.org/974868

As has been said several times in
https://bugzilla.samba.org/show_bug.cgi?id=13622 ,
the check 'bandsize > SIZE_MAX/nbands' is useless.  But it
is also wrong, in 2 ways: first, nbands might be 0 (when
no bands has been allocated yet), and second, there's no
point in comparing this with SIZE_MAX, since size_t on 32bit
platforms is a 32bit integer, while bandsize is off_t which
is 64bits (samba always enables LFS).

This check causes the module to fail when bandsize*nbands
exceeds 32bits, which has been reported for example at
https://bugs.debian.org/974868 .

Whole thing can't overflow because it is already guarded
by time_machine_max_size.  Or at the very least, by current
disk sizes... :)

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name fruit-disable-useless-size_t-overflow-check.patch

17 months agoHeimdal: spelling fixes (underun prefered relase encyption confunder)
Michael Tokarev [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Heimdal: spelling fixes (underun prefered relase encyption confunder)

Gbp-Pq: Name heimdal-spelling.patch

17 months agoadd missing libs deps
Michael Tokarev [Thu, 19 May 2022 17:37:21 +0000 (20:37 +0300)]
add missing libs deps

Bug-Debian: https://bugs.debian.org/1010922

Lots of samba libraries has incomplete dependencies listed
in wscript files.  This usually is not a problem since the
link line includes dependencies of their dependencies of
their dependencies, and somewhere down that line all immediate
dependencies which are missing are actually present.  But
sometimes this becomes a problem when a library does not
declare direct dependency on at least one private library
which it actually uses: in case no private library is
listed as direct dependency, private library directory is
not put into RUNPATH of the resulting binary, so the binary
can not find its own dependencies.

Fix a few such places, including one library which is a part
of public abi (libsmbldap).

Gbp-Pq: Name add-missing-libs-deps.diff

17 months agotestparm: do not fail if /run/samba does not exist
Michael Tokarev [Tue, 26 Apr 2022 13:14:38 +0000 (16:14 +0300)]
testparm: do not fail if /run/samba does not exist

testparm explicitly fails if $piddir or $lockdir does not exist.
However, the daemons which actually use these directories, will
create it on demand, there is no need to fail even simple testparm
operations if the dirs are not there.

This change lets to (pre)configure samba without bothering to
pre-create the directories which are overwise needed only to fulfil
testparm criteria.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name testparm-do-not-fail-if-pid-dir-does-not-exist.patch

17 months agomove msg.sock from /var/lib/samba to /run/samba
Michael Tokarev [Tue, 26 Apr 2022 13:11:48 +0000 (16:11 +0300)]
move msg.sock from /var/lib/samba to /run/samba

This moves a socket directory from /var/lib/samba to /run/samba.

https://lists.samba.org/archive/samba-technical/2022-April/137322.html

Gbp-Pq: Name move-msg.sock-from-var-lib-samba-to-run-samba.patch

17 months agodisable setuid configure checks
Michael Tokarev [Fri, 8 Apr 2022 08:50:21 +0000 (11:50 +0300)]
disable setuid configure checks

For some strange reason, when running reprotest test on salsa-ci,
which apparently is running as root, - on the *second* build only
the configure fails (after successfully built package the first
time). The configure test tries to change gid and verifies it
actually changed (not that the syscall exist), - and that fails.
Since it is extremely uncommon to configure the build process as
root, salsa-ci test environment details are quite deep down the line,
and we know the syscall actually works, just disable the probe,
pretending we are not root.

Gbp-Pq: Name disable-setuid-confchecks.patch

17 months agosilence uselib_local warning produced by waf
Michael Tokarev [Sun, 3 Apr 2022 04:57:38 +0000 (07:57 +0300)]
silence uselib_local warning produced by waf

During config/build process in verbose mode, waf produces
about 2k repetitions of this warning:

  compat: "uselib_local" is deprecated, replace by "use"

which clutters the build log.

Comment this warning out for now until it will be
fixed properly.

Gbp-Pq: Name silence-waf-uselib_local.diff

17 months agocreate ctdb pid directory
Michael Tokarev [Fri, 9 Sep 2022 09:49:55 +0000 (12:49 +0300)]
create ctdb pid directory

(which is /run/ctdb/). Create it in the systemd service
file (using RuntimeDirectory directive) and in the sysv-init
script.

Gbp-Pq: Name ctdb-create-piddir.patch

17 months agofix pathname for ctdb_etcd_lock
Michael Tokarev [Sat, 2 Apr 2022 14:49:38 +0000 (17:49 +0300)]
fix pathname for ctdb_etcd_lock

Specify the actual installation path for this helper script.

Gbp-Pq: Name ctdb_etcd_lock-path.patch

17 months agouse bzero() instead of memset_s()
Debian Samba Maintainers [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
use bzero() instead of memset_s()

lib/replace/replace.h header defines ZERO_STRUCT macro
which uses memset_s() function (which is similar to
memset() but can not be optimized out by the compiler).
Glibc has bzero() with similar property, while memset_s()
have is implemented in lib/replace/replace.c, - this way,
some binaries needlessly link with libreplace-samba4 just
to get rep_memset_s() symbol. By using bzero() instead,
this endless linkage is eliminated, so we can package,
for example, libldb (which uses ZERO_STRUCT) without it
linking to libreplace-samba4.

Note: actually using explicit_bzero() so it is not optimized
out by the compiler - this is the original goal of using
memset_s().

Gbp-Pq: Name use-bzero-instead-of-memset_s.diff

17 months ago[PATCH] Force LDB as standalone
Mathieu Parent [Sun, 19 Dec 2021 21:29:13 +0000 (22:29 +0100)]
[PATCH] Force LDB as standalone

Gbp-Pq: Name Force-LDB-as-standalone.patch

17 months agoctdb-config-enable-syslog-by-default
Debian Samba Maintainers [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
ctdb-config-enable-syslog-by-default

ctdb-config: enable syslog by default

CTDB uses /var/log/ctdb/ directory for the default log files. With
syslog disabled, systemd journal is not able to correctly inform
errors happening during service initialization.

Upstream community creates generic config files to be used by different
distributions, so this change makes no big difference to be accepted by
upstream.

With this patch the end user will be able to identify initialization
errors by executing:

  systemctl status ctdb.service

or to follow ctdb logs by executing:

  journalctl -f -u ctdb

Signed-off-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
-
Author: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2022-03-24

Gbp-Pq: Name ctdb-config-enable-syslog-by-default.patch

17 months agofix nfs related service names
Rafael David Tinoco [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
fix nfs related service names

Upstream defines nfs related service names based on the Linux
distribution. This patch fixes the names for Debian and derivatives.

Update by Andreas Hasenack <andreas@canonical.com> (LP: #1961840):
Use nfsconf(8) if it's available, instead of parsing the old config
files in /etc/default/nfs-*

Bug-Debian: https://bugs.debian.org/929931
Bug-Ubuntu: https://bugs.launchpad.net/bugs/722201
Last-Update: 2022-09-09

Gbp-Pq: Name fix-nfs-service-name-to-nfs-kernel-server.patch

17 months agoAdd so version number to private libraries for dpkg-shlibdeps
Jeroen Dekkers [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Add so version number to private libraries for dpkg-shlibdeps

We also want dpkg-shlibdeps to generate correct dependency information
for the private libraries in our binary packages, but dpkg-shlibdeps
only works when the library has a version number.

Origin: vendor
Forwarded: not-needed

Gbp-Pq: Name add-so-version-to-private-libraries

17 months agoPatch in symbol table from rfc3454, for Heimdal scripts
Brian May [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Patch in symbol table from rfc3454, for Heimdal scripts

Forwarded: not-needed

Status: cherry-picked from heimdal package

Gbp-Pq: Name heimdal-rfc3454.txt

17 months agoEnable net usershares by default at build time
mathiaz@ubuntu.com [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Enable net usershares by default at build time

Enable net usershares by default at build time, with a limit of 100, and update
the corresponding documentation.

Bug-Debian: http://bugs.debian.org/443230
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
Forwarded: not-needed

Gbp-Pq: Name usershare.patch

17 months agoUse the pager alternative as pager is PAGER is undefined
Steve Langasek [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Use the pager alternative as pager is PAGER is undefined

Bug-Debian: http://bugs.debian.org/135603
Forwarded: not-needed

Gbp-Pq: Name smbclient-pager.patch

17 months agoMention smbldap-tools package in examples/LDAP/README
Christian Perrier [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Mention smbldap-tools package in examples/LDAP/README

Bug-Debian: http://bugs.debian.org/341934
Forwarded: not-needed

Gbp-Pq: Name README_nosmbldap-tools.patch

17 months agohurd compatibility changes
Michael Tokarev [Thu, 3 Nov 2022 17:49:33 +0000 (20:49 +0300)]
hurd compatibility changes

Hurd does not define PIPE_BUF, so lib/tevent/testsuite.c fails to compile
(yes, this file is used as part of *samba* testsuite, not tevent testsuite).
Define it to a safe minimal value like 512 bytes.

Hurd does not provide SA_NOCLDWAIT define, so lib/util/tests/tfork.c does
not compile. This is only needed during testing to omit zombie process
generation, which has only cosmetic effect.  Define it to be 0.

Based on prior work and ideas by Samuel Thibault.

Gbp-Pq: Name hurd-compat.patch

17 months agoensure libsmbclient.h is being used with LFS enabled
Michael Tokarev [Sat, 2 Apr 2022 16:01:55 +0000 (19:01 +0300)]
ensure libsmbclient.h is being used with LFS enabled

Bug-Debian: https://bugs.debian.org/221618

We build samba with LFS (Large File Support) even on 32bits.
This means some types like off_t are 64-bit wide, again,
even on a 32bit host.  libsmbclient.h uses off_t in function
prototypes, and thes prototypes muct match those which were
used at samba compile time - if some other source includes
libsmbclient.h without LFS, it'll get wrong prototypes and
the resulting binary will most likely crash when using
libsmbclient functions.

Detect and error-out this at compile time.

We can not do anything with this in the public header since
it is alredy too late to redefine things, since we can't
guarantee we're the first header a program #includes, and
at the time this libsmbclient.h is included, off_t can
already be defined so our (re)define of _FILE_OFFSET_BITS
does nothing already.

Patching libsmbclient.h to use off64_t means client program
should change their off_t to off64_t too when storing
file offsets returning from libsmbclient, so this is not
an option too.

With this change, we will error out even if the user source
does not use any off_t-related functions. Namely, it was ok
to #include <libsmbclient.h> and use smbc_open/smbc_read/
smbc_write/smbc_close without _F_O_B=64, - neither of these
functions uses off_t. smbc_lseek and others doesn't work,
but if a program does not use them anyway, whole thing will
just work even without enabling LFS.  Ideally we can probably
check each individual function which is being affected, by
replacing it with #error if sizeof(off_t) < 8.  But this
requires quite some hackery...

Gbp-Pq: Name libsmbclient-ensure-lfs-221618.patch

17 months agosamba (2:4.20.2+dfsg-7) unstable; urgency=medium
Michael Tokarev [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
samba (2:4.20.2+dfsg-7) unstable; urgency=medium

  * d/samba-common-bin.lintian-override: update samba-log-parser override
  * d/control: add Breaks: older samba-ad-dc by samba (Closes: #1076196)

[dgit import unpatched samba 2:4.20.2+dfsg-7]

17 months agoImport samba_4.20.2+dfsg-7.debian.tar.xz
Michael Tokarev [Sun, 14 Jul 2024 16:42:39 +0000 (19:42 +0300)]
Import samba_4.20.2+dfsg-7.debian.tar.xz

[dgit import tarball samba 2:4.20.2+dfsg-7 samba_4.20.2+dfsg-7.debian.tar.xz]

17 months agoMerge samba (2:4.20.2+dfsg-6) import into refs/heads/workingbranch
Michael Tokarev [Mon, 8 Jul 2024 13:40:49 +0000 (16:40 +0300)]
Merge samba (2:4.20.2+dfsg-6) import into refs/heads/workingbranch

17 months agohandle tilde in version string
Michael Tokarev [Thu, 20 Jun 2024 06:47:47 +0000 (09:47 +0300)]
handle tilde in version string

Forwarded: yes

wafsamba dislikes when version string contains "special" chars.
For some of them, upstream already has code to deal with.
Add handling of tilde (~) to the same places too.

Gbp-Pq: Name tilde-in-version.diff

17 months agolower dns lookup mismatch messages
Michael Tokarev [Fri, 1 Mar 2024 13:16:20 +0000 (16:16 +0300)]
lower dns lookup mismatch messages

There's just too much useless noise in the logs,
especially when the PTR record just doesn't exist.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name lower-dns-lookup-mismatch-messages.patch

17 months agopasschange: error message fix
Michael Tokarev [Mon, 26 Feb 2024 12:35:35 +0000 (15:35 +0300)]
passchange: error message fix

Forwarded: yes

Missing space and newline.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name passchange-error-message.patch

17 months agoMinimal EDNS0 support for built-in DNS client
Michael Tokarev [Mon, 26 Feb 2024 11:15:00 +0000 (14:15 +0300)]
Minimal EDNS0 support for built-in DNS client

Forwarded: yes
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15536

Currently, samba built-in DNS client is UDP-only (it does
support TCP mode, but not all components use it).  In
particular, when winbind queries list of AD DCs (SRV
record) which can be quite large, it uses UDP-only query.
And at the same time, samba DNS client does not support
EDNS0 at all, so the reply is limited to standard DNS
packet size which is 512 bytes.

Add minimal EDNS0 OPT record to ADDITIONAL section when
sending a DNS request out, indicating we can accept
DNS packets up to 4Kb in size.

Since DNSSEC is in wide use today and DNSSEC requires
EDNS0, it is okay to assume ENDS0 is widely supported
these days, so there should be no regressions when
enabling EDNS0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name edns0.patch

17 months agosilence "Can not convert group sid" warnings in the log
Michael Tokarev [Wed, 14 Feb 2024 12:26:29 +0000 (15:26 +0300)]
silence "Can not convert group sid" warnings in the log

Forwarded: yes

/var/log/samba/log.winbind is full of messages like:

[2024/02/09 06:25:04.788182,  1, pid=74620] source3/winbindd/winbindd_getgroups.c:259(winbindd_getgroups_recv)
  Could not convert sid S-0-0: NT_STATUS_NONE_MAPPED

On a busy server these are logged several 1000s times per minute,
making any other messages basically invisible.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name silence-can-not-convert-group-sid.diff

17 months agoctdb: use /run/ctdb instead of /var/run/ctdb
Michael Tokarev [Fri, 2 Dec 2022 08:45:01 +0000 (11:45 +0300)]
ctdb: use /run/ctdb instead of /var/run/ctdb

Whole upstream path assignment needs a review.

Gbp-Pq: Name ctdb-use-run-instead-of-var-run.patch

17 months agoprint meaningful error message if python3-markdown is not installed
Michael Tokarev [Fri, 2 Dec 2022 08:08:27 +0000 (11:08 +0300)]
print meaningful error message if python3-markdown is not installed

Updated: Mon, 08 Apr 2024 14:14:38 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-python3-markdown.patch

17 months agoprint meaningful error message if samba-ad-provision is not installed
Michael Tokarev [Fri, 2 Dec 2022 07:54:31 +0000 (10:54 +0300)]
print meaningful error message if samba-ad-provision is not installed

Updated: Thu, 03 Aug 2023 17:06:24 +0300
Debian-Specific: yes
Forwarded: not-needed

Gbp-Pq: Name meaningful-error-if-no-samba-ad-provision.patch