1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

1314 Commits

Author SHA1 Message Date
Andreas Schneider
2a6805cc82 third_party: Update nss_wrapper to version 1.1.16
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): Mon Jul  8 06:28:47 UTC 2024 on atb-devel-224
2024-07-08 06:28:47 +00:00
Douglas Bagnall
0bc5b6f293 buildtools: sanitise strange characters in vendor strings
There is no reason to think '-' and '+' are the only characters that
might sneak into a vendor string; Debian habitually use '~'.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2024-07-03 01:35:31 +00:00
Andreas Schneider
8ae180e167 third_party: Update socket_wrapper to version 1.4.3
This fixes issues with bind compiled with jemalloc.

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

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): Thu Jun 13 08:41:39 UTC 2024 on atb-devel-224
2024-06-13 08:41:39 +00:00
Andreas Schneider
f88e60644e third_party: Update uid_wrapper to version 1.3.1
This fixes issues with bind compiled with jemalloc.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-06-13 07:38:28 +00:00
Douglas Bagnall
068b366709 buildtools:pidl: avoid hash randomisation in pidl
Like many languages, Perl uses has randomisation to prevent nasty
users using crafted values that hash to the same number to effect a
denial of service. This means the traversal order of perl HASH tables
is different every time.

The IDL handed to pidl is trusted, so we don't really need
randomisation, but we do want to be sure the build is the same every
time.

I am not aware of hash randomisation causing problems, but it seems
prudent to avoid it.

We do a similar thing with PYTHONHASHSEED for the entire build.

Thanks to Freexian and the Debian LTS project for sponsoring this work.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-05-31 00:25:33 +00:00
Andrew Bartlett
651fb94c37 build: Add --vendor-name --vendor-patch-revision options to ./configure
These options are for packagers and vendors to set so that when
Samba developers are debugging an issue, we know exactly which
package is in use, and so have an idea if any patches have been
applied.

This is included in the string that a Samba backtrace gives,
as part of the PANIC message.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15654
REF: https://lists.samba.org/archive/samba-technical/2024-May/138992.html

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-05-31 00:25:33 +00:00
Douglas Bagnall
5a317f7d8e buildtools: remove Python2 compatibility
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-05-31 00:25:33 +00:00
Earl Chew
0c983bd009 Improve CHECK_LIB interaction with CHECK_PKG
When checking for shared libraries, only name the target library
if it was not previously discoverd by pkg-config --libs and now
available from uselib_store. This avoids using both sources of
information which results in the library being named twice on
the command line.

Once the library is confirmed by CHECK_LIB, append the library if
not already present, to avoid dropping libraries that were
previously discovered by CHECK_PKG.

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

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-05-10 00:26:35 +00:00
Earl Chew
363c331857 Augment library_flags() to return libraries
Extend library_flags() to return the libraries provided by
pkg-config --libs.

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

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-05-10 00:26:35 +00:00
Andreas Schneider
01940ae7af buildtools: Fix PYTHONPATH and print it
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-09 22:52:37 +00:00
Andrew Bartlett
81994b85ad build: Allow --with-ldbmodulesdir to override location of LDB modules
This will allow some packagers to set this to a directory that does
not mention Samba, or to put a version string in to avoid loading
old modules.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01 02:41:37 +00:00
Andrew Bartlett
9b5d226a5a ldb: Honour --private-library=!ldb as meaning build as a public library
Likewise, let the SAMBA_LIBRARY code handle being a private library
rather than in the library declaration.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01 02:41:36 +00:00
Andrew Bartlett
1f41997b4c build: Allow --private-libraries to include a default
This will in the future allow ldb to be declared public in the
build system, and so have all the attributes set for that, but
be actually built as a private Samba library by default.

No change in behavour currently.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01 02:41:36 +00:00
Andrew Bartlett
7d1bc4fa90 build: Ensure that a forced-private library has no public headers
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-03-01 02:41:36 +00:00
Stefan Metzmacher
6da49582c2 wafsamba: fix the usage of --private-extension-exception
It was completely unused...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2024-01-04 11:39:36 +00:00
Stefan Metzmacher
533e5daf77 wafsamba: introduce SAMBA_LIBRARY(force_unversioned=False)
This can be used in order to avoid a library to be
catched by --private-libraries=ALL.
It is needed for our wrapper libraries.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2024-01-04 11:39:36 +00:00
Björn Jacke
b9f32b32e0 docs-xml: use XML_CATALOG_FILES env var if defined
Thanks to Thierry LARONDE for the fix.

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

Signed-off-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2023-12-29 12:49:34 +00:00
Joseph Sutton
dfefdcb1e0 buildtools: Use correct variable in error message
When this error message was copied from CHECK_FUNCS_IN(), the variable
name was not changed. This results in messages like this:

“Mandatory library 'lib' not found for functions '<class 'list'>'”

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-21 20:21:34 +00:00
Stefan Metzmacher
d23d6145bf VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.h
We also prodive a samba_copyright_string() helper similar to
samba_version_string().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 15 10:44:42 UTC 2023 on atb-devel-224
2023-12-15 10:44:42 +00:00
Joseph Sutton
f642aff554 buildtools: Remove ‘keep_underscore’ parameter
Nothing now passes this in.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Dec 11 02:13:39 UTC 2023 on atb-devel-224
2023-12-11 02:13:39 +00:00
Joseph Sutton
623645963e buildtools: Remove useless ‘keep_underscore’ parameter
SAMBA_LIBARY()’s ‘keep_underscore’ parameter has an effect only if None
is passed in for ‘bundled_name’. However, SAMBA_PLUGIN() always passes
in a string for ‘bundled_name’. Therefore ‘keep_underscore’ will never
have any effect — remove it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-11 01:08:37 +00:00
Joseph Sutton
e3ad675303 buildtools: Pass through parameter ‘keep_underscore’
This parameter has gone unused until now.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-11 01:08:37 +00:00
Joseph Sutton
2e5d75141d buildtools: Fix code spelling
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-11 01:08:37 +00:00
Joseph Sutton
cdff2b767e buildtools: Remove unused parameter ‘env’
This parameter goes unused, and nothing passes it in.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-11 01:08:36 +00:00
Joseph Sutton
18d9873e5d buildtools: Update docstring to be more accurate
Some more possibilities for output files have been introduced since
commit e916aff9e1.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-08 02:28:33 +00:00
Andreas Schneider
c4a5d4eb62 third_party: Update waf to version 2.0.26
https://gitlab.com/ita1024/waf/-/blob/waf-2.0.26/ChangeLog

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 29 10:47:00 UTC 2023 on atb-devel-224
2023-11-29 10:47:00 +00:00
Andreas Schneider
c290052fd2 third_party: Build pypamtest with -Wno-error=declaration-after-statement
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20 15:37:33 +00:00
Joseph Sutton
35c7061f97 buildtools: Correctly raise exception
This avoids errors like the following:
‘RuntimeError: No active exception to reraise’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-17 03:19:38 +00:00
Joseph Sutton
ec23abfe1f buildtools: Don’t call normpath() repeatedly
A non‐negligible fraction of the build process — especially for
incremental builds — is spent calling normpath() over and over again.

Make builds faster by not doing that.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-17 03:19:38 +00:00
Joseph Sutton
2870ef951e buildtools: Remove semicolons
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-13 03:50:31 +00:00
Joseph Sutton
84dc7129ea buildtools: Properly set global variable
Since we didn’t declare ‘old_refill_task_list’ as global, we were just
assigning a value to a local variable that was destroyed after we
returned from this function. We clearly intended instead to assign to a
global variable of the same name.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30 02:15:28 +00:00
Joseph Sutton
8d61d3f8e0 buildtools: Prefer ‘x not in y’ to ‘not x in y’
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30 02:15:28 +00:00
Joseph Sutton
6df81630af buildtools: Use ‘is’ to compare with singletons
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30 02:15:28 +00:00
Joseph Sutton
94f46f0cbb buildtools: Fix comments and documentation
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30 02:15:28 +00:00
Andreas Schneider
8e7a62b6ff waf: Build nmbd with -Wno-error=stringop-overflow
We use strlcpy() which has been added to glibc recently. This means we
also get fortification for strlcpy() now:

source3/nmbd/nmbd_browsesync.c: In function ‘find_domain_master_name_query_success’:
source3/nmbd/nmbd_browsesync.c:337:9: warning: ‘strlcpy’ writing 257 bytes into a
region of size 16 overflows the destination [-Wstringop-overflow=]
  337 |         strlcpy(userdata->data, work->work_group, size - sizeof(*userdata));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We allocate memory for the userdata struct + fstring. However the data
pointer we use only is 16 bytes. Also nowadays you would use offsetof()
for the allocation calculation, but it only works correctly on newer
compilers like gcc > 7. We could make use of it in future after CentOS 7
is gone.

As we don't want to touch nmbd anymore, just silence the warnings.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-28 02:04:36 +00:00
Andreas Schneider
d720eb2c08 third_party: Update socket_wrapper to version 1.4.2
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 29 16:06:11 UTC 2023 on atb-devel-224
2023-06-29 16:06:11 +00:00
Pavel Filipenský
e0b1aaea1a third_party: Update nss_wrapper to version 1.1.15
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): Tue Jun 13 13:09:41 UTC 2023 on atb-devel-224
2023-06-13 13:09:41 +00:00
SATOH Fumiyasu
198a844ff5 third_party: Fix version of socket_wrapper and uid_wrapper
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun  6 08:34:55 UTC 2023 on atb-devel-224
2023-06-06 08:34:55 +00:00
SATOH Fumiyasu
25b2c07a9d build:wafsamba: Allow lib for CHECK_VALUEOF()
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-05-19 00:29:33 +00:00
Joseph Sutton
5ac65fdf9a build:wafsamba: Fix TypeError in read_submodule_status()
parts = l.split(" ")
            ^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-09 01:59:32 +00:00
Alexander Bokovoy
60f9396a7d wafsamba: Normalize strings in gdb output when comparing ABI
This fixes an issue with gdb >= 13:

libndr.so: symbol ndr_transfer_syntax_ndr64 has changed
    old_signature: uuid = {
        time_low = 1903232307,
        time_mid = 48826,
        time_hi_and_version = 18743,
        clock_seq = "\203\031",
        node = "\265\333\357\234\314\066"
    }, if_version = 1

    new_signature: uuid = {
        time_low = 1903232307,
        time_mid = 48826,
        time_hi_and_version = 18743,
        clock_seq = "\203\031",
        node = "\265\333\357\234\3146"
    }, if_version = 1

\314\066 and \3146 are the same as \066 translates into the char '6'. In order
to address this we should do byte comparison in python.

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Alexander Bokovoy <ab@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-27 07:21:33 +00:00
Andreas Schneider
ffdfb78da7 buildtools: Remove compile_commands.json symlink
We are telling clangd with the .clangd project config file where to find it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 29 17:54:05 UTC 2023 on atb-devel-224
2023-03-29 17:54:05 +00:00
Andreas Schneider
b1767d505e buildtools: Fix code spelling
Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2023-03-28 09:33:31 +00:00
Joseph Sutton
ed0b850e3d wafsamba: Remove unused configure check
This check would trigger compiler warnings due to the extra argument
passed to eprintf(). HAVE__VA_ARGS__MACRO isn't used anywhere, so we can
remove the check.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-20 00:22:32 +00:00
Joseph Sutton
fa4ddb887a samba_version.py: Avoid resource leak
View with 'git show -b'.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-03 01:07:36 +00:00
Rob van der Linde
9273285886 buildtools: fix mutable default arguments
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-02-23 22:32:33 +00:00
Helmut Grohne
a0996ef86f Skip running a C program during cross compilation
When passing --cross-compile, one has to specify a --cross-answers file
and this test cannot be performed anyway, so skip it already.

Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-02-20 21:58:32 +00:00
Andreas Schneider
024571a7a8 waf: Add support for MemorySanitizer
This currently only works with binaries. As there is no shared library for
MSAN it only is statically linked against binaries. This means if we have e.g.
a python script trying to load ldb, it will fail with undefined symbols.

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 Feb  6 23:49:04 UTC 2023 on atb-devel-224
2023-02-06 23:49:04 +00:00
Andreas Schneider
253891032e python: Don't use deprecated escape sequences
Certain escape sequences are not valid in Python string literals, and
will eventually result in a SyntaxError.

Follow up patch of 5045382c6d

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 20 09:06:49 UTC 2023 on atb-devel-224
2023-01-20 09:06:49 +00:00
Florian Weimer
75db84b1e5 buildtools/wafsamba: Avoid calling lib_func without a prototype
This is a backport of commit f4c0a750d4
("WAF: Fix detection of linker features")
to buildtools/wafsamba/samba_conftests.py.  It fixes the check for
rpath support with compilers in strict C99 mode.

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

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-01-09 10:43:37 +00:00