]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph - scalable distributed file system | |
5 | * | |
6 | * Copyright (C) 2009-2011 New Dream Network | |
7 | * | |
8 | * This is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU Lesser General Public | |
10 | * License version 2.1, as published by the Free Software | |
11 | * Foundation. See file COPYING. | |
12 | * | |
13 | */ | |
14 | ||
15 | #include "AuthNoneAuthorizeHandler.h" | |
16 | #include "common/debug.h" | |
17 | ||
18 | #define dout_subsys ceph_subsys_auth | |
19 | ||
28e407b8 AA |
20 | bool AuthNoneAuthorizeHandler::verify_authorizer( |
21 | CephContext *cct, KeyStore *keys, | |
22 | bufferlist& authorizer_data, bufferlist& authorizer_reply, | |
23 | EntityName& entity_name, uint64_t& global_id, AuthCapsInfo& caps_info, | |
24 | CryptoKey& session_key, | |
25 | uint64_t *auid, | |
26 | std::unique_ptr<AuthAuthorizerChallenge> *challenge) | |
7c673cae FG |
27 | { |
28 | bufferlist::iterator iter = authorizer_data.begin(); | |
29 | ||
30 | try { | |
31 | __u8 struct_v = 1; | |
32 | ::decode(struct_v, iter); | |
33 | ::decode(entity_name, iter); | |
34 | ::decode(global_id, iter); | |
35 | } catch (const buffer::error &err) { | |
36 | ldout(cct, 0) << "AuthNoneAuthorizeHandle::verify_authorizer() failed to decode" << dendl; | |
37 | return false; | |
38 | } | |
39 | ||
40 | caps_info.allow_all = true; | |
41 | ||
42 | return true; | |
43 | } | |
44 | ||
45 | // Return type of crypto used for this session's data; for none, no crypt used | |
46 | ||
47 | int AuthNoneAuthorizeHandler::authorizer_session_crypto() | |
48 | { | |
49 | return SESSION_CRYPTO_NONE; | |
50 | } |