Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
6c83bea6
Commit
6c83bea6
authored
Jul 30, 2020
by
Cedric Caffy
Browse files
[cta-admin dr ls] added xrdsecprotocol and xrdsecssskt values in the output of dr ls
parent
f56f6895
Changes
7
Hide whitespace changes
Inline
Side-by-side
common/utils/utils.cpp
View file @
6c83bea6
...
...
@@ -984,5 +984,13 @@ std::string removePrefix(const std::string& input, char prefixChar){
}
}
std
::
string
getEnv
(
const
std
::
string
&
variableName
){
const
char
*
envVarC
=
std
::
getenv
(
variableName
.
c_str
());
if
(
envVarC
==
NULL
){
return
""
;
}
return
std
::
string
(
envVarC
);
}
}
// namespace utils
}
// namespace cta
common/utils/utils.hpp
View file @
6c83bea6
...
...
@@ -471,6 +471,14 @@ namespace utils {
*/
std
::
string
removePrefix
(
const
std
::
string
&
input
,
char
prefixChar
);
/**
* Returns the value of the environment variable passed in parameter
* @param variableName the name of the environment variable to be passed
* @return the value of the environment variable passed in parameter
* If the environment variable is not set, it will return an empty string
*/
std
::
string
getEnv
(
const
std
::
string
&
variableName
);
}
// namespace utils
}
// namespace cta
objectstore/DriveState.cpp
View file @
6c83bea6
...
...
@@ -287,6 +287,8 @@ void DriveState::setConfig(const cta::tape::daemon::TapedConfiguration& tapedCon
fillConfig
(
config
->
wdIdleSessionTimer
);
fillConfig
(
config
->
backendPath
);
fillConfig
(
config
->
fileCatalogConfigFile
);
fillConfig
(
config
->
authenticationProtocol
);
fillConfig
(
config
->
authenticationSSSKeytab
);
}
//------------------------------------------------------------------------------
...
...
scheduler/Scheduler.cpp
View file @
6c83bea6
...
...
@@ -1157,8 +1157,8 @@ uint64_t Scheduler::getNbFilesAlreadyArchived(const common::dataStructures::Arch
void
Scheduler
::
checkNeededEnvironmentVariables
(){
std
::
set
<
std
::
string
>
environmentVariablesNotSet
;
for
(
auto
&
environmentVariable
:
c_mandatoryEnvironmentVariables
){
const
char
*
envVar
C
=
std
::
get
e
nv
(
environmentVariable
.
c_str
()
);
if
(
envVar
C
==
NULL
){
std
::
string
envVar
=
cta
::
utils
::
get
E
nv
(
environmentVariable
);
if
(
envVar
.
empty
()
){
environmentVariablesNotSet
.
insert
(
environmentVariable
);
}
}
...
...
tapeserver/cta-taped.cpp
View file @
6c83bea6
...
...
@@ -118,7 +118,7 @@ static int exceptionThrowingMain(
std
::
list
<
cta
::
log
::
Param
>
params
=
{
cta
::
log
::
Param
(
"logMask"
,
globalConfig
.
logMask
.
value
())};
log
(
log
::
INFO
,
"Set log mask"
,
params
);
}
// Create the object providing utilities for working with UNIX capabilities
cta
::
server
::
ProcessCap
capUtils
;
...
...
tapeserver/daemon/TapedConfiguration.cpp
View file @
6c83bea6
...
...
@@ -119,6 +119,9 @@ TapedConfiguration TapedConfiguration::createFromCtaConf(
// Extract drive list from tpconfig + parsed config file
ret
.
driveConfigs
=
Tpconfig
::
parseFile
(
ret
.
tpConfigPath
.
value
());
ret
.
authenticationProtocol
.
set
(
cta
::
utils
::
getEnv
(
"XrdSecPROTOCOL"
),
"Environment variable"
);
ret
.
authenticationSSSKeytab
.
set
(
cta
::
utils
::
getEnv
(
"XrdSecSSSKT"
),
"Environment variable"
);
// If we get here, the configuration file is good enough to be logged.
ret
.
daemonUserName
.
log
(
log
);
ret
.
daemonGroupName
.
log
(
log
);
...
...
tapeserver/daemon/TapedConfiguration.hpp
View file @
6c83bea6
...
...
@@ -120,6 +120,16 @@ struct TapedConfiguration {
/// Path to the file catalog config file
cta
::
SourcedParameter
<
std
::
string
>
fileCatalogConfigFile
{
"general"
,
"FileCatalogConfigFile"
,
"/etc/cta/cta-catalogue.conf"
,
"Compile time default"
};
//----------------------------------------------------------------------------
// The authentication configuration
//----------------------------------------------------------------------------
/// The authentication protocol
cta
::
SourcedParameter
<
std
::
string
>
authenticationProtocol
{
"environment"
,
"XrdSecPROTOCOL"
};
/// The authentication protocol
cta
::
SourcedParameter
<
std
::
string
>
authenticationSSSKeytab
{
"environment"
,
"XrdSecSSSKT"
};
private:
/** A private dummy logger which will simplify the implementation of the
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment