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
Go to the documentation of this file.
1 
4 /*
5  This routine sets up the rodsEnv structure using the contents of the
6  irods_environment.json file and possibly some environment variables.
7  For each of the irods_environment.json items, if an environment variable
8  with the same name exists, it overrides the possible environment item.
9  This is called by the various Rods commands and the agent.
10 
11  This routine also fills in irodsHome and irodsCwd if they are not
12  otherwise defined, and if values needed to create them are available.
13 
14  The '#' character indicates a comment line. Items may be enclosed in
15  quotes, but do not need to be. One or more spaces, or a '=', will
16  preceed the item values.
17 
18  The items are defined in the rodsEnv struct.
19 
20  If an error occurs, a message may logged or displayed but the
21  structure is filled with whatever values are available.
22 
23  There is also an 'appendRodsEnv' function to add text to
24  the env file, either creating it or appending to it.
25 */
26 
27 #include "rods.h"
28 #include "rodsErrorTable.h"
29 #include "getRodsEnv.h"
30 #include "rodsLog.h"
31 #include "irods_log.hpp"
32 #include "irods_version.h"
35 
36 #define BUF_LEN 100
37 #define LARGE_BUF_LEN MAX_NAME_LEN+20
38 
39 #define RODS_ENV_FILE "/.irods/irods_environment.json" /* under the HOME directory */
40 extern "C" {
41 
42  extern int ProcessType;
43  extern char *rstrcpy( char *dst, const char *src, int len ); // why do they not just include the header? - harry
44 
45  char *findNextTokenAndTerm( char *inPtr );
46 
47  int getRodsEnvFromFile( rodsEnv *rodsEnvArg );
48  int getRodsEnvFromEnv( rodsEnv *rodsEnvArg );
49  int createRodsEnvDefaults( rodsEnv *rodsEnvArg );
50 
51  static char authFileName [ LONG_NAME_LEN ] = "";
52  static char configFileName[ LONG_NAME_LEN ] = "";
53 
54  char *
56  return configFileName;
57  }
58 
59  /* Return the auth filename, if any */
60  /* Used by obf routines so that the env struct doesn't have to be passed
61  up and down the calling chain */
62  char *
64  return authFileName;
65  }
66 
67  /* convert either an integer value or a name matching the defines, to
68  a value for the Logging Level */
69  int
70  convertLogLevel( char *inputStr ) {
71  int i;
72  i = atoi( inputStr );
73  if ( i > 0 && i <= LOG_SQL ) {
74  return i;
75  }
76  if ( strcmp( inputStr, "LOG_SQL" ) == 0 ) {
77  return LOG_SQL;
78  }
79  if ( strcmp( inputStr, "LOG_SYS_FATAL" ) == 0 ) {
80  return LOG_SYS_FATAL;
81  }
82  if ( strcmp( inputStr, "LOG_SYS_WARNING" ) == 0 ) {
83  return LOG_SYS_WARNING;
84  }
85  if ( strcmp( inputStr, "LOG_ERROR" ) == 0 ) {
86  return LOG_ERROR;
87  }
88  if ( strcmp( inputStr, "LOG_NOTICE" ) == 0 ) {
89  return LOG_NOTICE;
90  }
91  if ( strcmp( inputStr, "LOG_DEBUG" ) == 0 ) {
92  return LOG_DEBUG;
93  }
94  if ( strcmp( inputStr, "LOG_DEBUG6" ) == 0 ) {
95  return LOG_DEBUG6;
96  }
97  if ( strcmp( inputStr, "LOG_DEBUG7" ) == 0 ) {
98  return LOG_DEBUG7;
99  }
100  if ( strcmp( inputStr, "LOG_DEBUG8" ) == 0 ) {
101  return LOG_DEBUG8;
102  }
103  if ( strcmp( inputStr, "LOG_DEBUG9" ) == 0 ) {
104  return LOG_DEBUG9;
105  }
106  if ( strcmp( inputStr, "LOG_DEBUG10" ) == 0 ) {
107  return LOG_DEBUG10;
108  }
109  return 0;
110  }
111 
112  int getRodsEnv( rodsEnv *rodsEnvArg ) {
113  if ( !rodsEnvArg ) {
115  }
116  _getRodsEnv( *rodsEnvArg );
117 
118  return 0;
119  }
120 
121  void _getRodsEnv( rodsEnv &rodsEnvArg ) {
122  memset( &rodsEnvArg, 0, sizeof( rodsEnv ) );
123  getRodsEnvFromFile( &rodsEnvArg );
124  getRodsEnvFromEnv( &rodsEnvArg );
125  createRodsEnvDefaults( &rodsEnvArg );
126  }
127 
128  void _reloadRodsEnv( rodsEnv &rodsEnvArg ) {
129  try {
131  } catch ( const irods::exception& e ) {
132  irods::log(e);
133  return;
134  }
135 
136  memset( &rodsEnvArg, 0, sizeof( rodsEnv ) );
137  getRodsEnvFromFile( &rodsEnvArg );
138  getRodsEnvFromEnv( &rodsEnvArg );
139  createRodsEnvDefaults( &rodsEnvArg );
140  }
141 
142  static
144  const std::string& _key,
145  char* _val ) {
146  try {
147  sprintf(_val, "%s", irods::get_environment_property<const std::string>(_key).c_str());
148  return 0;
149  } catch ( const irods::exception& e ) {
150  if ( e.code() == KEY_NOT_FOUND ) {
151  rodsLog( LOG_DEBUG, "%s is not defined", _key.c_str() );
152  } else {
153  irods::log(e);
154  }
155  return e.code();
156  }
157 
158  } // capture_string_property
159 
160  static
162  const std::string& _key,
163  int& _val ) {
164  try {
165  _val = irods::get_environment_property<const int>(_key);
166  return 0;
167  } catch ( const irods::exception& e ) {
168  if ( e.code() == KEY_NOT_FOUND ) {
169  rodsLog( LOG_DEBUG, "%s is not defined", _key.c_str() );
170  } else {
171  irods::log(e);
172  }
173  return e.code();
174  }
175 
176  } // capture_integer_property
177 
179  rodsEnv* _env ) {
180  if ( !_env ) {
182  }
183 
184  // defaults for advanced settings
185  _env->irodsMaxSizeForSingleBuffer = 32;
188  _env->irodsConnectionPoolRefreshTime = 300;
189 
190  // default auth scheme
191  snprintf(
192  _env->rodsAuthScheme,
193  sizeof( _env->rodsAuthScheme ),
194  "native" );
195 
198  configFileName );
199 
202  _env->rodsUserName );
203 
206  _env->rodsHost );
207 
210  _env->xmsgHost );
211 
214  _env->rodsHome );
215 
218  _env->rodsCwd );
219 
222  _env->rodsAuthScheme );
223 
226  _env->rodsPort );
227 
230  _env->xmsgPort );
231 
234  _env->rodsDefResource );
235 
238  _env->rodsZone );
239 
242  _env->rodsClientServerPolicy );
243 
247 
250  _env->rodsEncryptionKeySize );
251 
254  _env->rodsEncryptionSaltSize );
255 
259 
262  _env->rodsEncryptionAlgorithm );
263 
266  _env->rodsDefaultHashScheme );
267 
270  _env->rodsMatchHashPolicy );
271 
274  _env->rodsDebug );
275 
276  _env->rodsLogLevel = 0;
279  _env->rodsLogLevel );
280  if ( status == 0 && _env->rodsLogLevel > 0 ) {
281  if( _env->rodsLogLevel < LOG_SYS_FATAL ) {
282  _env->rodsLogLevel = LOG_SYS_FATAL;
283  }
284  rodsLogLevel( _env->rodsLogLevel );
285  }
286 
287  memset( _env->rodsAuthFile, 0, sizeof( _env->rodsAuthFile ) );
290  _env->rodsAuthFile );
291  if ( status == 0 ) {
292  rstrcpy(
293  authFileName,
294  _env->rodsAuthFile,
295  LONG_NAME_LEN - 1 );
296  }
297 
298  // legacy ssl environment variables
302 
306 
309  _env->irodsSSLVerifyServer );
310 
314 
318 
321  _env->irodsSSLDHParamsFile );
322 
323  // control plane variables
326  _env->irodsCtrlPlaneKey );
327 
331 
335 
338  _env->irodsCtrlPlanePort );
339 
343 
347 
351 
355 
358  _env->irodsPluginHome );
359 
360  return 0;
361  }
362 
363 
364  static
366  const std::string& _key,
367  char* _val ) {
368  char* env = getenv(
369  irods::to_env( _key ).c_str() );
370  if ( env ) {
371  strncpy(
372  _val,
373  env,
374  strlen( env ) + 1 );
375  rodsLog(
376  LOG_DEBUG,
377  "captured env [%s]-[%s]",
378  _key.c_str(),
379  _val );
380  }
381 
382  } // capture_string_env_var
383 
384  static
386  const std::string& _key,
387  int& _val ) {
388  char* env = getenv(
389  irods::to_env( _key ).c_str() );
390  if ( env ) {
391  _val = atoi( env );
392  rodsLog(
393  LOG_DEBUG,
394  "captured env [%s]-[%d]",
395  _key.c_str(),
396  _val );
397  }
398 
399  } // capture_integer_env_var
400 
401  int
403  rodsEnv* _env ) {
404  if ( !_env ) {
405  rodsLog(
406  LOG_ERROR,
407  "get_legacy_ssl_variables - null env pointer" );
409 
410  }
411 
412  char* val = 0;
413 
414  val = getenv( "irodsSSLCACertificatePath" );
415  if ( val ) {
416  snprintf(
418  sizeof( _env->irodsSSLCACertificatePath ),
419  "%s", val );
420  }
421 
422  val = getenv( "irodsSSLCACertificateFile" );
423  if ( val ) {
424  snprintf(
426  sizeof( _env->irodsSSLCACertificateFile ),
427  "%s", val );
428  }
429 
430  val = getenv( "irodsSSLVerifyServer" );
431  if ( val ) {
432  snprintf(
433  _env->irodsSSLVerifyServer,
434  sizeof( _env->irodsSSLVerifyServer ),
435  "%s", val );
436  }
437 
438  val = getenv( "irodsSSLCertificateChainFile" );
439  if ( val ) {
440  snprintf(
442  sizeof( _env->irodsSSLCertificateChainFile ),
443  "%s", val );
444  }
445 
446  val = getenv( "irodsSSLCertificateKeyFile" );
447  if ( val ) {
448  snprintf(
450  sizeof( _env->irodsSSLCertificateKeyFile ),
451  "%s", val );
452  }
453 
454  val = getenv( "irodsSSLDHParamsFile" );
455  if ( val ) {
456  snprintf(
457  _env->irodsSSLDHParamsFile,
458  sizeof( _env->irodsSSLDHParamsFile ),
459  "%s", val );
460  }
461 
462  return 0;
463 
464  } // get_legacy_ssl_variables
465 
466  int
468  rodsEnv* _env ) {
469  if ( !_env ) {
471  }
472 
473  int status = get_legacy_ssl_variables( _env );
474  if ( status < 0 ) {
475  return status;
476 
477  }
478 
479  std::string env_var = irods::CFG_IRODS_USER_NAME_KW;
481  env_var,
482  _env->rodsUserName );
483 
484  env_var = irods::CFG_IRODS_HOST_KW;
486  env_var,
487  _env->rodsHost );
488 
491  env_var,
492  _env->xmsgHost );
493 
494  env_var = irods::CFG_IRODS_PORT_KW;
496  env_var,
497  _env->rodsPort );
498 
501  env_var,
502  _env->xmsgPort );
503 
504  env_var = irods::CFG_IRODS_HOME_KW;
506  env_var,
507  _env->rodsHome );
508 
509  env_var = irods::CFG_IRODS_CWD_KW;
511  env_var,
512  _env->rodsCwd );
513 
516  env_var,
517  _env->rodsAuthScheme );
518 
521  env_var,
522  _env->rodsDefResource );
523 
524  env_var = irods::CFG_IRODS_ZONE_KW;
526  env_var,
527  _env->rodsZone );
528 
531  env_var,
532  _env->rodsClientServerPolicy );
533 
536  env_var,
538 
541  env_var,
542  _env->rodsEncryptionKeySize );
543 
546  env_var,
547  _env->rodsEncryptionSaltSize );
548 
551  env_var,
553 
556  env_var,
557  _env->rodsEncryptionAlgorithm );
558 
561  env_var,
562  _env->rodsDefaultHashScheme );
563 
566  env_var,
567  _env->rodsMatchHashPolicy );
568 
569  _env->rodsLogLevel = 0;
572  env_var,
573  _env->rodsLogLevel );
574  if( _env->rodsLogLevel ) {
575  if( _env->rodsLogLevel < LOG_SYS_FATAL ) {
576  _env->rodsLogLevel = LOG_SYS_FATAL;
577  }
578 
579  rodsLogLevel( _env->rodsLogLevel );
580  }
581 
582  memset( _env->rodsAuthFile, 0, sizeof( _env->rodsAuthFile ) );
585  env_var,
586  _env->rodsAuthFile );
587  if ( strlen( _env->rodsAuthFile ) > 0 ) {
589 
590  }
591 
592  env_var = irods::CFG_IRODS_DEBUG_KW;
594  env_var,
595  _env->rodsDebug );
596 
597  // legacy ssl environment variables
600  env_var,
604  env_var,
608  env_var,
609  _env->irodsSSLVerifyServer );
612  env_var,
613  _env->irodsSSLVerifyServer );
616  env_var,
620  env_var,
624  env_var,
625  _env->irodsSSLDHParamsFile );
626 
629  env_var,
631 
634  env_var,
636 
639  env_var,
641 
644  env_var,
645  _env->irodsPluginHome );
646 
647  return 0;
648  }
649 
651  FILE* _fout ) {
652  if( !_fout ) {
653  fprintf(
654  stderr,
655  "printRodsEnv :: null input param(s)\n" );
657  }
658 
659  try {
660  const auto& prop_map = irods::environment_properties::instance().map();
661 
662  fprintf(
663  _fout,
664  "irods_version - %d.%d.%d\n",
665  IRODS_VERSION_MAJOR,
666  IRODS_VERSION_MINOR,
667  IRODS_VERSION_PATCHLEVEL);
668 
669  for( auto itr = prop_map.cbegin(); itr != prop_map.cend(); ++itr ) {
670 
671  try {
672  int val = boost::any_cast< int >( itr->second );
673  fprintf(
674  _fout,
675  "%s - %d\n",
676  itr->first.c_str(),
677  val );
678  continue;
679  }
680  catch ( const boost::bad_any_cast& ) {
681  }
682 
683  try {
684  const std::string& val = boost::any_cast< const std::string& >( itr->second );
685  fprintf(
686  _fout,
687  "%s - %s\n",
688  itr->first.c_str(),
689  val.c_str() );
690  continue;
691  }
692  catch ( const boost::bad_any_cast& ) {
693  fprintf(
694  stderr,
695  "failed to cast %s",
696  itr->first.c_str() );
697  }
698 
699  } // for itr
700  } catch ( const irods::exception& e ) {
701  fprintf( stderr,
702  "%s",
703  e.what() );
704  return e.code();
705  }
706 
707  return 0;
708 
709  } // printRodsEnv
710 
711 
712  /* build a couple default values from others if appropriate */
713  int
715  if ( strlen( rodsEnvArg->rodsHome ) == 0 &&
716  strlen( rodsEnvArg->rodsUserName ) > 0 &&
717  strlen( rodsEnvArg->rodsZone ) > 0 ) {
718  snprintf( rodsEnvArg->rodsHome, MAX_NAME_LEN, "/%s/home/%s",
719  rodsEnvArg->rodsZone, rodsEnvArg->rodsUserName );
720  rodsLog( LOG_NOTICE, "created irodsHome=%s", rodsEnvArg->rodsHome );
721  }
722  if ( strlen( rodsEnvArg->rodsCwd ) == 0 &&
723  strlen( rodsEnvArg->rodsHome ) > 0 ) {
724  rstrcpy( rodsEnvArg->rodsCwd, rodsEnvArg->rodsHome, MAX_NAME_LEN );
725  rodsLog( LOG_NOTICE, "created irodsCwd=%s", rodsEnvArg->rodsCwd );
726  }
727 
728  return 0;
729  }
730 
731 
732  /*
733  find the next delimited token and terminate the string with matching quotes
734  */
735  char *findNextTokenAndTerm( char *inPtr ) {
736  char *myPtr = 0;
737  char *savePtr = 0;
738  char *nextPtr = 0;
739  int whiteSpace = 0;
740  myPtr = inPtr;
741  whiteSpace = 1;
742  for ( ;; myPtr++ ) {
743  if ( *myPtr == ' ' || *myPtr == '=' ) {
744  continue;
745  }
746  if ( *myPtr == '"' && whiteSpace ) {
747  myPtr++;
748  savePtr = myPtr;
749  for ( ;; ) {
750  if ( *myPtr == '"' ) {
751  nextPtr = myPtr + 1;
752  if ( *nextPtr == ' ' || *nextPtr == '\n' || *nextPtr == '\0' ) {
753  /* embedded "s are OK */
754  *myPtr = '\0';
755  return savePtr;
756  }
757  }
758  if ( *myPtr == '\n' ) {
759  *myPtr = '\0';
760  }
761  if ( *myPtr == '\0' ) {
762  /* terminated without a corresponding ", so backup and
763  put the starting one back */
764  savePtr--;
765  *savePtr = '"';
766  return savePtr;
767  }
768  myPtr++;
769  }
770  }
771  if ( *myPtr == '\'' && whiteSpace ) {
772  myPtr++;
773  savePtr = myPtr;
774  for ( ;; ) {
775  if ( *myPtr == '\'' ) {
776  nextPtr = myPtr + 1;
777  if ( *nextPtr == ' ' || *nextPtr == '\n' || *nextPtr == '\0' ) {
778  /* imbedded 's are OK */
779  *myPtr = '\0';
780  return savePtr;
781  }
782  }
783  if ( *myPtr == '\n' ) {
784  *myPtr = '\0';
785  }
786  if ( *myPtr == '\0' ) {
787  /* terminated without a corresponding ", so backup and
788  put the starting one back */
789  savePtr--;
790  *savePtr = '\'';
791  return savePtr;
792  }
793  myPtr++;
794  }
795  }
796  if ( whiteSpace ) {
797  savePtr = myPtr;
798  }
799  whiteSpace = 0;
800  if ( *myPtr == '\n' ) {
801  *myPtr = '\0';
802  }
803  if ( *myPtr == '\r' ) {
804  *myPtr = '\0';
805  }
806  if ( *myPtr == '\0' ) {
807  return savePtr;
808  }
809  }
810  }
811 
812 } // extern "C"
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
irods::CFG_IRODS_ENCRYPTION_KEY_SIZE_KW
const std::string CFG_IRODS_ENCRYPTION_KEY_SIZE_KW("irods_encryption_key_size")
irods::CFG_IRODS_XMSG_PORT_KW
const std::string CFG_IRODS_XMSG_PORT_KW("xmsg_port")
irods::CFG_IRODS_DEFAULT_HASH_SCHEME_KW
const std::string CFG_IRODS_DEFAULT_HASH_SCHEME_KW("irods_default_hash_scheme")
rodsEnv::rodsDefaultHashScheme
char rodsDefaultHashScheme[64]
Definition: getRodsEnv.h:34
rodsEnv::rodsEncryptionKeySize
int rodsEncryptionKeySize
Definition: getRodsEnv.h:27
irods_configuration_keywords.hpp
irods::environment_properties::capture
void capture()
Definition: irods_environment_properties.cpp:81
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
rodsEnv::rodsPort
int rodsPort
Definition: getRodsEnv.h:11
getRodsEnvFileName
char * getRodsEnvFileName()
Definition: getRodsEnv.cpp:55
rodsEnv::rodsMatchHashPolicy
char rodsMatchHashPolicy[64]
Definition: getRodsEnv.h:35
irods::environment_properties::instance
static environment_properties & instance()
Definition: irods_environment_properties.cpp:72
rodsEnv::irodsTransBufferSizeForParaTrans
int irodsTransBufferSizeForParaTrans
Definition: getRodsEnv.h:57
rodsEnv::irodsSSLCertificateChainFile
char irodsSSLCertificateChainFile[(1024+64)]
Definition: getRodsEnv.h:42
getRodsEnvAuthFileName
char * getRodsEnvAuthFileName()
Definition: getRodsEnv.cpp:63
rodsEnv::rodsClientServerPolicy
char rodsClientServerPolicy[256]
Definition: getRodsEnv.h:22
getRodsEnvFromEnv
int getRodsEnvFromEnv(rodsEnv *rodsEnvArg)
Definition: getRodsEnv.cpp:467
irods_environment_properties.hpp
LOG_SYS_FATAL
#define LOG_SYS_FATAL
Definition: rodsLog.h:55
get_legacy_ssl_variables
int get_legacy_ssl_variables(rodsEnv *_env)
Definition: getRodsEnv.cpp:402
capture_string_env_var
static void capture_string_env_var(const std::string &_key, char *_val)
Definition: getRodsEnv.cpp:365
rodsEnv::rodsZone
char rodsZone[64]
Definition: getRodsEnv.h:18
createRodsEnvDefaults
int createRodsEnvDefaults(rodsEnv *rodsEnvArg)
Definition: getRodsEnv.cpp:714
env
Definition: restructs.hpp:226
rodsEnv::irodsCtrlPlaneKey
char irodsCtrlPlaneKey[(1024+64)]
Definition: getRodsEnv.h:48
irods::CFG_IRODS_ENCRYPTION_ALGORITHM_KW
const std::string CFG_IRODS_ENCRYPTION_ALGORITHM_KW("irods_encryption_algorithm")
authFileName
static char authFileName[256]
Definition: getRodsEnv.cpp:51
LOG_DEBUG7
#define LOG_DEBUG7
Definition: rodsLog.h:22
irods::to_env
std::string to_env(const std::string &)
Definition: irods_configuration_parser.cpp:172
rodsEnv::irodsCtrlPlaneEncryptionAlgorithm
char irodsCtrlPlaneEncryptionAlgorithm[128]
Definition: getRodsEnv.h:51
LONG_NAME_LEN
#define LONG_NAME_LEN
Definition: rodsDef.h:57
LOG_DEBUG8
#define LOG_DEBUG8
Definition: rodsLog.h:21
irods::CFG_IRODS_MAX_SIZE_FOR_SINGLE_BUFFER
const std::string CFG_IRODS_MAX_SIZE_FOR_SINGLE_BUFFER("irods_maximum_size_for_single_buffer_in_megabytes")
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
ProcessType
int ProcessType
Definition: rcGlobal.cpp:16
irods::CFG_IRODS_HOST_KW
const std::string CFG_IRODS_HOST_KW("irods_host")
getRodsEnv
int getRodsEnv(rodsEnv *rodsEnvArg)
Definition: getRodsEnv.cpp:112
irods::CFG_IRODS_AUTHENTICATION_SCHEME_KW
const std::string CFG_IRODS_AUTHENTICATION_SCHEME_KW("irods_authentication_scheme")
SYS_INVALID_INPUT_PARAM
@ SYS_INVALID_INPUT_PARAM
Definition: rodsErrorTable.h:195
irods::CFG_IRODS_DEBUG_KW
const std::string CFG_IRODS_DEBUG_KW("irods_debug")
irods::CFG_IRODS_TRANS_BUFFER_SIZE_FOR_PARA_TRANS
const std::string CFG_IRODS_TRANS_BUFFER_SIZE_FOR_PARA_TRANS("irods_transfer_buffer_size_for_parallel_transfer_in_megabytes")
irods::CFG_IRODS_MATCH_HASH_POLICY_KW
const std::string CFG_IRODS_MATCH_HASH_POLICY_KW("irods_match_hash_policy")
rodsEnv::rodsUserName
char rodsUserName[64]
Definition: getRodsEnv.h:9
rodsEnv::irodsSSLCertificateKeyFile
char irodsSSLCertificateKeyFile[(1024+64)]
Definition: getRodsEnv.h:43
irods::CFG_IRODS_DEFAULT_RESOURCE_KW
const std::string CFG_IRODS_DEFAULT_RESOURCE_KW("irods_default_resource")
irods::CFG_IRODS_PLUGINS_HOME_KW
const std::string CFG_IRODS_PLUGINS_HOME_KW("irods_plugins_home")
rodsEnv::irodsConnectionPoolRefreshTime
int irodsConnectionPoolRefreshTime
Definition: getRodsEnv.h:58
irods::CFG_IRODS_HOME_KW
const std::string CFG_IRODS_HOME_KW("irods_home")
convertLogLevel
int convertLogLevel(char *inputStr)
Definition: getRodsEnv.cpp:70
irods::CFG_IRODS_SSL_VERIFY_SERVER
const std::string CFG_IRODS_SSL_VERIFY_SERVER("irods_ssl_verify_server")
irods::CFG_IRODS_PORT_KW
const std::string CFG_IRODS_PORT_KW("irods_port")
irods::CFG_IRODS_CWD_KW
const std::string CFG_IRODS_CWD_KW("irods_cwd")
irods::CFG_IRODS_SERVER_CONTROL_PLANE_KEY
const std::string CFG_IRODS_SERVER_CONTROL_PLANE_KEY("irods_server_control_plane_key")
rodsEnv::irodsCtrlPlaneEncryptionNumHashRounds
int irodsCtrlPlaneEncryptionNumHashRounds
Definition: getRodsEnv.h:50
irods::CFG_IRODS_XMSG_HOST_KW
const std::string CFG_IRODS_XMSG_HOST_KW("xmsg_host")
findNextTokenAndTerm
char * findNextTokenAndTerm(char *inPtr)
Definition: getRodsEnv.cpp:735
rodsEnv::irodsSSLDHParamsFile
char irodsSSLDHParamsFile[(1024+64)]
Definition: getRodsEnv.h:44
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
_getRodsEnv
void _getRodsEnv(rodsEnv &rodsEnvArg)
Definition: getRodsEnv.cpp:121
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
rodsEnv::irodsPluginHome
char irodsPluginHome[(1024+64)]
Definition: getRodsEnv.h:62
KEY_NOT_FOUND
@ KEY_NOT_FOUND
Definition: rodsErrorTable.h:749
printRodsEnv
int printRodsEnv(FILE *_fout)
Definition: getRodsEnv.cpp:650
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
irods::CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_NUM_HASH_ROUNDS_KW
const std::string CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_NUM_HASH_ROUNDS_KW("irods_server_control_plane_encryption_num_hash_rounds")
irods::CFG_IRODS_LOG_LEVEL_KW
const std::string CFG_IRODS_LOG_LEVEL_KW("irods_log_level")
rodsLog.h
irods::log
void log(const error &)
Definition: irods_log.cpp:13
irods::CFG_IRODS_CONNECTION_POOL_REFRESH_TIME
const std::string CFG_IRODS_CONNECTION_POOL_REFRESH_TIME("irods_connection_pool_refresh_time_in_seconds")
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
LOG_DEBUG9
#define LOG_DEBUG9
Definition: rodsLog.h:20
rodsEnv::rodsDebug
char rodsDebug[64]
Definition: getRodsEnv.h:21
rodsEnv::rodsClientServerNegotiation
char rodsClientServerNegotiation[256]
Definition: getRodsEnv.h:23
irods::environment_properties::map
std::unordered_map< std::string, boost::any > & map()
Definition: irods_environment_properties.hpp:64
rodsEnv::xmsgPort
int xmsgPort
Definition: getRodsEnv.h:13
rodsLogLevel
void rodsLogLevel(int level)
Definition: rodsLog.cpp:339
rodsEnv::rodsDefResource
char rodsDefResource[64]
Definition: getRodsEnv.h:17
irods::CFG_IRODS_ENCRYPTION_SALT_SIZE_KW
const std::string CFG_IRODS_ENCRYPTION_SALT_SIZE_KW("irods_encryption_salt_size")
capture_integer_property
static int capture_integer_property(const std::string &_key, int &_val)
Definition: getRodsEnv.cpp:161
irods::CFG_IRODS_SESSION_ENVIRONMENT_FILE_KW
const std::string CFG_IRODS_SESSION_ENVIRONMENT_FILE_KW("irods_session_environment_file")
rodsEnv::rodsAuthFile
char rodsAuthFile[256]
Definition: getRodsEnv.h:20
irods::CFG_IRODS_SSL_CERTIFICATE_CHAIN_FILE
const std::string CFG_IRODS_SSL_CERTIFICATE_CHAIN_FILE("irods_ssl_certificate_chain_file")
irods::CFG_IRODS_SSL_CA_CERTIFICATE_PATH
const std::string CFG_IRODS_SSL_CA_CERTIFICATE_PATH("irods_ssl_ca_certificate_path")
LOG_DEBUG6
#define LOG_DEBUG6
Definition: rodsLog.h:24
irods::CFG_IRODS_DEF_NUMBER_TRANSFER_THREADS
const std::string CFG_IRODS_DEF_NUMBER_TRANSFER_THREADS("irods_default_number_of_transfer_threads")
irods::CFG_IRODS_ZONE_KW
const std::string CFG_IRODS_ZONE_KW("irods_zone_name")
capture_integer_env_var
static void capture_integer_env_var(const std::string &_key, int &_val)
Definition: getRodsEnv.cpp:385
capture_string_property
static int capture_string_property(const std::string &_key, char *_val)
Definition: getRodsEnv.cpp:143
getRodsEnvFromFile
int getRodsEnvFromFile(rodsEnv *rodsEnvArg)
Definition: getRodsEnv.cpp:178
irods::CFG_IRODS_SSL_CERTIFICATE_KEY_FILE
const std::string CFG_IRODS_SSL_CERTIFICATE_KEY_FILE("irods_ssl_certificate_key_file")
rstrcpy
char * rstrcpy(char *dst, const char *src, int len)
Definition: stringOpr.cpp:51
irods::exception
Definition: irods_exception.hpp:15
irods::CFG_IRODS_SSL_CA_CERTIFICATE_FILE
const std::string CFG_IRODS_SSL_CA_CERTIFICATE_FILE("irods_ssl_ca_certificate_file")
rodsEnv::irodsSSLCACertificatePath
char irodsSSLCACertificatePath[(1024+64)]
Definition: getRodsEnv.h:39
rodsEnv::rodsCwd
char rodsCwd[(1024+64)]
Definition: getRodsEnv.h:15
rodsEnv::rodsEncryptionNumHashRounds
int rodsEncryptionNumHashRounds
Definition: getRodsEnv.h:29
irods::CFG_IRODS_AUTHENTICATION_FILE_KW
const std::string CFG_IRODS_AUTHENTICATION_FILE_KW("irods_authentication_file")
irods::CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_ALGORITHM_KW
const std::string CFG_IRODS_SERVER_CONTROL_PLANE_ENCRYPTION_ALGORITHM_KW("irods_server_control_plane_encryption_algorithm")
LOG_SQL
#define LOG_SQL
Definition: rodsLog.h:9
LOG_DEBUG10
#define LOG_DEBUG10
Definition: rodsLog.h:19
rodsEnv::irodsSSLCACertificateFile
char irodsSSLCACertificateFile[(1024+64)]
Definition: getRodsEnv.h:40
rodsEnv::irodsMaxSizeForSingleBuffer
int irodsMaxSizeForSingleBuffer
Definition: getRodsEnv.h:55
rodsErrorTable.h
irods::CFG_IRODS_SSL_DH_PARAMS_FILE
const std::string CFG_IRODS_SSL_DH_PARAMS_FILE("irods_ssl_dh_params_file")
configFileName
static char configFileName[256]
Definition: getRodsEnv.cpp:52
LOG_SYS_WARNING
#define LOG_SYS_WARNING
Definition: rodsLog.h:48
rodsEnv::irodsSSLVerifyServer
char irodsSSLVerifyServer[(1024+64)]
Definition: getRodsEnv.h:41
irods::CFG_IRODS_CLIENT_SERVER_NEGOTIATION_KW
const std::string CFG_IRODS_CLIENT_SERVER_NEGOTIATION_KW("irods_client_server_negotiation")
rodsEnv::irodsDefaultNumberTransferThreads
int irodsDefaultNumberTransferThreads
Definition: getRodsEnv.h:56
rodsEnv::rodsHome
char rodsHome[(1024+64)]
Definition: getRodsEnv.h:14
rodsEnv::xmsgHost
char xmsgHost[64]
Definition: getRodsEnv.h:12
irods::CFG_IRODS_CLIENT_SERVER_POLICY_KW
const std::string CFG_IRODS_CLIENT_SERVER_POLICY_KW("irods_client_server_policy")
rodsEnv::rodsAuthScheme
char rodsAuthScheme[64]
Definition: getRodsEnv.h:16
rodsEnv
Definition: getRodsEnv.h:8
rodsEnv::rodsEncryptionSaltSize
int rodsEncryptionSaltSize
Definition: getRodsEnv.h:28
irods::CFG_IRODS_SERVER_CONTROL_PLANE_PORT
const std::string CFG_IRODS_SERVER_CONTROL_PLANE_PORT("irods_server_control_plane_port")
rodsEnv::rodsEncryptionAlgorithm
char rodsEncryptionAlgorithm[128]
Definition: getRodsEnv.h:30
irods::CFG_IRODS_USER_NAME_KW
const std::string CFG_IRODS_USER_NAME_KW("irods_user_name")
rodsEnv::rodsHost
char rodsHost[64]
Definition: getRodsEnv.h:10
rods.h
irods_log.hpp
_reloadRodsEnv
void _reloadRodsEnv(rodsEnv &rodsEnvArg)
Definition: getRodsEnv.cpp:128
rodsEnv::rodsLogLevel
int rodsLogLevel
Definition: getRodsEnv.h:19
rodsEnv::irodsCtrlPlanePort
int irodsCtrlPlanePort
Definition: getRodsEnv.h:49
irods::CFG_IRODS_ENCRYPTION_NUM_HASH_ROUNDS_KW
const std::string CFG_IRODS_ENCRYPTION_NUM_HASH_ROUNDS_KW("irods_encryption_num_hash_rounds")
getRodsEnv.h