]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: add assign operator support for MDSCapMatch
authorXiubo Li <xiubli@redhat.com>
Tue, 20 Dec 2022 04:21:31 +0000 (12:21 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 27 Mar 2024 00:42:35 +0000 (08:42 +0800)
Fixes: https://tracker.ceph.com/issues/57154
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 5b6634c23d4e21b06064fddd49998ee949c34e5c)

src/mds/MDSAuthCaps.h

index 6cfdf489f9a15db172903b50bad523bcb80a298f..ba4b369a61b07edd79b8109ff863db8e3a5f517b 100644 (file)
@@ -115,8 +115,17 @@ struct MDSCapMatch {
     normalize_path();
   }
 
+  const MDSCapMatch& operator=(const MDSCapMatch& m) {
+    uid = m.uid;
+    gids = m.gids;
+    path = m.path;
+    fs_name = m.fs_name;
+    root_squash = m.root_squash;
+    return *this;
+  }
+
   void normalize_path();
-  
+
   bool is_match_all() const
   {
     return uid == MDS_AUTH_UID_ANY && path == "";