Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / 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
21 class CephContext;
22
23 class AuthNoneServiceHandler  : public AuthServiceHandler {
24 public:
25   explicit AuthNoneServiceHandler(CephContext *cct_)
26     : AuthServiceHandler(cct_) {}
27   ~AuthNoneServiceHandler() override {}
28   
29   int start_session(EntityName& name, bufferlist::iterator& indata, bufferlist& result_bl, AuthCapsInfo& caps) override {
30     entity_name = name;
31     caps.allow_all = true;
32     return CEPH_AUTH_NONE;
33   }
34   int handle_request(bufferlist::iterator& indata, bufferlist& result_bl, uint64_t& global_id, AuthCapsInfo& caps, uint64_t *auid = NULL) override {
35     return 0;
36   }
37   void build_cephx_response_header(int request_type, int status, bufferlist& bl) { }
38 };
39
40 #endif