]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
AUTH: optimize header file dependency.
authorshawn <cxwshawn@gmail.com>
Fri, 20 May 2016 08:39:29 +0000 (04:39 -0400)
committershawn <cxwshawn@gmail.com>
Fri, 20 May 2016 08:43:33 +0000 (04:43 -0400)
same work as PR: https://github.com/ceph/ceph/pull/9193, https://github.com/ceph/ceph/pull/9161

Signed-off-by: Xiaowei Chen <chen.xiaowei@h3c.com>
39 files changed:
src/auth/Auth.h
src/auth/AuthAuthorizeHandler.cc
src/auth/AuthAuthorizeHandler.h
src/auth/AuthClientHandler.cc
src/auth/AuthClientHandler.h
src/auth/AuthMethodList.cc
src/auth/AuthServiceHandler.cc
src/auth/AuthServiceHandler.h
src/auth/AuthSessionHandler.cc
src/auth/AuthSessionHandler.h
src/auth/Crypto.cc
src/auth/Crypto.h
src/auth/KeyRing.cc
src/auth/KeyRing.h
src/auth/RotatingKeyRing.cc
src/auth/RotatingKeyRing.h
src/auth/cephx/CephxAuthorizeHandler.cc
src/auth/cephx/CephxAuthorizeHandler.h
src/auth/cephx/CephxClientHandler.cc
src/auth/cephx/CephxClientHandler.h
src/auth/cephx/CephxKeyServer.cc
src/auth/cephx/CephxKeyServer.h
src/auth/cephx/CephxProtocol.h
src/auth/cephx/CephxServiceHandler.cc
src/auth/cephx/CephxServiceHandler.h
src/auth/cephx/CephxSessionHandler.cc
src/auth/cephx/CephxSessionHandler.h
src/auth/none/AuthNoneAuthorizeHandler.h
src/auth/none/AuthNoneClientHandler.h
src/auth/none/AuthNoneProtocol.h
src/auth/none/AuthNoneServiceHandler.h
src/auth/none/AuthNoneSessionHandler.h
src/auth/unknown/AuthUnknownAuthorizeHandler.cc
src/auth/unknown/AuthUnknownAuthorizeHandler.h
src/auth/unknown/AuthUnknownClientHandler.h
src/auth/unknown/AuthUnknownProtocol.h
src/auth/unknown/AuthUnknownServiceHandler.h
src/auth/unknown/AuthUnknownSessionHandler.h
src/tools/ceph_authtool.cc

index 12d49094b437bd70b72a8c49a8bc9bacaeb3c96d..9dc88ffde8eb9fc28a0e51e386276ca76b8739f6 100644 (file)
@@ -16,9 +16,6 @@
 #define CEPH_AUTHTYPES_H
 
 #include "Crypto.h"
-#include "msg/msg_types.h"
-
-#include "common/config.h"
 #include "common/entity_name.h"
 
 class Cond;
index c9c259008944e20fd8645fd6ba135f50bbae60d9..e6e5eb997a62def79af6e8be8fc3b304b1c1cb76 100644 (file)
  *
  */
 
-#include "common/debug.h"
-#include "Auth.h"
 #include "AuthAuthorizeHandler.h"
 #include "cephx/CephxAuthorizeHandler.h"
 #include "none/AuthNoneAuthorizeHandler.h"
-#include "AuthMethodList.h"
 #include "common/Mutex.h"
 
-#define dout_subsys ceph_subsys_auth
-
 AuthAuthorizeHandler *AuthAuthorizeHandlerRegistry::get_handler(int protocol)
 {
   if (!supported.is_supported_auth(protocol)) {
index 7b67876e44be3d8dfdf1c835e9c98216257bec6c..2e81f14abde6462c14968419d8353760cbb588af 100644 (file)
@@ -18,7 +18,7 @@
 #include "Auth.h"
 #include "AuthMethodList.h"
 #include "include/types.h"
-
+#include "common/Mutex.h"
 // Different classes of session crypto handling
 
 #define SESSION_CRYPTO_NONE 0
index 5b02a258469b792782fe529c8606c61165d30147..a76d1e4cc83c60e09e62afb1aa4d297bd7034414 100644 (file)
 #include <errno.h>
 
 #include "AuthClientHandler.h"
-#include "KeyRing.h"
-
-#include "messages/MAuth.h"
-#include "messages/MAuthReply.h"
-
 #include "cephx/CephxClientHandler.h"
 #include "none/AuthNoneClientHandler.h"
 
index 9b34a6f8270b8befaebae128ee0716069bd0420e..0bebb74c447f87f8aed38a8ce09ba2265f920bef 100644 (file)
 
 
 #include "auth/Auth.h"
-
-#include "common/Mutex.h"
-#include "common/Cond.h"
 #include "common/RWLock.h"
 
-#include "common/Timer.h"
-
 class CephContext;
 struct MAuthReply;
 class AuthClientHandler;
index 0e507fbf43f901b5f0e83c2898b89361138fb6cf..78b8858c0782234c2f1645cc8916d2979647fc90 100644 (file)
@@ -13,9 +13,6 @@
  */
 
 #include <algorithm>
-
-#include "common/Mutex.h"
-#include "common/config.h"
 #include "common/debug.h"
 #include "include/str_list.h"
 
index 8e2d96618bab678dc02f643200166c1475ee9389..bd265c4f0c962fa2fb229f8eb421f1dea25813c7 100644 (file)
@@ -15,8 +15,6 @@
 #include "AuthServiceHandler.h"
 #include "cephx/CephxServiceHandler.h"
 #include "none/AuthNoneServiceHandler.h"
-#include "AuthMethodList.h"
-#include "common/config.h"
 
 #define dout_subsys ceph_subsys_auth
 
index ccadbb0fa54ac70aed459873980a5fedfee5b66e..6bd8bd97634a14573891ffa52db26a697f58810b 100644 (file)
@@ -16,7 +16,6 @@
 #define CEPH_AUTHSERVICEHANDLER_H
 
 #include "include/types.h"
-#include "common/config.h"
 #include "Auth.h"
 
 class CephContext;
index e928cf74fe28b2884f9f45285e08608cf76b27da..9734a5d5de8c54ffdd5b504309a35c1ec8710216 100644 (file)
@@ -17,7 +17,6 @@
 #include "cephx/CephxSessionHandler.h"
 #include "none/AuthNoneSessionHandler.h"
 #include "unknown/AuthUnknownSessionHandler.h"
-#include "common/config.h"
 
 #define dout_subsys ceph_subsys_auth
 
index b1f30a400670d12e83f71fede74bb15057e993a7..d051750bcadc48280f3f348d921b2901e9ec95d9 100644 (file)
@@ -17,8 +17,6 @@
 #define CEPH_AUTHSESSIONHANDLER_H
 
 #include "include/types.h"
-#include "common/config.h"
-#include "msg/Message.h"
 #include "Auth.h"
 
 #define SESSION_SIGNATURE_FAILURE -1
@@ -27,6 +25,7 @@
 
 class CephContext;
 class KeyServer;
+class Message;
 
 struct AuthSessionHandler {
 protected:
index 61b2ac88217b1e357236fe6a717071fea01e9999..5ed9e88052ece2e955cdc9578d8de72e15f90c79 100644 (file)
 #include "common/Clock.h"
 #include "common/armor.h"
 #include "common/ceph_crypto.h"
-#include "common/config.h"
-#include "common/debug.h"
 #include "common/hex.h"
 #include "common/safe_io.h"
 #include "include/ceph_fs.h"
 #include "include/compat.h"
-
+#include "common/Formatter.h"
+#include "common/debug.h"
 #include <errno.h>
 
 int get_random_bytes(char *buf, int len)
index 3bfc5aabd17a8174c837c5b9dee0d16c9c986a32..59ee8b3001c9f3b59f403ef1cbd73b711d36af2e 100644 (file)
@@ -18,8 +18,6 @@
 #include "include/types.h"
 #include "include/utime.h"
 #include "include/memory.h"
-
-#include "common/Formatter.h"
 #include "include/buffer.h"
 
 #include <string>
@@ -27,6 +25,8 @@
 class CephContext;
 class CryptoHandler;
 class CryptoKeyContext;
+namespace ceph { class Formatter; }
+
 
 /*
  * some per-key context that is specific to a particular crypto backend
index 8d5bdef379cd198530364702cf6d30fd66dd8af5..527076df025f931f937f9fdd7a64293905b4748a 100644 (file)
 #include <memory>
 #include <sstream>
 #include <algorithm>
-
-#include "auth/AuthMethodList.h"
-#include "auth/Crypto.h"
 #include "auth/KeyRing.h"
-#include "common/ConfUtils.h"
 #include "common/config.h"
 #include "common/debug.h"
 #include "common/errno.h"
-#include "include/str_list.h"
 #include "common/Formatter.h"
 
 #define dout_subsys ceph_subsys_auth
index b69921c6500203947d1d697d2833ecfe265925f9..f876a6a14c480cf865c5a4c78c6edcaeae710cf1 100644 (file)
 #ifndef CEPH_KEYRING_H
 #define CEPH_KEYRING_H
 
-#include "common/config.h"
-
-#include "auth/Crypto.h"
 #include "auth/Auth.h"
 
+class CephContext;
 
 class KeyRing : public KeyStore {
   map<EntityName, EntityAuth> keys;
index 9470801ff7d66a7281eb13d26b19292ba08518de..ad0c0918de2b4bbc3cdd90eba9fb82fc02e5ecc0 100644 (file)
@@ -1,11 +1,6 @@
-#include <errno.h>
 #include <map>
 
-#include "common/config.h"
 #include "common/debug.h"
-#include "include/str_list.h"
-
-#include "Crypto.h"
 #include "auth/RotatingKeyRing.h"
 #include "auth/KeyRing.h"
 
index efcb6382c7fbcd55ccb6805a664e6f699f657d35..762b55623c2e105e34be6b9092c6e15b57d61993 100644 (file)
 #ifndef CEPH_ROTATINGKEYRING_H
 #define CEPH_ROTATINGKEYRING_H
 
-#include "common/config.h"
 #include "common/Mutex.h"
-
-#include "auth/Crypto.h"
 #include "auth/Auth.h"
 
 /*
@@ -26,6 +23,7 @@
  */
 
 class KeyRing;
+class CephContext;
 
 class RotatingKeyRing : public KeyStore {
   CephContext *cct;
index 5b28b9e5ade1d5282e2384d40cf829e8f4e91705..d455b190a997eb291f99205983d10718381f81cb 100644 (file)
@@ -1,8 +1,6 @@
-
-#include "../KeyRing.h"
-
 #include "CephxProtocol.h"
 #include "CephxAuthorizeHandler.h"
+#include "common/dout.h"
 
 #define dout_subsys ceph_subsys_auth
 
index d17a692f71c3f4f38a28ea8896d9fb02774e4c4d..bf40d66e868c0650813260b9f5c417306de2a9de 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_CEPHXAUTHORIZEHANDLER_H
 #define CEPH_CEPHXAUTHORIZEHANDLER_H
 
-#include "../AuthAuthorizeHandler.h"
+#include "auth/AuthAuthorizeHandler.h"
 
 class CephContext;
 
index ff32a425757b6526e7fb46385fc5cf9fb62f1d14..a314608cc2336233b2fdb4a3a488b622a33b0b6c 100644 (file)
@@ -18,9 +18,9 @@
 #include "CephxClientHandler.h"
 #include "CephxProtocol.h"
 
-#include "../KeyRing.h"
-
+#include "auth/KeyRing.h"
 #include "common/config.h"
+#include "common/dout.h"
 
 #define dout_subsys ceph_subsys_auth
 #undef dout_prefix
index d200ac990dcf120c7a9891b6a063438077336000..d2f4506c947894989eff6490981cb0f41c9fd4be 100644 (file)
 #ifndef CEPH_CEPHXCLIENTHANDLER_H
 #define CEPH_CEPHXCLIENTHANDLER_H
 
-#include "../AuthClientHandler.h"
+#include "auth/AuthClientHandler.h"
 #include "CephxProtocol.h"
+#include "auth/RotatingKeyRing.h"
 
 class CephContext;
+class KeyRing;
 
 class CephxClientHandler : public AuthClientHandler {
   bool starting;
index 81c0a66b679cc58b6ab4ca8d609054ccd8eb8043..28b143753958648406c6815aa0516a080360563e 100644 (file)
  */
 
 #include "common/config.h"
-
 #include "CephxKeyServer.h"
-#include "common/Timer.h"
-
+#include "common/dout.h"
 #include <sstream>
 
 #define dout_subsys ceph_subsys_auth
index 7d95fadc882167bdb27a7f78029d2122c6965b00..76b1c1363057891deda42453c9f061a42d7f0c66 100644 (file)
 #ifndef CEPH_KEYSSERVER_H
 #define CEPH_KEYSSERVER_H
 
-#include "common/config.h"
-
 #include "auth/KeyRing.h"
 #include "CephxProtocol.h"
-
-#include "common/Timer.h"
+#include "CephxKeyServer.h"
+#include "common/Mutex.h"
 
 class CephContext;
 
index 4a5fb5d3dcbeefd3df8269c0e0c17067c59c188b..997ddeb77b4d7692e12952eb271d3b34d6c59c53 100644 (file)
 #define CEPHX_REQUEST_TYPE_MASK            0x0F00
 #define CEPHX_CRYPT_ERR                        1
 
-#include "../Auth.h"
-#include "../RotatingKeyRing.h"
-#include "common/debug.h"
-
+#include "auth/Auth.h"
 #include <errno.h>
 #include <sstream>
 
index 7b6212ab5b40d31408fb9dd3af679b8757fac9d9..914fea712760ec327387f90991eab852ec6d9119 100644 (file)
 
 #include "CephxServiceHandler.h"
 #include "CephxProtocol.h"
-
-#include "../Auth.h"
-
-#include "mon/Monitor.h"
-
+#include "CephxKeyServer.h"
 #include <errno.h>
 #include <sstream>
 
 #include "common/config.h"
-#include "include/assert.h"
+#include "common/debug.h"
 
 #define dout_subsys ceph_subsys_auth
 #undef dout_prefix
index 3649d3b5d57bd03425045479836802764c010336..968d6e16f29437a1a8f3c84c150eaed7447beaf3 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef CEPH_CEPHXSERVICEHANDLER_H
 #define CEPH_CEPHXSERVICEHANDLER_H
 
-#include "../AuthServiceHandler.h"
-#include "../Auth.h"
+#include "auth/AuthServiceHandler.h"
+#include "auth/Auth.h"
 
 class KeyServer;
 
index 30ed852ba6fc3880c983ee9354ca8e645f620f00..943b80afbd3ca6120d5f131c760183821fad2f0c 100644 (file)
@@ -19,9 +19,9 @@
 #include <sstream>
 
 #include "common/config.h"
-#include "include/assert.h"
 #include "include/ceph_features.h"
-
+#include "msg/Message.h"
 #define dout_subsys ceph_subsys_auth
 
 int CephxSessionHandler::_calc_signature(Message *m, uint64_t *psig)
index 7b46e076b8a2080ae870eb50a794f4ec9cd30177..04184da45ba01f907df853b44068c25d0c2800b3 100644 (file)
  */
 
 
-#include "../AuthSessionHandler.h"
-#include "../Auth.h"
+#include "auth/AuthSessionHandler.h"
+#include "auth/Auth.h"
 
 class CephContext;
+class Message;
 
 class CephxSessionHandler  : public AuthSessionHandler {
   uint64_t features;
index cc00d3d6cdb2d592f0e7752106bc008c7160bcef..256ad751e6b2c8ea90547d85157def05cb5f9c3b 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_AUTHNONEAUTHORIZEHANDLER_H
 #define CEPH_AUTHNONEAUTHORIZEHANDLER_H
 
-#include "../AuthAuthorizeHandler.h"
+#include "auth/AuthAuthorizeHandler.h"
 
 class CephContext;
 
index 203687e4012fb2a046639216bbed528c35f55b81..d78cfbc22abee84f147c79155bad7d2c8a1a0594 100644 (file)
 #ifndef CEPH_AUTHNONECLIENTHANDLER_H
 #define CEPH_AUTHNONECLIENTHANDLER_H
 
-#include "../AuthClientHandler.h"
+#include "auth/AuthClientHandler.h"
 #include "AuthNoneProtocol.h"
-
-class CephContext;
-
+#include "common/ceph_context.h"
+#include "common/config.h"
 class AuthNoneClientHandler : public AuthClientHandler {
 public:
   AuthNoneClientHandler(CephContext *cct_, RotatingKeyRing *rkeys) 
index a3c989128f65ec0e254559b42642be2aaebbbb8c..3e84e5388ecc67bc6d140d5c428158e277d480c7 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_AUTHNONEPROTOCOL_H
 #define CEPH_AUTHNONEPROTOCOL_H
 
-#include "../Auth.h"
+#include "auth/Auth.h"
 
 struct AuthNoneAuthorizer : public AuthAuthorizer {
   AuthNoneAuthorizer() : AuthAuthorizer(CEPH_AUTH_NONE) { }
index a45dbbfce4b3ba04d9c547987a116a670c51c666..9fefd34dc219faf62b2823e7aa53d7f09642c30b 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef CEPH_AUTHNONESERVICEHANDLER_H
 #define CEPH_AUTHNONESERVICEHANDLER_H
 
-#include "../AuthServiceHandler.h"
-#include "../Auth.h"
+#include "auth/AuthServiceHandler.h"
+#include "auth/Auth.h"
 
 class CephContext;
 
index 85261bf0fc1937d656bebe9da1ce4638d7941543..36b7c744c31268d1e7b03339dde3db2751de8438 100644 (file)
  * 
  */
 
-#include "../AuthSessionHandler.h"
-#include "../Auth.h"
-
-#define dout_subsys ceph_subsys_auth
+#include "auth/AuthSessionHandler.h"
+#include "msg/Message.h"
 
 class CephContext;
 
index de66058c4896ac97a3f5697e13b090ef11c1510c..62cb638874e2bc9c1c2f2e9f96dbae599034bb82 100644 (file)
@@ -13,9 +13,6 @@
  */
 
 #include "AuthUnknownAuthorizeHandler.h"
-#include "common/debug.h"
-
-#define dout_subsys ceph_subsys_auth
 
 bool AuthUnknownAuthorizeHandler::verify_authorizer(CephContext *cct, KeyStore *keys,
                                                 bufferlist& authorizer_data, bufferlist& authorizer_reply,
index 0156fbd85d97bec28b56e1a1647efa11c9feec2c..a9003e12753d9a7fab02eadd77cdd603d16825f3 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_AUTHUNKNOWNAUTHORIZEHANDLER_H
 #define CEPH_AUTHUNKNOWNAUTHORIZEHANDLER_H
 
-#include "../AuthAuthorizeHandler.h"
+#include "auth/AuthAuthorizeHandler.h"
 
 class CephContext;
 
index 088b816cb5b9ca6f2a4c37ceb16f1ca2ab50ed24..b8158f326e282176d212963c03f92db44e066854 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_AUTHUNKNOWNCLIENTHANDLER_H
 #define CEPH_AUTHUNKNOWNCLIENTHANDLER_H
 
-#include "../AuthClientHandler.h"
+#include "auth/AuthClientHandler.h"
 #include "AuthUnknownProtocol.h"
 
 class CephContext;
index 94504fb9fc34f637e82b6424a23edee66d2668bf..6781ef62f95e68eca77bab66fb261ce5b8f45ba4 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_AUTHUNKNOWNPROTOCOL_H
 #define CEPH_AUTHUNKNOWNPROTOCOL_H
 
-#include "../Auth.h"
+#include "auth/Auth.h"
 
 struct AuthUnknownAuthorizer : public AuthAuthorizer {
   AuthUnknownAuthorizer() : AuthAuthorizer(CEPH_AUTH_UNKNOWN) { }
index db039b6969f7c8040c41d23b40c4c8694ed1f7ed..573d01d21ec42675e1615e7972ce200948d81eb7 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef CEPH_AUTHUNKNOWNSERVICEHANDLER_H
 #define CEPH_AUTHUNKNOWNSERVICEHANDLER_H
 
-#include "../AuthServiceHandler.h"
-#include "../Auth.h"
+#include "auth/AuthServiceHandler.h"
+#include "auth/Auth.h"
 
 class CephContext;
 
index 4f811ab52f1603ed6ab7f90f6c72611c97a3e50d..80f27d362bd9528cfb592466878c731a37ddb151 100644 (file)
@@ -12,8 +12,8 @@
  * 
  */
 
-#include "../AuthSessionHandler.h"
-#include "../Auth.h"
+#include "auth/AuthSessionHandler.h"
+#include "msg/Message.h"
 
 #define dout_subsys ceph_subsys_auth
 
index a213391ff49596df378557a4c7738497469ce502..55692e5bae9282d53bd897a1c9e494e3c6287710 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "common/ConfUtils.h"
 #include "common/ceph_argparse.h"
-
+#include "common/config.h"
 #include "global/global_context.h"
 #include "global/global_init.h"