diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 16:19:57 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-18 16:19:57 -0800 |
commit | 4e7a5dcd1bbab6560fbc8ada29a840e7a20ed7bc (patch) | |
tree | a77e9b4563022340361ca673ef2e1beebb538e2f /fs/ceph/ceph_strings.c | |
parent | 5f44f142601bf94c448e2d463f0f18fd159da164 (diff) | |
download | linux-4e7a5dcd1bbab6560fbc8ada29a840e7a20ed7bc.tar.bz2 |
ceph: negotiate authentication protocol; implement AUTH_NONE protocol
When we open a monitor session, we send an initial AUTH message listing
the auth protocols we support, our entity name, and (possibly) a previously
assigned global_id. The monitor chooses a protocol and responds with an
initial message.
Initially implement AUTH_NONE, a dummy protocol that provides no security,
but works within the new framework. It generates 'authorizers' that are
used when connecting to (mds, osd) services that simply state our entity
name and global_id.
This is a wire protocol change.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/ceph_strings.c')
-rw-r--r-- | fs/ceph/ceph_strings.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ceph/ceph_strings.c b/fs/ceph/ceph_strings.c index 90d19d9d8d8f..8e4be6a80c62 100644 --- a/fs/ceph/ceph_strings.c +++ b/fs/ceph/ceph_strings.c @@ -3,6 +3,19 @@ */ #include "types.h" +const char *ceph_entity_type_name(int type) +{ + switch (type) { + case CEPH_ENTITY_TYPE_MDS: return "mds"; + case CEPH_ENTITY_TYPE_OSD: return "osd"; + case CEPH_ENTITY_TYPE_MON: return "mon"; + case CEPH_ENTITY_TYPE_CLIENT: return "client"; + case CEPH_ENTITY_TYPE_ADMIN: return "admin"; + case CEPH_ENTITY_TYPE_AUTH: return "auth"; + default: return "unknown"; + } +} + const char *ceph_osd_op_name(int op) { switch (op) { |