]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: auth_uid needs to be in AuthCapsInfo as well.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 25 Feb 2010 21:34:47 +0000 (13:34 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 25 Feb 2010 21:36:15 +0000 (13:36 -0800)
Conflicts:

src/auth/Auth.h

src/auth/Auth.h
src/auth/cephx/CephxKeyServer.cc
src/include/rados.h

index 0c43e4ccbe35d87b7467c938faae964c64231a64..577fa05c8240d2fa1a80da890dba94e48e6c8e77 100644 (file)
@@ -106,14 +106,14 @@ static inline ostream& operator<<(ostream& out, const EntityName& n) {
 
 struct EntityAuth {
   CryptoKey key;
-  __le64 uid;
+  __u64 auth_uid;
   map<string, bufferlist> caps;
 
   void encode(bufferlist& bl) const {
     __u8 struct_v = 2;
     ::encode(struct_v, bl);
     ::encode(key, bl);
-    ::encode(uid, bl);
+    ::encode(auth_uid, bl);
     ::encode(caps, bl);
   }
   void decode(bufferlist::iterator& bl) {
@@ -121,8 +121,8 @@ struct EntityAuth {
     ::decode(struct_v, bl);
     ::decode(key, bl);
     if (struct_v >= 2)
-      ::decode(uid, bl);
-    else uid = -1;
+      ::decode(auth_uid, bl);
+    else auth_uid = -1;
     ::decode(caps, bl);
   }
 };
@@ -134,15 +134,17 @@ static inline ostream& operator<<(ostream& out, const EntityAuth& a) {
 
 struct AuthCapsInfo {
   bool allow_all;
+  __u64 auth_uid;
   bufferlist caps;
 
   AuthCapsInfo() : allow_all(false) {}
 
   void encode(bufferlist& bl) const {
-    __u8 struct_v = 1;
+    __u8 struct_v = 2;
     ::encode(struct_v, bl);
     __u8 a = (__u8)allow_all;
     ::encode(a, bl);
+    ::encode(auth_uid, bl);
     ::encode(caps, bl);
   }
   void decode(bufferlist::iterator& bl) {
@@ -151,6 +153,9 @@ struct AuthCapsInfo {
     __u8 a;
     ::decode(a, bl);
     allow_all = (bool)a;
+    if (struct_v >= 2)
+      ::decode(auth_uid, bl);
+    else auth_uid = -1;
     ::decode(caps, bl);
   }
 };
index 933168c4fc135acd1b14e7d03d47131430002ecd..fceec626f917e8b11b1d721594a6d721644c08cc 100644 (file)
@@ -108,7 +108,7 @@ bool KeyServerData::get_caps(EntityName& name, string& type, AuthCapsInfo& caps_
   if (capsiter != iter->second.caps.end()) {
     caps_info.caps = capsiter->second;
   }
-
+  caps_info.auth_uid = iter->second.auth_uid;
   return true;
 }
 
index fb7edd772e644e2bce90378cb65d07234bb84ede..b3e8dbef401201fcc1700f5d4d4b4b00ce8a3274 100644 (file)
@@ -99,7 +99,7 @@ struct ceph_pg_pool {
        __le32 snap_epoch;        /* epoch of last snap */
        __le32 num_snaps;
        __le32 num_removed_snap_intervals;
-       __le64 uid;               /* who owns the pg */
+       __le64 auth_uid;               /* who owns the pg */
 } __attribute__ ((packed));
 
 /*