|
ATLAS Offline Software
|
Go to the documentation of this file.
26 #include <sys/types.h>
30 #include <sys/types.h>
45 static std::string
result =
"VomsProxySvc";
65 const char *X509_USER_PROXY =
getenv (
"X509_USER_PROXY");
69 file = X509_USER_PROXY;
72 std::ostringstream
str;
73 str <<
"/tmp/x509up_u" << getuid();
76 if (
file.empty() || gSystem->AccessPathName (
file.c_str()) !=
false)
88 return StatusCode::FAILURE;
97 return name().c_str();
111 auto myerrno = errno;
113 return EL::StatusCode::FAILURE;
118 auto myerrno = errno;
121 return EL::StatusCode::FAILURE;
127 return EL::StatusCode::FAILURE;
129 if (close (
fd) == -1)
131 auto myerrno = errno;
133 return EL::StatusCode::FAILURE;
135 if (setenv (
"X509_USER_PROXY",
m_fileName.c_str(),
true) == -1)
137 auto myerrno = errno;
138 ANA_MSG_ERROR (
"failed to set X509_USER_PROXY: " << strerror (myerrno));
139 return EL::StatusCode::FAILURE;
142 return EL::StatusCode::SUCCESS;
bool checkVomsProxy()
return whether we have a valid VOMS proxy available
ClassImp(EL::VomsProxySvc) namespace EL
virtual StatusCode histInitialize() override
effects: this is a pre-initialization routine that is called before changeInput is called.
virtual const char * GetName() const override
::StatusCode StatusCode
StatusCode definition for legacy code.
static const std::string & algServiceName()
description: the name of the service
This module defines the arguments passed from the BATCH driver to the BATCH worker.
std::string m_fileName
the name of the file to be created
virtual const std::string & name() const
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
void ensureVomsProxy()
ensure that we have a valid VOMS proxy available
virtual StatusCode setupJob(Job &job) override
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
std::string getenv(const std::string &variableName)
get an environment variable
std::string m_proxyData
the data to place inside the proxy file
#define RCU_CHANGE_INVARIANT(x)
#define RCU_THROW_MSG(message)
#define RCU_READ_INVARIANT(x)