irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

getRodsEnv.cpp File Reference
#include "rods.h"
#include "rodsErrorTable.h"
#include "getRodsEnv.h"
#include "rodsLog.h"
#include "irods_log.hpp"
#include "irods_version.h"
#include "irods_environment_properties.hpp"
#include "irods_configuration_keywords.hpp"
Include dependency graph for getRodsEnv.cpp:

Go to the source code of this file.

Macros

#define BUF_LEN   100
 
#define LARGE_BUF_LEN   MAX_NAME_LEN+20
 
#define RODS_ENV_FILE   "/.irods/irods_environment.json" /* under the HOME directory */
 

Functions

char * rstrcpy (char *dst, const char *src, int len)
 
char * findNextTokenAndTerm (char *inPtr)
 
int getRodsEnvFromFile (rodsEnv *rodsEnvArg)
 
int getRodsEnvFromEnv (rodsEnv *rodsEnvArg)
 
int createRodsEnvDefaults (rodsEnv *rodsEnvArg)
 
char * getRodsEnvFileName ()
 
char * getRodsEnvAuthFileName ()
 
int convertLogLevel (char *inputStr)
 
int getRodsEnv (rodsEnv *rodsEnvArg)
 
void _getRodsEnv (rodsEnv &rodsEnvArg)
 
void _reloadRodsEnv (rodsEnv &rodsEnvArg)
 
static int capture_string_property (const std::string &_key, char *_val)
 
static int capture_integer_property (const std::string &_key, int &_val)
 
static void capture_string_env_var (const std::string &_key, char *_val)
 
static void capture_integer_env_var (const std::string &_key, int &_val)
 
int get_legacy_ssl_variables (rodsEnv *_env)
 
int printRodsEnv (FILE *_fout)
 

Variables

int ProcessType
 
static char authFileName [256] = ""
 
static char configFileName [256] = ""
 

Macro Definition Documentation

◆ BUF_LEN

#define BUF_LEN   100

Definition at line 37 of file getRodsEnv.cpp.

◆ LARGE_BUF_LEN

#define LARGE_BUF_LEN   MAX_NAME_LEN+20

Definition at line 38 of file getRodsEnv.cpp.

◆ RODS_ENV_FILE

#define RODS_ENV_FILE   "/.irods/irods_environment.json" /* under the HOME directory */

Definition at line 40 of file getRodsEnv.cpp.

Function Documentation

◆ _getRodsEnv()

void _getRodsEnv ( rodsEnv rodsEnvArg)

Definition at line 121 of file getRodsEnv.cpp.

References createRodsEnvDefaults(), getRodsEnvFromEnv(), and getRodsEnvFromFile().

Referenced by getRodsEnv(), and irods::make_connection_pool().

Here is the call graph for this function:

◆ _reloadRodsEnv()

◆ capture_integer_env_var()

static void capture_integer_env_var ( const std::string &  _key,
int _val 
)
static

Definition at line 385 of file getRodsEnv.cpp.

References LOG_DEBUG, rodsLog(), and irods::to_env().

Referenced by getRodsEnvFromEnv().

Here is the call graph for this function:

◆ capture_integer_property()

static int capture_integer_property ( const std::string &  _key,
int _val 
)
static

Definition at line 161 of file getRodsEnv.cpp.

References terminate_irods_processes::e, KEY_NOT_FOUND, irods::log(), LOG_DEBUG, and rodsLog().

Referenced by getRodsEnvFromFile().

Here is the call graph for this function:

◆ capture_string_env_var()

static void capture_string_env_var ( const std::string &  _key,
char *  _val 
)
static

Definition at line 365 of file getRodsEnv.cpp.

References LOG_DEBUG, rodsLog(), and irods::to_env().

Referenced by getRodsEnvFromEnv().

Here is the call graph for this function:

◆ capture_string_property()

static int capture_string_property ( const std::string &  _key,
char *  _val 
)
static

Definition at line 143 of file getRodsEnv.cpp.

References terminate_irods_processes::e, KEY_NOT_FOUND, irods::log(), LOG_DEBUG, and rodsLog().

Referenced by getRodsEnvFromFile().

Here is the call graph for this function:

◆ convertLogLevel()

int convertLogLevel ( char *  inputStr)

◆ createRodsEnvDefaults()

int createRodsEnvDefaults ( rodsEnv rodsEnvArg)

Definition at line 714 of file getRodsEnv.cpp.

References LOG_NOTICE, MAX_NAME_LEN, rodsEnv::rodsCwd, rodsEnv::rodsHome, rodsLog(), rodsEnv::rodsUserName, rodsEnv::rodsZone, and rstrcpy().

Referenced by _getRodsEnv(), and _reloadRodsEnv().

Here is the call graph for this function:

◆ findNextTokenAndTerm()

char * findNextTokenAndTerm ( char *  inPtr)

Definition at line 735 of file getRodsEnv.cpp.

◆ get_legacy_ssl_variables()

int get_legacy_ssl_variables ( rodsEnv _env)

Definition at line 402 of file getRodsEnv.cpp.

References rodsEnv::irodsSSLCACertificateFile, rodsEnv::irodsSSLCACertificatePath, rodsEnv::irodsSSLCertificateChainFile, rodsEnv::irodsSSLCertificateKeyFile, rodsEnv::irodsSSLDHParamsFile, rodsEnv::irodsSSLVerifyServer, LOG_ERROR, rodsLog(), and SYS_INVALID_INPUT_PARAM.

Referenced by getRodsEnvFromEnv().

Here is the call graph for this function:

◆ getRodsEnv()

◆ getRodsEnvAuthFileName()

char* getRodsEnvAuthFileName ( )

Definition at line 63 of file getRodsEnv.cpp.

References authFileName.

Referenced by obfiGetFilename().

◆ getRodsEnvFileName()

char* getRodsEnvFileName ( )

Definition at line 55 of file getRodsEnv.cpp.

References configFileName.

◆ getRodsEnvFromEnv()

int getRodsEnvFromEnv ( rodsEnv _env)

Definition at line 467 of file getRodsEnv.cpp.

References authFileName, capture_integer_env_var(), capture_string_env_var(), irods::CFG_IRODS_AUTHENTICATION_FILE_KW(), irods::CFG_IRODS_AUTHENTICATION_SCHEME_KW(), irods::CFG_IRODS_CLIENT_SERVER_NEGOTIATION_KW(), irods::CFG_IRODS_CLIENT_SERVER_POLICY_KW(), irods::CFG_IRODS_CWD_KW(), irods::CFG_IRODS_DEBUG_KW(), irods::CFG_IRODS_DEF_NUMBER_TRANSFER_THREADS(), irods::CFG_IRODS_DEFAULT_HASH_SCHEME_KW(), irods::CFG_IRODS_DEFAULT_RESOURCE_KW(), irods::CFG_IRODS_ENCRYPTION_ALGORITHM_KW(), irods::CFG_IRODS_ENCRYPTION_KEY_SIZE_KW(), irods::CFG_IRODS_ENCRYPTION_NUM_HASH_ROUNDS_KW(), irods::CFG_IRODS_ENCRYPTION_SALT_SIZE_KW(), irods::CFG_IRODS_HOME_KW(), irods::CFG_IRODS_HOST_KW(), irods::CFG_IRODS_LOG_LEVEL_KW(), irods::CFG_IRODS_MATCH_HASH_POLICY_KW(), irods::CFG_IRODS_MAX_SIZE_FOR_SINGLE_BUFFER(), irods::CFG_IRODS_PLUGINS_HOME_KW(), irods::CFG_IRODS_PORT_KW(), irods::CFG_IRODS_SSL_CA_CERTIFICATE_FILE(), irods::CFG_IRODS_SSL_CA_CERTIFICATE_PATH(), irods::CFG_IRODS_SSL_CERTIFICATE_CHAIN_FILE(), irods::CFG_IRODS_SSL_CERTIFICATE_KEY_FILE(), irods::CFG_IRODS_SSL_DH_PARAMS_FILE(), irods::CFG_IRODS_SSL_VERIFY_SERVER(), irods::CFG_IRODS_TRANS_BUFFER_SIZE_FOR_PARA_TRANS(), irods::CFG_IRODS_USER_NAME_KW(), irods::CFG_IRODS_XMSG_HOST_KW(), irods::CFG_IRODS_XMSG_PORT_KW(), irods::CFG_IRODS_ZONE_KW(), get_legacy_ssl_variables(), rodsEnv::irodsDefaultNumberTransferThreads, rodsEnv::irodsMaxSizeForSingleBuffer, rodsEnv::irodsPluginHome, rodsEnv::irodsSSLCACertificateFile, rodsEnv::irodsSSLCACertificatePath, rodsEnv::irodsSSLCertificateChainFile, rodsEnv::irodsSSLCertificateKeyFile, rodsEnv::irodsSSLDHParamsFile, rodsEnv::irodsSSLVerifyServer, rodsEnv::irodsTransBufferSizeForParaTrans, LOG_SYS_FATAL, LONG_NAME_LEN, rodsEnv::rodsAuthFile, rodsEnv::rodsAuthScheme, rodsEnv::rodsClientServerNegotiation, rodsEnv::rodsClientServerPolicy, rodsEnv::rodsCwd, rodsEnv::rodsDebug, rodsEnv::rodsDefaultHashScheme, rodsEnv::rodsDefResource, rodsEnv::rodsEncryptionAlgorithm, rodsEnv::rodsEncryptionKeySize, rodsEnv::rodsEncryptionNumHashRounds, rodsEnv::rodsEncryptionSaltSize, rodsEnv::rodsHome, rodsEnv::rodsHost, rodsEnv::rodsLogLevel, rodsLogLevel(), rodsEnv::rodsMatchHashPolicy, rodsEnv::rodsPort, rodsEnv::rodsUserName, rodsEnv::rodsZone, rstrcpy(), irods.pypyodbc::status, SYS_INVALID_INPUT_PARAM, rodsEnv::xmsgHost, and rodsEnv::xmsgPort.

Referenced by _getRodsEnv(), and _reloadRodsEnv().

Here is the call graph for this function:

◆ getRodsEnvFromFile()

int getRodsEnvFromFile ( rodsEnv _env)

Definition at line 178 of file getRodsEnv.cpp.

References authFileName, capture_integer_property(), capture_string_property(), irods::CFG_IRODS_AUTHENTICATION_FILE_KW(), irods::CFG_IRODS_AUTHENTICATION_SCHEME_KW(), irods::CFG_IRODS_CLIENT_SERVER_NEGOTIATION_KW(), irods::CFG_IRODS_CLIENT_SERVER_POLICY_KW(), irods::CFG_IRODS_CONNECTION_POOL_REFRESH_TIME(), irods::CFG_IRODS_CWD_KW(), irods::CFG_IRODS_DEBUG_KW(), irods::CFG_IRODS_DEF_NUMBER_TRANSFER_THREADS(), irods::CFG_IRODS_DEFAULT_HASH_SCHEME_KW(), irods::CFG_IRODS_DEFAULT_RESOURCE_KW(), irods::CFG_IRODS_ENCRYPTION_ALGORITHM_KW(), irods::CFG_IRODS_ENCRYPTION_KEY_SIZE_KW(), irods::CFG_IRODS_ENCRYPTION_NUM_HASH_ROUNDS_KW(), irods::CFG_IRODS_ENCRYPTION_SALT_SIZE_KW(), irods::CFG_IRODS_HOME_KW(), irods::CFG_IRODS_HOST_KW(), irods::CFG_IRODS_LOG_LEVEL_KW(), irods::CFG_IRODS_MATCH_HASH_POLICY_KW(), irods::CFG_IRODS_MAX_SIZE_FOR_SINGLE_BUFFER(), irods::CFG_IRODS_PLUGINS_HOME_KW(), irods::CFG_IRODS_PORT_KW(), irods::CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_ALGORITHM_KW(), irods::CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_NUM_HASH_ROUNDS_KW(), irods::CFG_IRODS_SERVER_CONTROL_PLANE_KEY(), irods::CFG_IRODS_SERVER_CONTROL_PLANE_PORT(), irods::CFG_IRODS_SESSION_ENVIRONMENT_FILE_KW(), irods::CFG_IRODS_SSL_CA_CERTIFICATE_FILE(), irods::CFG_IRODS_SSL_CA_CERTIFICATE_PATH(), irods::CFG_IRODS_SSL_CERTIFICATE_CHAIN_FILE(), irods::CFG_IRODS_SSL_CERTIFICATE_KEY_FILE(), irods::CFG_IRODS_SSL_DH_PARAMS_FILE(), irods::CFG_IRODS_SSL_VERIFY_SERVER(), irods::CFG_IRODS_TRANS_BUFFER_SIZE_FOR_PARA_TRANS(), irods::CFG_IRODS_USER_NAME_KW(), irods::CFG_IRODS_XMSG_HOST_KW(), irods::CFG_IRODS_XMSG_PORT_KW(), irods::CFG_IRODS_ZONE_KW(), configFileName, rodsEnv::irodsConnectionPoolRefreshTime, rodsEnv::irodsCtrlPlaneEncryptionAlgorithm, rodsEnv::irodsCtrlPlaneEncryptionNumHashRounds, rodsEnv::irodsCtrlPlaneKey, rodsEnv::irodsCtrlPlanePort, rodsEnv::irodsDefaultNumberTransferThreads, rodsEnv::irodsMaxSizeForSingleBuffer, rodsEnv::irodsPluginHome, rodsEnv::irodsSSLCACertificateFile, rodsEnv::irodsSSLCACertificatePath, rodsEnv::irodsSSLCertificateChainFile, rodsEnv::irodsSSLCertificateKeyFile, rodsEnv::irodsSSLDHParamsFile, rodsEnv::irodsSSLVerifyServer, rodsEnv::irodsTransBufferSizeForParaTrans, LOG_SYS_FATAL, LONG_NAME_LEN, rodsEnv::rodsAuthFile, rodsEnv::rodsAuthScheme, rodsEnv::rodsClientServerNegotiation, rodsEnv::rodsClientServerPolicy, rodsEnv::rodsCwd, rodsEnv::rodsDebug, rodsEnv::rodsDefaultHashScheme, rodsEnv::rodsDefResource, rodsEnv::rodsEncryptionAlgorithm, rodsEnv::rodsEncryptionKeySize, rodsEnv::rodsEncryptionNumHashRounds, rodsEnv::rodsEncryptionSaltSize, rodsEnv::rodsHome, rodsEnv::rodsHost, rodsEnv::rodsLogLevel, rodsLogLevel(), rodsEnv::rodsMatchHashPolicy, rodsEnv::rodsPort, rodsEnv::rodsUserName, rodsEnv::rodsZone, rstrcpy(), irods.pypyodbc::status, SYS_INVALID_INPUT_PARAM, rodsEnv::xmsgHost, and rodsEnv::xmsgPort.

Referenced by _getRodsEnv(), and _reloadRodsEnv().

Here is the call graph for this function:

◆ printRodsEnv()

int printRodsEnv ( FILE *  _fout)

Definition at line 650 of file getRodsEnv.cpp.

References terminate_irods_processes::e, irods::environment_properties::instance(), irods::environment_properties::map(), and SYS_INTERNAL_NULL_INPUT_ERR.

Here is the call graph for this function:

◆ rstrcpy()

char* rstrcpy ( char *  dst,
const char *  src,
int  len 
)

Definition at line 51 of file stringOpr.cpp.

References run_tests::dest, LOG_DEBUG, LOG_ERROR, NULL, rodsLog(), and irods.pypyodbc::status.

Referenced by createRodsEnvDefaults(), getRodsEnvFromEnv(), getRodsEnvFromFile(), rSplitStr(), and splitPathByKey().

Here is the call graph for this function:

Variable Documentation

◆ authFileName

char authFileName[ 256] = ""
static

Definition at line 51 of file getRodsEnv.cpp.

Referenced by getRodsEnvAuthFileName(), getRodsEnvFromEnv(), and getRodsEnvFromFile().

◆ configFileName

char configFileName[ 256] = ""
static

Definition at line 52 of file getRodsEnv.cpp.

Referenced by getRodsEnvFileName(), and getRodsEnvFromFile().

◆ ProcessType

int ProcessType

Definition at line 16 of file rcGlobal.cpp.