]> git.proxmox.com Git - ceph.git/blob - ceph/src/auth/none/AuthNoneServiceHandler.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / auth / none / AuthNoneServiceHandler.h
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) 2004-2009 Sage Weil <sage@newdream.net>
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 #ifndef CEPH_AUTHNONESERVICEHANDLER_H
16 #define CEPH_AUTHNONESERVICEHANDLER_H
17
18 #include "auth/AuthServiceHandler.h"
19 #include "auth/Auth.h"
20 #include "include/common_fwd.h"
21
22 class AuthNoneServiceHandler : public AuthServiceHandler {
23 public:
24 explicit AuthNoneServiceHandler(CephContext *cct_)
25 : AuthServiceHandler(cct_) {}
26 ~AuthNoneServiceHandler() override {}
27
28 int handle_request(ceph::buffer::list::const_iterator& indata,
29 size_t connection_secret_required_length,
30 ceph::buffer::list *result_bl,
31 AuthCapsInfo *caps,
32 CryptoKey *session_key,
33 std::string *connection_secret) override {
34 return 0;
35 }
36
37 private:
38 int do_start_session(bool is_new_global_id,
39 ceph::buffer::list *result_bl,
40 AuthCapsInfo *caps) override {
41 caps->allow_all = true;
42 return 1;
43 }
44 };
45
46 #endif