]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: move UserPerm into its own header file
authorGreg Farnum <gfarnum@redhat.com>
Wed, 3 Aug 2016 20:03:49 +0000 (13:03 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 21 Sep 2016 23:33:54 +0000 (16:33 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/client/Client.h
src/client/Makefile.am
src/client/UserPerm.h [new file with mode: 0644]

index 18067d37a829b6ff45b2146e63947cdd411c8624..a479d29be94ff84cd726ea8e5fbfb7900d461ec2 100644 (file)
@@ -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;
index fa0dc80f4cf8b26b38bf6e87cd0c2bf74b1013e2..5776f526ef0a4ca4f41a4878ac621d745a342175 100644 (file)
@@ -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 (file)
index 0000000..bae38aa
--- /dev/null
@@ -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