From: Greg Farnum Date: Wed, 3 Aug 2016 20:03:49 +0000 (-0700) Subject: client: move UserPerm into its own header file X-Git-Tag: v11.0.1~36^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0529a1d42355b035584b33d48c60f92c898a1969;p=ceph.git client: move UserPerm into its own header file Signed-off-by: Greg Farnum --- diff --git a/src/client/Client.h b/src/client/Client.h index 18067d37a829..a479d29be94f 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -47,6 +47,7 @@ using std::fstream; #include "InodeRef.h" #include "UserGroups.h" +#include "UserPerm.h" class FSMap; class FSMapUser; @@ -83,19 +84,6 @@ enum { }; -struct UserPerm -{ -private: - uid_t m_uid; - gid_t m_gid; -public: - UserPerm() : m_uid(-1), m_gid(-1) {} - UserPerm(int uid, int gid) : m_uid(uid), m_gid(gid) {} - // the readdir code relies on UserPerm copy-constructor being a deep copy! - uid_t uid() const { return m_uid; } - gid_t gid() const { return m_gid; } -}; - struct CommandOp { ConnectionRef con; diff --git a/src/client/Makefile.am b/src/client/Makefile.am index fa0dc80f4cf8..5776f526ef0a 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -26,6 +26,7 @@ noinst_HEADERS += \ client/ioctl.h \ client/ObjecterWriteback.h \ client/posix_acl.h \ + client/UserPerm.h \ client/UserGroups.h if WITH_FUSE diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h new file mode 100644 index 000000000000..bae38aa58bf3 --- /dev/null +++ b/src/client/UserPerm.h @@ -0,0 +1,32 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2016 Red Hat + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +#ifndef CEPH_CLIENT_USERPERM_H +#define CEPH_CLIENT_USERPERM_H + +struct UserPerm +{ +private: + uid_t m_uid; + gid_t m_gid; +public: + UserPerm() : m_uid(-1), m_gid(-1) {} + UserPerm(int uid, int gid) : m_uid(uid), m_gid(gid) {} + // the readdir code relies on UserPerm copy-constructor being a deep copy! + uid_t uid() const { return m_uid; } + gid_t gid() const { return m_gid; } +}; + + +#endif