]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/posix: fix crash in radosgw-admin
authorNithya Balachandran <nithya.balachandran@ibm.com>
Tue, 24 Mar 2026 11:33:15 +0000 (11:33 +0000)
committerDaniel Gryniewicz <dang@fprintf.net>
Fri, 29 May 2026 16:05:12 +0000 (12:05 -0400)
The POSIXBucket copy constructor incorrectly calls .get() on a
on a temporary unique_ptr returned by clone(), causing immediate
deletion of the Directory object. This leaves a dangling pointer
that triggers a segfault during destruction.

Signed-off-by: Nithya Balachandran <nithya.balachandran@ibm.com>
src/rgw/driver/posix/rgw_sal_posix.h

index cdab327a83f1cd33b7417c3e3e57b9ace696964e..4edc8b13abe5a6f663adbb56d6d119bb6e0e5b77 100644 (file)
@@ -876,7 +876,7 @@ public:
     acls(_b.acls),
     ns(_b.ns)
     {
-      dir.reset(static_cast<Directory*>(_b.dir->clone().get()));
+      dir = _b.dir->clone_dir();
     }
 
   virtual ~POSIXBucket() { }