]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: validate path before updating a cephfs export
authorDhairya Parmar <dparmar@redhat.com>
Mon, 7 Aug 2023 11:13:13 +0000 (16:43 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Thu, 13 Mar 2025 12:51:40 +0000 (18:21 +0530)
Fixes: https://tracker.ceph.com/issues/62077
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit 52ef1f1abb259dca0c33519c49aabedd926c6cb2)

src/pybind/mgr/nfs/export.py

index 0d0a189b916311678d2ff93cc5bbbd399a907cd2..7ed988174015a2ede7f2b20e4fd2067d7aaf2760 100644 (file)
@@ -665,6 +665,8 @@ class ExportMgr:
             if not check_fs(self.mgr, fs_name):
                 raise FSNotFound(fs_name)
 
+            validate_cephfs_path(self.mgr, fs_name, path)
+
             user_id = f"nfs.{cluster_id}.{ex_id}"
             if "user_id" in fsal and fsal["user_id"] != user_id:
                 raise NFSInvalidOperation(f"export FSAL user_id must be '{user_id}'")