summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2026-04-07s3:gencache: make gencache.tdb none readable for othersRalph Wuerthner1-2/+2
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-04-07s3:cleanupdb: make smbd_cleanupd.tdb none readable for othersRalph Wuerthner1-1/+1
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-03-20s3:lib:netapi set talloc type for GROUP_INFO_xGary Lockyer1-0/+4
Call talloc_set_type setting the type name after copying the GROUP_INFO to the buffer. This will allow the client code to use talloc_get_type_abort, if needed to suppress any cast-align warnings Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
2026-03-10s3: Warn if no mutexes available at runtimeVolker Lendecke1-2/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org>
2026-02-15lib: Streamline finding a file's block device for quota codeVolker Lendecke1-10/+106
Use /proc/self/mountinfo to find the block device a file is mounted on for quotactl purposes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15lib: Convert sys_path_to_bdev to tallocVolker Lendecke1-23/+37
Next we'll have sys_dev_to_bdev based on string_list_make, which is talloc-based. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15adouble: Use strequal_m instead of strcasecmp_mVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15lib: Simplify conv_str_sizeVolker Lendecke1-31/+3
conv_str_size_error() from lib/util has almost the same code Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-21s3:lib: Remove unused codeJennifer Sutton1-8/+0
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2026-01-20lib: Remove a function unused since 2016Volker Lendecke1-5/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20srvsvc: Move valid_share_pathname() to where it's usedVolker Lendecke1-33/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20lib: Remove the pointless unix_format() macroVolker Lendecke1-2/+1
One of the two callers even had a comment what it does... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20lib: Reduce indentation with an early returnVolker Lendecke1-12/+13
Review with "git show -w" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20smbd: Remove unused STR_TO_SMB_BIG_UINTVolker Lendecke1-27/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20smbd: Scan output of get quota command with sscanfVolker Lendecke1-77/+17
sscanf can skip white space and also parse uint32/uint64 for us. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20smbd: Add a NULL check for get quota command outputVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20smbd: Reduce indentation with an early returnVolker Lendecke1-89/+85
Review with "git show -w" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-20smbd: Modernize a few DEBUGsVolker Lendecke1-4/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-14lib: Fix the build on solarisVolker Lendecke1-9/+2
Solaris does not define HAVE_POSIX_CAPABILITIES and does not have cap_value_t. Confirmed by the reporter. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 14 15:25:00 UTC 2026 on atb-devel-224
2026-01-13s3:lib/util_sock: allow {before,after}_connect hooks to be passed to ↵Stefan Metzmacher1-3/+8
open_socket_out_send() async_connect_send() already has these hooks now open_socket_out_send() callers can pass them through. This will be useful for IPPROTO_SMBDIRECT sockets to setup things between the socket() and connect() syscalls. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jan 13 08:13:04 UTC 2026 on atb-devel-224
2026-01-12lib: Remove [set|drop]_effective_capability and enum smbd_capabilityVolker Lendecke1-132/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 12 10:39:38 UTC 2026 on atb-devel-224
2026-01-12lib: Add capability-specific functionsVolker Lendecke1-0/+100
This makes the one-attempt logic for dac_override simpler to understand. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2026-01-12lib: Remove LEASE_CAPABILITYVolker Lendecke1-5/+0
This was only used via vfs_gpfs, and that removed its use in 2020. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2026-01-12lib: Remove KERNEL_OPLOCK_CAPABILITYVolker Lendecke1-6/+0
This was only used in the IRIX oplock code, which was removed in 2018. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2026-01-12lib: Remove explicitly dropping capabilities before execVolker Lendecke1-12/+0
These calls are not necessary: When setting capabilities, we always remove them from the inheritable set, so they will inevitably be removed at exec-time. Also, these groups of calls were never updated for DAC_OVERRIDE, which would have posed a pretty severe problem. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2026-01-07lib: Reduce indentation with an early returnVolker Lendecke1-191/+185
Review with "git show -w" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Remove some code #ifdef'ed out for more than 20 yearsVolker Lendecke2-94/+0
We have a git history if someone wants to dig this up Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07smb: Modernize a few DEBUGsVolker Lendecke1-10/+14
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07smbd: Move utok_string() into smbdVolker Lendecke1-20/+0
Only used in chdir_current_service() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Save lines with direct initializationVolker Lendecke1-8/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Remove two unused functionsVolker Lendecke1-12/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Simplify sys_acl_to_text() with talloc_asprintf_addbuf()Volker Lendecke1-40/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Fix some whitespaceVolker Lendecke2-21/+21
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-14s3:mdssvc: Remove support for tracker sparql supportAndreas Schneider3-1346/+0
This only support v2 of tracker sparql which is only avilable on the Ubuntu 20.04 runner. All newer distributions provide only tracker sparql v3. Also the tevent glib stopped working on Fedora 43. Time to remove it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-11-12s3:lib:util_tdb: Add format identifier for 64-bit integer pack/unpackVinit Agnihotri1-0/+15
Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10lib: Introduce cp_smb_basename() helper functionVolker Lendecke1-0/+5
I always had to look up the sequence of NULLs and 0s. Save lines. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Nov 10 14:33:28 UTC 2025 on atb-devel-224
2025-11-10lib: Fix trailing whitespaceVolker Lendecke5-61/+60
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10lib: Remove some unused code #ifdef'ed out for more than 10 yearsVolker Lendecke1-47/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10s3: Remove TALLOC_REALLOC() macroVolker Lendecke1-2/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-10s3: Replace a few calls to TALLOC() with talloc_size()Volker Lendecke1-1/+1
That does the same Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-10-21smbd: Use fsp_str_dbg() in DEBUGsVolker Lendecke1-7/+6
This removes "git grep fsp_name->base_name" references. Referencing fsp_name->base_name is potentially racy and affected by https://bugzilla.samba.org/show_bug.cgi?id=15909 This removes some obvious git grep lines, still leaving far too many... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-08lib: Add adouble_buf_parse()Volker Lendecke2-0/+71
Simplified version of ad_get that takes a buffer and does basic parsing of an AppleDouble file format. The entries are represented as DATA_BLOBs directly pointing at "buf" to avoid offset calculations in users of this. Yes, this is a duplication of logic, but it makes the next patch possible. Future patches could use this in ad_unpack() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-08lib: Simplify data definitionsVolker Lendecke1-2/+2
C calculates the array size itself Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-08lib: Avoid a talloc_zero in afpinfo_new()Volker Lendecke1-4/+6
Use a struct assignment. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-08lib: Fix typosVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-08lib: Slightly simplify ad_read_rsrc_adouble()Volker Lendecke1-3/+1
We have the MIN() macro for this Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-09-29lib: Add a safeguard for misconfigured directory permissionsVolker Lendecke1-0/+7
An installation I've seen had the path to the msg.lock directory set up such that only root could access it. We're calling serverid_exists() as non-root, so this is a pretty bad error. Log this as an error in syslog by default and assume this PID still exists. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 29 08:14:22 UTC 2025 on atb-devel-224
2025-09-29lib: Remove an #include "includes.h"Volker Lendecke1-2/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-09-02lib: Use talloc_realloc_zero() in a few obvious placesVolker Lendecke1-7/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-08-27s3:lib: Initialize pointer to NULLJennifer Sutton1-1/+1
../../source3/lib/netapi/tests/netdisplay.c: In function ‘test_netquerydisplayinformation’: ../../source3/lib/netapi/tests/netdisplay.c:87:45: error: ‘current_name’ may be used uninitialized [-Werror=maybe-uninitialized] 87 | if (name && strcasecmp(current_name, name) == 0) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../source3/lib/netapi/tests/netdisplay.c:37:21: note: ‘current_name’ was declared here 37 | const char *current_name; | ^~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>