Skip to content

Commit 52ef1f1

Browse files
committed
mgr/nfs: validate path before updating a cephfs export
Fixes: https://tracker.ceph.com/issues/62077 Signed-off-by: Dhairya Parmar <[email protected]>
1 parent cc7b69f commit 52ef1f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pybind/mgr/nfs/export.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,8 @@ def create_export_from_dict(self,
686686
if not check_fs(self.mgr, fs_name):
687687
raise FSNotFound(fs_name)
688688

689+
validate_cephfs_path(self.mgr, fs_name, path)
690+
689691
user_id = f"nfs.{cluster_id}.{ex_id}"
690692
if "user_id" in fsal and fsal["user_id"] != user_id:
691693
raise NFSInvalidOperation(f"export FSAL user_id must be '{user_id}'")

0 commit comments

Comments
 (0)