From 14052d4b12a7efb178af5147d761a1589c23e413 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 24 Feb 2010 14:41:11 -0800 Subject: [PATCH] auth: Add a uid field to EntityAuth; make it a required feature --- src/auth/Auth.h | 7 ++++++- src/include/ceph_fs.h | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/auth/Auth.h b/src/auth/Auth.h index 8ed17cc133f56..0c43e4ccbe35d 100644 --- a/src/auth/Auth.h +++ b/src/auth/Auth.h @@ -106,18 +106,23 @@ static inline ostream& operator<<(ostream& out, const EntityName& n) { struct EntityAuth { CryptoKey key; + __le64 uid; map caps; void encode(bufferlist& bl) const { - __u8 struct_v = 1; + __u8 struct_v = 2; ::encode(struct_v, bl); ::encode(key, bl); + ::encode(uid, bl); ::encode(caps, bl); } void decode(bufferlist::iterator& bl) { __u8 struct_v; ::decode(struct_v, bl); ::decode(key, bl); + if (struct_v >= 2) + ::decode(uid, bl); + else uid = -1; ::decode(caps, bl); } }; diff --git a/src/include/ceph_fs.h b/src/include/ceph_fs.h index 0c2241ef36532..291c405ce0ba7 100644 --- a/src/include/ceph_fs.h +++ b/src/include/ceph_fs.h @@ -53,8 +53,9 @@ /* * feature bits */ -#define CEPH_FEATURE_SUPPORTED 0 -#define CEPH_FEATURE_REQUIRED 0 +#define CEPH_FEATURE_UID 1 +#define CEPH_FEATURE_SUPPORTED CEPH_FEATURE_UID +#define CEPH_FEATURE_REQUIRED CEPH_FEATURE_UID /* -- 2.39.5