]> 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>
Tue, 30 Jan 2024 09:47:34 +0000 (15:17 +0530)
Fixes: https://tracker.ceph.com/issues/62077
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/pybind/mgr/nfs/export.py

index ed3bc1be3a4478252eee29ef46330d5340a3431a..8e6dcff7fcb5e27dfc36db57fc9653990fa5279a 100644 (file)
@@ -686,6 +686,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}'")