summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
13 dayss3:loadparm: return NULL upon memalloc failure in lp_idmap_backendHEADmasterShachar Sharon1-1/+1
Return NULL instead of valid-but-misleading cast from 'false' to pointer. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Thu Apr 23 20:53:10 UTC 2026 on atb-devel-224
2026-04-22s3:tests: Improve debugging for test_wbinfo_lookuprids_cache.shAndreas Schneider1-2/+22
Note that if this test fails, it is like something else creating keys. The last time it was a crashing smbd which left a key in the database and this test failed as a result. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Apr 22 16:35:58 UTC 2026 on atb-devel-224
2026-04-21vfs_ceph_new: remove double-cleanup in closedirShweta Sodani1-1/+0
vfs_ceph_release_fh() was called explicitly then again via the FSP extension destructor triggered by vfs_ceph_remove_fh(). Drop the explicit call and let the destructor handle cleanup. Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Tue Apr 21 22:18:42 UTC 2026 on atb-devel-224
2026-04-21vfs_ceph_new: fix return type mismatch in disk_freeShweta Sodani1-3/+3
-ENOMEM cast to uint64_t is not the error sentinel UINT64_MAX and leaves errno unset. Set errno and return UINT64_MAX instead. Also replace UINT64_MAX instead of (uint64_t)-1) in all error path. Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
2026-04-21vfs_ceph_new: fix END_PROFILE/END_PROFILE_X mismatch in ftruncateShweta Sodani1-1/+1
END_PROFILE omits the per-service counter; replace with END_PROFILE_X to match the START_PROFILE_X on the strict_allocate path. Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
2026-04-21s3/brlock: map nt-error from correct errno-valueShachar Sharon1-2/+2
The functions 'brl_lock_windows_default' and 'brl_lock_posix' uses explicit 'errno_ret' value to avoid possible errno overwrite. Use in failure case. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Shwetha Acharya <Shwetha.K.Acharya@ibm.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Apr 21 02:05:57 UTC 2026 on atb-devel-224
2026-04-20smbdotconf: Add "automount fs types" to smb.confPavel Filipenský1-0/+31
This adds a new global parameter "automount fs types" that allows administrators to configure additional filesystem types that should trigger automounting, beyond the always-supported autofs filesystem. To enable 'samba unaware FS' automounting, add: automount fs types = 0x12345678 This allows e.g. ZFS snapshots in <dataset root>/.zfs/snapshot to be mounted. To find out the magic number that is not listed in /usr/include/linux/magic.h, run: stat -f -c '0x%t' /path/to/mountpoint BUG: https://bugzilla.samba.org/show_bug.cgi?id=15991 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Mon Apr 20 19:57:42 UTC 2026 on atb-devel-224
2026-04-18vfs_gpfs: convert smb2gpfs_acl() to use tallocShwetha Acharya1-5/+7
This avoids mixing malloc and talloc allocation patterns and aligns the code with Samba's memory management conventions. Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@ibm.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Sat Apr 18 20:58:22 UTC 2026 on atb-devel-224
2026-04-16smbd: handle synthetic_smb_fname failure properly in delete_all_streamsShachar Sharon1-1/+1
When 'synthetic_smb_fname' fails due to memory error, it returns NULL. Fix this error-case logic in 'delete_all_streams'. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Thu Apr 16 13:48:23 UTC 2026 on atb-devel-224
2026-04-15s3/modules: fix snapper_gmt_fstatatNoel Power1-2/+5
snapper_gmt_fstatat is failing when called on items in a 'previous version' snapshot because the wrong timestamp value is passed (the raw timewarp value is used) and snapper_gmt_convert cannot find the valid snapshot instance to use. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16058 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Wed Apr 15 15:29:38 UTC 2026 on atb-devel-224
2026-04-15s3/modules: Fix vfs snapper not finding files in subdirsNoel Power1-12/+12
when trying to browse on windows a snapper share (exposed via windows previous versions) files in subdirs are not visible. In other words only files that are in the root dir of the versioned share can be seen /ashare/file1 /ashare/file2 /ashare/subdir /ashare/subdir/subfile1 For example with the file hierarchy above only file1, file2 and subdir are visible. Navigating into subdir shows an empty dir snapper_gmt_openat is failing because when calling snapper_gmt_convert it doesn't take into account the path to the subdirectory. snapper_gmt_convert is just passed the leaf name where it constructs the snapper path based on the base dir of the share. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16058 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-04-15s3:loadparm: fix NULL pointer dereference in volume_label()Jeremy Allison1-0/+3
volume_label() calls lp_servicename() as a fallback when lp_volume() returns an empty string. lp_servicename() is a FN_LOCAL_SUBSTITUTED_STRING that falls back to sDefault.szService when the service is invalid. Since sDefault.szService is initialized to NULL and is never set by init_globals(), the substitution returns NULL, and the subsequent strlen() call crashes with a segmentation fault. Add a NULL guard so volume_label() returns an empty string instead of crashing. Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 15 00:07:12 UTC 2026 on atb-devel-224
2026-04-14s3:smbd: guard lp_killservice() in delete_and_reload_printers() with ↵Jeremy Allison1-1/+2
connections_snum_used check delete_and_reload_printers() unconditionally calls lp_killservice() to destroy autoloaded printer services that are no longer in the printer list. If any active connection is still using the printer service number, the destroyed service can cause a NULL pointer dereference on subsequent requests. Guard the call with connections_snum_used() so the service is only freed when no connections are using it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-04-14s3:srvsvc: guard lp_killservice() in _srvsvc_NetShareDel() with ↵Jeremy Allison1-1/+3
connections_snum_used check _srvsvc_NetShareDel() unconditionally calls lp_killservice() to destroy the service after deleting a share via RPC. If any active connection is still using this service number, the destroyed service can cause a NULL pointer dereference on subsequent requests. Guard the call with connections_snum_used() so the service is only freed when no connections are using it. The periodic load_usershare_shares() sweep will clean up the stale service once all connections have disconnected. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-04-14s3:loadparm: guard free_service_byindex() in lp_servicenumber() with ↵Jeremy Allison1-0/+18
snum_in_use check lp_servicenumber() calls free_service_byindex() to destroy usershare services when usershare_exists() returns false or when the usershare file has been modified. This is unsafe because active connections may still hold the service number — the destroyed service leaves a NULL ServicePtrs[] entry that causes a NULL pointer dereference when the connection subsequently calls lp_servicename() or similar functions. The crash path is: get_referred_path() -> lp_servicenumber() -> usershare_exists() fails (e.g. EACCES) -> free_service_byindex() destroys service -> later request on same connection -> volume_label() -> lp_servicename() -> FN_LOCAL_SUBSTITUTED_STRING falls back to sDefault.szService (NULL) -> strlen(NULL) -> SIGSEGV Guard both free_service_byindex() call sites with the snum_in_use callback registered in the previous commit. When the service is in use by an active connection, skip the destruction and let the periodic load_usershare_shares() mark-and-sweep handle cleanup safely via its conn_snum_used() check. When snum_in_use is NULL (non-smbd programs), the original behaviour is preserved — services are freed immediately since no connections can exist. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-04-14s3:loadparm: add lp_register_snum_in_use_fn() callback registrationJeremy Allison3-0/+18
Add a mechanism for smbd to register a callback that checks whether a service number is currently in use by any active connection. This will be used by subsequent commits to guard free_service_byindex() calls in lp_servicenumber() and other sites that currently destroy services without checking if they are in use, which can leave active connections holding stale service numbers that lead to NULL pointer dereferences. The callback is registered by smbd during smbd_process() startup via connections_snum_used. Non-smbd programs (testparm, net, etc.) leave the callback as NULL, meaning no connections exist and it is always safe to free services. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-04-14s3:tests: add regression test for usershare EACCES crashJeremy Allison2-0/+191
Add a test that verifies smbd does not crash when a usershare definition file becomes inaccessible while a client is connected. The test creates a usershare, connects to it, makes the usershare definition file inaccessible (chmod 000), then issues a volume query which triggers the volume_label() -> lp_servicename() code path. It verifies smbd is still alive afterward by connecting to a different share. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-04-14s3/rpc_server: Add worker status smbcontrol message supportNoel Power3-2/+136
Add information about the number of connections a rpc_worker process is handling and when each connection was initiated. command smbcontrol 55063 rpc-dump-worker-status will output data like below: rpcd_spoolss pid 55063: num connections = 2 num_association_groups = 2 last client connection 2026/03/18 06:51:04.482192 last client disconnection 2026/03/18 06:51:00.304951 active connections: [1] endpoint=ncacn_np:[\pipe\spoolss] client addr=192.168.32.175 server=priu0002 connected at 2026/03/18 06:51:04.482192 [2] endpoint=ncacn_np:[\pipe\spoolss] client addr=192.168.33.232 server=priu0002 connected at 2026/03/18 06:47:08.466157 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Apr 14 12:12:07 UTC 2026 on atb-devel-224
2026-04-14rpc_server: Only allocate fsp when counting file locksShwetha Acharya1-10/+10
Avoids creating fsp, which is not needed unless we are going to count the brlocks. Also uses early continue and removes num_locks variable by assigning the result directly. Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@ibm.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Tue Apr 14 10:02:29 UTC 2026 on atb-devel-224
2026-04-14rpc_server: Optionally skip "process_exists" when enumerating filesVolker Lendecke1-1/+2
If you want to skip the potentially expensive process_exists calls when enumerating millions of files, set srvsvc : file enum check stale = false in your [global] section of your smb.conf Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-04-14rpc_server: Optionally skip counting byte range locks when enumerating filesRalph Wuerthner1-6/+11
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-04-08vfs_glusterfs: fix directory fd leak via FSP extension destructorThales Antunes de Oliveira Barretto1-7/+29
When Samba closes a directory backed by vfs_glusterfs, the glfs_fd_t opened by vfs_gluster_openat() is never closed. This leaks one libgfapi file descriptor and one server-side fd_t in glusterfsd per directory open/close cycle. With persistent SMB2 connections the leak is unbounded and drives monotonic RSS growth on the GlusterFS brick process. The leak happens because vfs_glusterfs creates two independent glfs_fd_t handles per directory: one via glfs_open() in vfs_gluster_openat(), stored in the FSP extension, and another via glfs_opendir() in vfs_gluster_fdopendir(), tracked by struct smb_Dir. On close, smb_Dir_destructor() closes the opendir handle and sets the pathref fd to -1. fd_close() then returns early without calling SMB_VFS_CLOSE, so vfs_gluster_close() never runs and the glfs_open() handle is orphaned. The original code passed NULL as the destroy callback to VFS_ADD_FSP_EXTENSION, so there was no safety net. The default VFS does not have this problem because fdopendir(3) wraps the existing kernel fd rather than opening a new handle. libgfapi has no equivalent -- glfs_opendir() always creates an independent handle by path. The actual glfs_fd_t is stored in the FSP extension, not in fsp->fh->fd (which holds a sentinel value), so Samba's generic close path cannot reach it. Register vfs_gluster_fsp_ext_destroy() as the FSP extension destroy callback. It calls glfs_close() on the stored pointer and is invoked by vfs_remove_all_fsp_extensions() during file_free(), which runs unconditionally for every fsp. In the explicit close path, vfs_gluster_close() NULLs the extension pointer before calling VFS_REMOVE_FSP_EXTENSION to prevent double-close. This follows the same pattern used by vfs_ceph_new.c (vfs_ceph_fsp_ext_destroy_cb). Observed on a production file server with persistent SMB2 connections and continuous directory operations. GlusterFS brick statedumps showed fd_t pool growth from 1,993 to 80,350 active instances over 6 days, roughly 13,000 leaked fds per day per brick. RN: Fix a directory file descriptor leak in vfs_glusterfs that caused unbounded memory growth on the GlusterFS brick with persistent SMB2 connections. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16043 Signed-off-by: Thales Antunes de Oliveira Barretto <thales.barretto.git@gmail.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Apr 8 16:46:12 UTC 2026 on atb-devel-224
2026-04-08printing: Set default value in case of non-exisiting recordVinit Agnihotri1-8/+13
This fixes regression caused by commit#e9a7dce599 Newly added function treats non-existing record as error, instead of setting just -1 i.e. default value for non-exisiting record for printing subsystem. This results into print_cache_expired returning incorrect status. Fix sets default value in case of non-exisiting record which would ensure print_cache_expired to return correct status. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16038 Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Rabinarayan Panigrahi <rapanigr@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2026-04-08s3:smb2_server: failing lease/oplock breaks should call ↵Stefan Metzmacher1-1/+36
smbd_server_connection_terminate() If there's a problem sending a lease break we need to call smbd_server_connection_terminate(xconn). Currently we only called smbXsrv_connection_disconnect_transport(), which only closes the low level socket, but it doesn't cleanup smbXsrv_connection and in case of the last connection for the smbXsrv_client, so we leave the stale structures and the stale process behind. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15995 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2026-04-07s3:printing: make printer_list.tdb none readable for othersShwetha Acharya1-1/+1
Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@ibm.com> Reviewed-by: Xavi Hernandez <xhernandez@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Tue Apr 7 16:12:32 UTC 2026 on atb-devel-224
2026-04-07s3:rpc_server: make epmdb.tdb non readable for othersShwetha Acharya2-2/+2
Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@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:idmap_tdb2: make idmap2.tdb non readable for othersShwetha Acharya1-1/+1
Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@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:idmap: make idmap.tdb non readable for othersShwetha Acharya1-1/+1
Signed-off-by: Shwetha Acharya <Shwetha.K.Acharya@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: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:locking: make leases.tdb none readable for othersRalph Wuerthner2-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:locking: make locking.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-04-07s3:idmap_autorid: make autorid.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-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-04-07s3:smbprofile: make smbprofile.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-04-07s3:libads: Set dns_lookup_kdc=false during net ads joinPavel Filipenský1-1/+59
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15999 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Tue Apr 7 14:09:40 UTC 2026 on atb-devel-224
2026-04-07s3:libads: Allow to specify 'dns_lookup_kdc' in krb5.confPavel Filipenský2-11/+45
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15999 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-04-07s3:libnet: Fix DC numeric ip handlingPavel Filipenský1-1/+1
This is fixing regression introduced via 82f53c8 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15999 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-04-02vfs_ceph_new: fix errno handling in vfs_ceph_readdirShweta Sodani1-4/+4
Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Thu Apr 2 05:49:13 UTC 2026 on atb-devel-224
2026-04-02vfs_ceph_new: add missing sentinel to enum_vfs_cephfs_fscrypt_valsShweta Sodani1-0/+1
Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
2026-03-30s3/librpc/crypto: Don't keep growing in memory keytabNoel Power1-1/+17
When we have long living concurrent connections every rpc bind ends up calling and subsequently adding keytab entries to the memory keytab returned by 'gse_krb5_get_server_keytab(...)'. This is happening because as long as there is a handle open for the keytab named "MEMORY:cifs_srv_keytab" then we keep adding entries to it. Note: There is no leak of gensec_security nor the krb5_keytab it contains. When rpc clients connected to the rpc worker process exit the gensec_security and the krb5_keytab structures are destructed as expected. However because we use a fixed name "MEMORY:cifs_srv_keytab" clients end up with a handle to a reference counted shared keytab. Destruction of the keytab results in the associated reference count being decremented. When the reference count reaches 0 the keytab is destroyed. To avoid the keytab being extended the easiest solution is to ensure a unique memory keytab is created for each client. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16042 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Mar 30 09:36:45 UTC 2026 on atb-devel-224
2026-03-26s3:winbind: Add support for krb5_ccache_type = DEFAULTAndreas Schneider1-0/+37
This will use the ccache_type defined in the krb5.conf. Pair-Programmed-With: Pavel Filipenský <pfilipen@samba.org> Signed-off-by: Pavel Filipenský <pfilipen@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2026-03-26s3:winbind: Also support %{uid} substitution for krb5_ccache_typeAndreas Schneider1-3/+12
Pair-Programmed-With: Pavel Filipenský <pfilipen@redhat.com> Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2026-03-26s3:winbind: Improve generate_krb5_ccache()Andreas Schneider1-55/+85
Signed-off-by: Andreas Schneider <asn@samba.org> Pair-Programmed-With: Alexander Bokovoy <ab@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2026-03-26vfs_ceph_new: do not set negative value in vfs_aio_state.errorShachar Sharon1-1/+1
Ceph uses negative error valuers but Samba's VFS expects error value as non-negative values (errno style). Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Thu Mar 26 09:23:11 UTC 2026 on atb-devel-224
2026-03-26vfs_ceph_new: avoid iref leak due to failure in ceph_ll_linkShachar Sharon1-4/+0
Even in cases where vfs_ceph_ll_link fails, we need to do iput in order to decrement inode's ref-count. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
2026-03-26vfs_ceph_new: protect from malloc failure in ceph_getcwdShachar Sharon1-0/+3
When ceph_getcwd returns NULL (due to out-of-memory) bail out to avoid segfault in strlen. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
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-20vfs_ceph_new: fix typecast error in vfs_ceph_flistxattrShweta Sodani1-1/+1
Signed-off-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Fri Mar 20 06:35:12 UTC 2026 on atb-devel-224
2026-03-20vfs_ceph_new: Replace #if with #ifdefAnoop C S1-9/+9
Use '#ifdef' instead of '#if' to make the presence of the define explicit, rather than relying on undefined macros evaluating to zero. Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>
2026-03-20vfs_ceph_new: Remove code duplicationAnoop C S1-4/+3
Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: John Mulligan <jmulligan@redhat.com>