summaryrefslogtreecommitdiff
path: root/lib/util/wscript_build
AgeCommit message (Collapse)AuthorFilesLines
2026-02-15lib: Remove sys_fsusage()Volker Lendecke1-1/+0
"man statfs" on Linux says "Unless you need the f_type field, you should use the standard statvfs(3) interface instead.". We don't need f_type to get disk usage :-) We lose some of the older compatibility layers. Should these ever be needed again, we should add them to lib/util/statvfs.c an the single interface to retrieve file system usage info. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15lib: Move statvfs.[ch] to lib/utilVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-28lib:util:debug tests for JSON logging macrosGary Lockyer1-0/+6
Add unit tests for the new JSON debugging macros DBGJSON and DBGJSONC BUG: https://bugzilla.samba.org/show_bug.cgi?id=15898 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-12-08lib/util: Move talloc_keep_secret.c from samba-util to samba-util-corePavel Filipenský1-1/+2
Needed by future data_blob.h changes. ctdb uses data_blob and links only samba-util-core. Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-01-29lib/util: add dns_cmp() as it's own fileStefan Metzmacher1-0/+1
This is a copy of the function in source4/dsdb/common/util_trusts.c, which will be removed soon. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-01-02specify some deps on private libs actually used directlyMichael Tokarev1-2/+2
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 some libraries which are a part of public abi (libsmbldap, libndr). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2024-12-20util: add a crypt wrapper, derived from dsdb:password_hashDouglas Bagnall1-0/+6
This is going to be used by the dsdb password_hash module, and exposed to Python via pyglue. We're doing this because Python 3.13 has dropped crypt from the Python standard library. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15756 Reviewed-by: Andreas Schneider <asn@samba.org>
2023-07-21lib/fault: During smb_panic() print process comment and setprocname() titleAndrew Bartlett1-1/+1
The purpose of this is to make it clear which part of the AD DC (in particular) has faulted without having to deduce it from the stacktrace. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2022-12-01util: add stable sort functionsDouglas Bagnall1-0/+13
Sometimes (e.g. in lzxpress Huffman encoding, and in some of our tests: c.f. https://lists.samba.org/archive/samba-technical/2018-March/126010.html) we want a stable sort algorithm (meaning one that retains the previous order of items that compare equal). The GNU libc qsort() is *usually* stable, in that it first tries to use a mergesort but reverts to quicksort if the necessary allocations fail. That has led Samba developers to unthinkingly assume qsort() is stable which is not the case on many platforms, and might not always be on GNU/Linuxes either. This adds four functions. stable_sort() sorts an array, and requires an auxiliary working array of the same size. stable_sort_talloc() takes a talloc context so it ca create a working array and call stable_sort(). stable_sort_r() takes an opaque context blob that gets passed to the compare function, like qsort_r() and ldb_qsort(). And stable_sort_talloc_r() rounds out the quadrant. These are LGPL so that the can be used in ldb, which has problems with unstable sort. The tests are borrowed and extended from test_ldb_qsort.c. When sorting non-trivial structs this is roughly as fast as GNU qsort, but GNU qsort has optimisations for small items, using direct assignments of rather than memcpy where the size allows the item to be cast as some kind of int. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-07-28util/genrand: don't ignore errors in random number generationDouglas Bagnall1-1/+1
In this case it is probably better to crash out. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15103 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-07-19waf: Check for -Wno-error=array-bounds flagsAndreas Schneider1-3/+19
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
2022-06-17util/debug: share classname table with testsDouglas Bagnall1-1/+1
The executables generated from lib/util/tests/test_logging.c are used by the samba.tests.logfiles tests to test logging with various smb.confs that assign classes to various files at different levels etc. Previously test_logging.c had its own version of the table; now it shares one with debug.c We put the table in a sub-directory (lib/util/debug-classes/), because adding local_include=True to the wscript_build stanza causes the compiler confusion between <time.h> and lib/util/time.h. Note: there are still two other lists of the class names, in python/samba/tests/logfiles.py and docs-xml/smbdotconf/logging/loglevel.xml. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-17tests: rename logging test sourceDouglas Bagnall1-2/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-17tests: adapt logging test for s3.Douglas Bagnall1-0/+9
There is one knownfail, where it seems an smb.conf like log file = foo log level = 2 tdb:2@baa ldb:3 will send the ldb logs to 'baa' instead of 'foo' (i.e., the last opened log file, rather than the default log file). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-17tests: test source4 cmdline/smb.conf log levelDouglas Bagnall1-0/+8
The 'log level' line in smb.conf allows messages from different log classes to be sent to different places, but we have not tested that this works. Now we do, somewhat. The test involves running a special binary based on a stripped down source4/samba/server.c that just starts up, parses the command line and a given smb.conf, then logs messages from multiple classes and exits. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-09lib/util: Delegate constant time memcmp to gnutls_memcmp()Joseph Sutton1-0/+1
gnutls_memcmp() is mostly identical to our own implementation, except that ours will not break if supplied with 4 GiB or more of data. However, using an external function permits us to disclaim responsibility if some CPU/compiler combination happens to invalidate our constant-time guarantee. For reference, gnutls_memcmp() implementation: https://gitlab.com/gnutls/gnutls/-/blob/78d9820de0d2eb2f8088e359779ee7342f5f089e/lib/safe-memfuncs.c#L41-67 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-09build: Possibly link against libexecinfo for backtrace_symbols()Andrew Bartlett1-0/+1
We look for backtrace_symbols() in this library, so we should link against it if we find it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-05-18lib:util: Do not error for array-bounds warningAndreas Schneider1-0/+1
This just prints a warning for: ms_fnmatch.c:95:51: error: array subscript 0 is outside array bounds of ‘struct max_n[0]’ [-Werror=array-bounds] 95 | if (max_n != NULL && max_n->predot && | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-11-30nsswitch: reduce dependecies to private libraries and link static/builtin if ↵Stefan Metzmacher1-1/+3
possible Over the last month I got more and more reports, that it's not possible to use a custom Samba version on systems with sssd being installed, which depends on some specific samba libraries installed in the system. One major problem is that the custom libnss_winbind.so.2 depends on the libreplace-samba4.so of the custom build and also injects an RPATH into the running process. When sssd uses any nss library call it will get this, when it then tries to load some of its plugins via dlopen(), e.g. ldd /usr/lib64/sssd/libsss_ad.so| grep samba libsamba-util.so.0 => /lib64/libsamba-util.so.0 libreplace-samba4.so => /usr/lib64/samba/libreplace-samba4.so libsamba-security-samba4.so => /usr/lib64/samba/libsamba-security-samba4.so libsamba-errors.so.1 => /lib64/libsamba-errors.so.1 libsamba-debug-samba4.so => /usr/lib64/samba/libsamba-debug-samba4.so libgenrand-samba4.so => /usr/lib64/samba/libgenrand-samba4.so libsocket-blocking-samba4.so => /usr/lib64/samba/libsocket-blocking-samba4.so libtime-basic-samba4.so => /usr/lib64/samba/libtime-basic-samba4.so libsys-rw-samba4.so => /usr/lib64/samba/libsys-rw-samba4.so libiov-buf-samba4.so => /usr/lib64/samba/libiov-buf-samba4.so When that loads dlopen() will fail as a soname libreplace-samba4.so is already loaded, but the symbol version within the other one don't match, as the contain the exact version, e.g. replace_dummy@@SAMBA_4.13.3. This is just an example and similar things can happen in all situations where we provide libraries, which are potentially injected into every process of the running system. These should only depend on libc.so and related basic system libraries in order to avoid the problem. We have the following libraries, which are in the that category: - libnss_winbind.so.2 - libnss_wins.so.2 - pam_winbind.so - winbind_krb5_locator.so - async_dns_krb5_locator.so The rules of library loading are really complex and symbol versioning is not enough to solve it, only the combination of unique soname and unique symbol version suffix seem to solve the problem, but injecting an RPATH is still a problem. In order to solve the problem I experimented with adding SAMBA_SUBSYSTEM() definitions with 'hide_symbols=True' in order to do some static linking of selected components, e.g. bld.SAMBA_SUBSYSTEM('replace-hidden', source=REPLACE_SOURCE, group='base_libraries', hide_symbols=True, deps='dl attr' + extra_libs) It's relatively simple to get to the point where the following are completely static: - libnss_winbind.so.2 - libnss_wins.so.2 - pam_winbind.so - winbind_krb5_locator.so But 'async_dns_krb5_locator.so' links in almost everything! It seems we install the krb5 plugins into our own $MODULESDIR/krb5/, so it may not be so critical, as long it's the admin who created the desired symlinks into the location the kerberos libraries search for plugins. Note the at least the locator plugins are always loaded without any configuration, every .so in a special path are loaded with dlopen(). This is done by every application using kerberos, so we load a lot of samba libraries into them. Packagers should not put async_dns_krb5_locator.so (nor a symlink) into the path that's reachable by libkrb5.so. As a longterm solution we may want to change async_dns_krb5_locator.so to use a helper process with posix_spawn() instead of doing everything within the process. Note I added hiden_symbols=True to the nss modules for Linux and FreeBSD only, because these are the only platforms I'm able to test on. We most likely should do the same on other platforms, but some with access to the platform should provide a tested patch. In order to avoid manual definitions of SAMBA_SUBSYSTEMS() with '-hidden', I added the 'provide_builtin_linking=True' option, as the logic is very similar to what we already have with the '--builtin-libraries=BUILTIN_LIBRARIES' configure option. SAMBA_PLUGIN() is used in order to use SAMBA_LIBRARY() in order to make it more strict that these plugins can't be used as normal depedency by other subsystems and libraries. While being there it was easy enough to make libwbclient.so also standalone without dependecies to other samba libraries. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-06-30lib: add sys_io_ranges_overlap()Ralph Boehme1-0/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12033 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-22lib:util: Remove NIS support from string_match()Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-02-03lib:util: Add basic memcache unit testAndreas Schneider1-0/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14625 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-12build: Make smb_panic() available as a subsystem of its ownVolker Lendecke1-8/+43
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-28lib/util: do not make string_wrappers.h publicMatthew DeVore1-1/+0
string_wrappers.h is a collection of macros. All but one of the macros rely on symbols not defined in public headers, so it is not useful as a public header. For instance, fstring is defined in includes.h. PTR_DIFF is defined in lib/util/memory.h, which is not public. checked_strlcpy is actually self-contained and is usable outside of a Samba build, but without a Samba config.h, it is just aliased to strlcpy. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-24lib/util: Remove unnecessary semicolon from wscript_buildChristof Schmitt1-1/+1
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-16util: Add cmocka unit test for directory_create_or_existsChristof Schmitt1-0/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14166 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Aug 16 07:06:59 UTC 2020 on sn-devel-184
2020-08-03lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme1-1/+6
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
2020-05-15lib:util: Add test for path_expand_tilde()Andreas Schneider1-0/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14370 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-05-06lib/util: Build genrand for util coreAmitay Isaacs1-6/+6
messages_dgm depends on genrand. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-02-21lib:util: Do not expose internal header filesAndreas Schneider1-2/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-21lib:util: Add test to verify old and new macros are the sameAndreas Schneider1-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-21lib:util: Add bytearray.hAndreas Schneider1-0/+7
This is an implementation which doesn't have undefined behavior problems. It casts correctly that calculations are don in the correct integer space. Also the naming is less confusing than what we have in byteorder.h. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-01-21util: Add detection of libunwindMartin Schwenke1-1/+1
The current detection doesn't seem to work, so libunwind doesn't seem to be used. Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Jan 21 08:12:17 UTC 2020 on sn-devel-184
2019-11-22build: Do not build selftest binaries for builds without --enable-selftestAndrew Bartlett1-4/+4
Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit like c34ec003b7d45aa4196ff93a0ac29694b25e5309 and da87fa998ab71328f30bcdf5b41aee8675aee48a, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
2019-09-18lib: Add talloc_full_report_printf()Volker Lendecke1-0/+7
Print the talloc full report into a FILE*. talloc itself provides a very similar function, talloc_report_full(). However, that has a slightly different output, in particular it does not print the contents of strings, which is very handy for debugging. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-07-18lib:util: Use GnuTLS random number generator in genrand.cAndreas Schneider1-1/+1
FIPS requires that a random number generator from a certified crypto library is used. 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): Thu Jul 18 01:30:20 UTC 2019 on sn-devel-184
2019-05-17lib:util: Add a test for byteorder.hAndreas Schneider1-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 17 20:44:36 UTC 2019 on sn-devel-184
2019-04-03lib:util: Add test for talloc_keep_secret()Andreas Schneider1-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2019-04-03lib:util: Add support to keep talloc chunks secretAndreas Schneider1-10/+28
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2019-02-14waf: Do not install internal headerAndreas Schneider1-1/+17
We should not install header files without an public API: - memory.h - safe_strings.h - talloc_stack.h BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-02-14lib:util: Move discard_const(_p) to own header for libndr.hAndreas Schneider1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-02-11s3:util: Move popen wrappers to lib/utilAliaksei Karaliou1-2/+2
When linked into Samba3 libraries, sys_popen()/sys_pclose() cannot be used in lower level libraries because of circular dependencies. This patch moves them into common samba-util library. Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-28util: Add file tree walk interfaceAndreas Schneider1-1/+2
Add tftw() utility to emulate nftw() behavior with a userdata pointer. This is repurposed from the csync project custom file tree walker. Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2018-07-11lib: Add tevent_req_profile helpersVolker Lendecke1-0/+1
Print and marshall/unmarshall tevent_req_profile structs Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-07-11lib: Multi-line a long line in wscript_buildVolker Lendecke1-1/+5
Why? I'll add another file in a later commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-12util: Add tini to samba-util-coreAmitay Isaacs1-2/+2
So it can be used by CTDB. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-03-05build: fix standalone ctdb build --with-systemdDavid Disseldorp1-1/+2
For standalone ctdb builds, a samba-util-core dependency is added, without corresponding systemd libraries, which are needed when become_daemon.c is built --with-systemd. This results in: default/lib/util/become_daemon_20.o: In function `daemon_status': become_daemon.c:(.text+0x456): undefined reference to `sd_notifyf' collect2: error: ld returned 1 exit status Fix this by moving the systemd library dependencies from samba-util to samba-util-core, the become_daemon.c base build target. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Mar 5 20:49:51 CET 2018 on sn-devel-144
2018-03-02tests: Add basic ms_fnmatch unit testDavid Disseldorp1-0/+6
Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
2018-02-22util/tests: add rfc1738 cmocka testsDouglas Bagnall1-0/+6
These don't pass yet. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-22shift read_hex_bytes() and parse_guid_string() into lib/utilDouglas Bagnall1-1/+6
read_hex_bytes() is going to be used in lib/util/rfc1738.c. parse_guid_string() is shifted for two reasons: Firstly, it is called very often in some operations, sometimes constituting a few percent of the CPU load, and it makes several calls to read_hex_bytes(). We want the compiler to be able to inline those calls if it thinks that is wise. Secondly, there are other places that could do with fast GUID parsing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>