From: Xiubo Li Date: Tue, 20 Dec 2022 04:21:31 +0000 (+0800) Subject: mds: add assign operator support for MDSCapMatch X-Git-Tag: testing/wip-pdonnell-testing-20240430.123648-reef-debug~91^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a515dcc522f524bf495f9b062315f206a9d828bc;p=ceph-ci.git mds: add assign operator support for MDSCapMatch Fixes: https://tracker.ceph.com/issues/57154 Signed-off-by: Xiubo Li (cherry picked from commit 5b6634c23d4e21b06064fddd49998ee949c34e5c) --- diff --git a/src/mds/MDSAuthCaps.h b/src/mds/MDSAuthCaps.h index 6cfdf489f9a..ba4b369a61b 100644 --- a/src/mds/MDSAuthCaps.h +++ b/src/mds/MDSAuthCaps.h @@ -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 == "";