From ebfedc576e61596c33efb24b2f4f103120e66bde Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Wed, 6 Nov 2019 12:44:52 +0100 Subject: [PATCH] jcr: separate file for AuthenticationTypes --- core/src/dird/dird_conf.cc | 1 + core/src/dird/ndmp_dma_generic.cc | 1 + core/src/include/auth_types.h | 35 +++++++++++++++++++++++++++++++ core/src/include/jcr.h | 11 ---------- core/src/stored/ndmp_tape.cc | 1 + core/src/stored/stored_conf.cc | 1 + 6 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 core/src/include/auth_types.h diff --git a/core/src/dird/dird_conf.cc b/core/src/dird/dird_conf.cc index c5c61ce6afa..b86cefcc4f5 100644 --- a/core/src/dird/dird_conf.cc +++ b/core/src/dird/dird_conf.cc @@ -53,6 +53,7 @@ #include "dird/dird_globals.h" #include "dird/jcr_private.h" #include "include/auth_protocol_types.h" +#include "include/auth_types.h" #include "include/protocol_types.h" #include "lib/berrno.h" #include "lib/breg.h" diff --git a/core/src/dird/ndmp_dma_generic.cc b/core/src/dird/ndmp_dma_generic.cc index 6a4d22db69c..39f5db26d58 100644 --- a/core/src/dird/ndmp_dma_generic.cc +++ b/core/src/dird/ndmp_dma_generic.cc @@ -32,6 +32,7 @@ #include "dird/jcr_private.h" #include "dird/dird_globals.h" #include "include/auth_protocol_types.h" +#include "include/auth_types.h" #if HAVE_NDMP #define SMTAPE_MIN_BLOCKSIZE 4096 /**< 4 Kb */ diff --git a/core/src/include/auth_types.h b/core/src/include/auth_types.h new file mode 100644 index 00000000000..6ab25cbccdd --- /dev/null +++ b/core/src/include/auth_types.h @@ -0,0 +1,35 @@ +/* + BAREOSĀ® - Backup Archiving REcovery Open Sourced + + Copyright (C) 2000-2012 Free Software Foundation Europe e.V. + Copyright (C) 2011-2012 Planets Communications B.V. + Copyright (C) 2013-2019 Bareos GmbH & Co. KG + + This program is Free Software; you can redistribute it and/or + modify it under the terms of version three of the GNU Affero General Public + License as published by the Free Software Foundation and included + in the file LICENSE. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#ifndef BAREOS_SRC_INCLUDE_AUTH_TYPES_H_ +#define BAREOS_SRC_INCLUDE_AUTH_TYPES_H_ + +enum AuthenticationTypes +{ + AT_NONE = 0, + AT_CLEAR, + AT_MD5, + AT_VOID +}; + +#endif // BAREOS_SRC_INCLUDE_AUTH_TYPES_H_ diff --git a/core/src/include/jcr.h b/core/src/include/jcr.h index f828b4edc3c..3be99c56ff8 100644 --- a/core/src/include/jcr.h +++ b/core/src/include/jcr.h @@ -51,17 +51,6 @@ typedef struct s_tree_root TREE_ROOT; class dlist; -/** - * Authentication types - */ -enum -{ - AT_NONE = 0, - AT_CLEAR, - AT_MD5, - AT_VOID -}; - /** * Migration selection types */ diff --git a/core/src/stored/ndmp_tape.cc b/core/src/stored/ndmp_tape.cc index 10555cf9614..0277459b0b0 100644 --- a/core/src/stored/ndmp_tape.cc +++ b/core/src/stored/ndmp_tape.cc @@ -58,6 +58,7 @@ #include "lib/bpoll.h" #include "lib/parse_conf.h" #include "lib/thread_list.h" +#include "include/auth_types.h" #include "include/jcr.h" #include diff --git a/core/src/stored/stored_conf.cc b/core/src/stored/stored_conf.cc index bd853a42370..5962fbbaed0 100644 --- a/core/src/stored/stored_conf.cc +++ b/core/src/stored/stored_conf.cc @@ -45,6 +45,7 @@ #define NEED_JANSSON_NAMESPACE 1 #include "lib/output_formatter.h" #include "lib/json.h" +#include "include/auth_types.h" #include "include/jcr.h" namespace storagedaemon {