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)  

reSysDataObjOpr.cpp
Go to the documentation of this file.
1 
6 
9 /* reSysDataObjOpr.c */
10 
11 #include "rcMisc.h"
12 #include "reSysDataObjOpr.hpp"
13 #include "genQuery.h"
14 #include "getRescQuota.h"
15 #include "dataObjOpr.hpp"
16 #include "resource.hpp"
17 #include "physPath.hpp"
18 #include "rsGenQuery.hpp"
19 #include "rsModDataObjMeta.hpp"
20 #include "rsDataObjRepl.hpp"
21 #include "apiNumber.h"
22 
23 // =-=-=-=-=-=-=-
24 //
25 #include "irodsReServer.hpp"
29 
68 int
69 msiSetDefaultResc( msParam_t *xdefaultRescList, msParam_t *xoptionStr, ruleExecInfo_t *rei ) {
70  char *defaultRescList;
71  char *optionStr;
72  std::string default_resc;
73 
74  defaultRescList = ( char * ) xdefaultRescList->inOutStruct;
75 
76  optionStr = ( char * ) xoptionStr->inOutStruct;
77 
78  RE_TEST_MACRO( " Calling msiSetDefaultResc" )
79 
80  // JMC - legacy resource - rei->status = setDefaultResc (rei->rsComm, defaultRescList, optionStr, &rei->doinp->condInput, &myRescGrpInfo );
81 
82  irods::error err = irods::set_default_resource( rei->rsComm, defaultRescList, optionStr, &rei->doinp->condInput, default_resc );
83  rei->status = err.code();
84 
85  if ( rei->status >= 0 ) {
86  snprintf( rei->rescName, NAME_LEN, "%s", default_resc.c_str() );
87  }
88  else {
89  irods::log( PASS( err ) );
90  memset( &rei->rescName, 0, NAME_LEN );
91  }
92  return rei->status;
93 }
94 
103 [[deprecated("msiSetRescSortScheme is no longer supported, please use a resource composition of a similar type")]]
104 int
106  rodsLog( LOG_ERROR, "msiSetRescSortScheme is no longer supported, please use a resource composition of a similar type" );
107  return SYS_NOT_SUPPORTED;
108 }
109 
110 
146 int
148 
149  keyValPair_t *condInput;
150  char *rescName;
151  char *value;
152  strArray_t strArray;
153  int status, i;
154  char *rescList;
155 
156  rescList = ( char * ) xrescList->inOutStruct;
157 
158  RE_TEST_MACRO( " Calling msiSetNoDirectRescInp" )
159 
160  rei->status = 0;
161 
162  if ( rescList == NULL || strcmp( rescList, "null" ) == 0 ) {
163  return 0;
164  }
165 
167  /* have enough privilege */
168  return 0;
169  }
170 
171  condInput = &rei->doinp->condInput;
172 
173  if ( ( rescName = getValByKey( condInput, BACKUP_RESC_NAME_KW ) ) == NULL &&
174  ( rescName = getValByKey( condInput, DEST_RESC_NAME_KW ) ) == NULL &&
175  ( rescName = getValByKey( condInput, DEF_RESC_NAME_KW ) ) == NULL &&
176  ( rescName = getValByKey( condInput, RESC_NAME_KW ) ) == NULL ) {
177  return 0;
178  }
179 
180  memset( &strArray, 0, sizeof( strArray ) );
181 
182  status = parseMultiStr( rescList, &strArray );
183 
184  if ( status <= 0 ) {
185  return 0;
186  }
187 
188  value = strArray.value;
189  for ( i = 0; i < strArray.len; i++ ) {
190  if ( strcmp( rescName, &value[i * strArray.size] ) == 0 ) {
191  /* a match */
193  free( value );
195  }
196  }
197  if ( value != NULL ) {
198  free( value );
199  }
200  return 0;
201 }
202 
238 int
240  int writeFlag;
241  char *value;
242  strArray_t strArray;
243  int status, i;
244  char *preferredRescList;
245 
246  preferredRescList = ( char * ) xpreferredRescList->inOutStruct;
247 
248  RE_TEST_MACRO( " Calling msiSetDataObjPreferredResc" )
249 
250  rei->status = 0;
251 
252  if ( preferredRescList == NULL || strcmp( preferredRescList, "null" ) == 0 ) {
253  return 0;
254  }
255 
256  writeFlag = getWriteFlag( rei->doinp->openFlags );
257 
258  memset( &strArray, 0, sizeof( strArray ) );
259 
260  status = parseMultiStr( preferredRescList, &strArray );
261 
262  if ( status <= 0 ) {
263  return 0;
264  }
265 
266  if ( rei->doi == NULL || rei->doi->next == NULL ) {
267  return 0;
268  }
269 
270  value = strArray.value;
271  for ( i = 0; i < strArray.len; i++ ) {
272  if ( requeDataObjInfoByResc( &rei->doi, &value[i * strArray.size],
273  writeFlag, 1 ) >= 0 ) {
274  rei->status = 1;
275  return rei->status;
276  }
277  }
278  return rei->status;
279 }
280 
311 int
313  int writeFlag;
314  char *avoidResc;
315 
316  avoidResc = ( char * ) xavoidResc->inOutStruct;
317 
318  RE_TEST_MACRO( " Calling msiSetDataObjAvoidResc" )
319 
320  rei->status = 0;
321 
322  writeFlag = getWriteFlag( rei->doinp->openFlags );
323 
324  if ( avoidResc != NULL && strcmp( avoidResc, "null" ) != 0 ) {
325  if ( requeDataObjInfoByResc( &rei->doi, avoidResc, writeFlag, 0 )
326  >= 0 ) {
327  rei->status = 1;
328  }
329  }
330  return rei->status;
331 }
332 
363 int
364 msiSortDataObj( msParam_t *xsortScheme, ruleExecInfo_t *rei ) {
365  char *sortScheme;
366 
367  sortScheme = ( char * ) xsortScheme->inOutStruct;
368  RE_TEST_MACRO( " Calling msiSortDataObj" )
369 
370  rei->status = 0;
371  if ( sortScheme != NULL ) {
372  if ( strcmp( sortScheme, "random" ) == 0 ) {
373  sortDataObjInfoRandom( &rei->doi );
374  // JMC - legacy resource - } else if (strcmp (sortScheme, "byRescClass") == 0) {
375  // rei->status = sortObjInfoForOpen( &rei->doi, NULL, 1 );
376  }
377  }
378  return rei->status;
379 }
380 
381 
413 [[deprecated("msiSysChksumDataObj is no longer supported, use msiDataObjChksum instead")]]
414 int
417  "msiSysChksumDataObj is no longer supported, use msiDataObjChksum instead");
418  return SYS_NOT_SUPPORTED;
419 }
420 
453 int
455  int status;
456  RE_TEST_MACRO( " Calling msiSetDataType" )
457 
458  rei->status = 0;
459 
460  if ( rei->doi == NULL ) {
461  return 0;
462  }
463 
464  dataObjInfo_t *dataObjInfoHead = rei->doi;
465 
466  char logicalCollName[MAX_NAME_LEN];
467  char logicalFileName[MAX_NAME_LEN] = "";
468  status = splitPathByKey( dataObjInfoHead->objPath,
469  logicalCollName, sizeof( logicalCollName ), logicalFileName, sizeof( logicalFileName ), '/' );
470  if ( strlen( logicalFileName ) <= 0 ) {
471  return 0;
472  }
473 
474  char logicalFileNameNoExtension[MAX_NAME_LEN] = "";
475  char logicalFileNameExt[MAX_NAME_LEN] = "";
476  status = splitPathByKey( logicalFileName,
477  logicalFileNameNoExtension, sizeof( logicalFileNameNoExtension ), logicalFileNameExt, sizeof( logicalFileNameExt ), '.' );
478  if ( strlen( logicalFileNameExt ) <= 0 ) {
479  return 0;
480  }
481 
482  /* see if there's an entry in the catalog for this extension */
483  genQueryInp_t genQueryInp;
484  memset( &genQueryInp, 0, sizeof( genQueryInp ) );
485  addInxIval( &genQueryInp.selectInp, COL_TOKEN_NAME, 1 );
486 
487  char condStr1[MAX_NAME_LEN];
488  snprintf( condStr1, sizeof( condStr1 ), "= 'data_type'" );
489  addInxVal( &genQueryInp.sqlCondInp, COL_TOKEN_NAMESPACE, condStr1 );
490 
491  char condStr2[MAX_NAME_LEN];
492  snprintf( condStr2, sizeof( condStr2 ), "like '%s|.%s|%s'", "%", logicalFileNameExt, "%" );
493  addInxVal( &genQueryInp.sqlCondInp, COL_TOKEN_VALUE2, condStr2 );
494 
495  genQueryInp.maxRows = 1;
496 
497  genQueryOut_t *genQueryOut = NULL;
498  status = rsGenQuery( rei->rsComm, &genQueryInp, &genQueryOut );
499  if ( status != 0 || genQueryOut == NULL ) {
500  freeGenQueryOut( &genQueryOut );
501  clearGenQueryInp( &genQueryInp );
502  return 0;
503  }
504 
505  rodsLog( LOG_DEBUG, "msiSetDataTypeFromExt: query status %d rowCnt=%d", status, genQueryOut->rowCnt );
506 
507  if ( genQueryOut->rowCnt != 1 ) {
508  return 0;
509  }
510 
511  status = svrCloseQueryOut( rei->rsComm, genQueryOut );
512 
513  /* register it */
514  keyValPair_t regParam;
515  memset( &regParam, 0, sizeof( regParam ) );
516  addKeyVal( &regParam, DATA_TYPE_KW, genQueryOut->sqlResult[0].value );
517 
518  if ( strcmp( dataObjInfoHead->rescHier, "" ) ) {
519  addKeyVal( &regParam, IN_PDMO_KW, dataObjInfoHead->rescHier );
520  }
521 
522  modDataObjMeta_t modDataObjMetaInp;
523  modDataObjMetaInp.dataObjInfo = dataObjInfoHead;
524  modDataObjMetaInp.regParam = &regParam;
525 
526  status = rsModDataObjMeta( rei->rsComm, &modDataObjMetaInp );
527 
528  return 0;
529 }
530 
563 int
565  int status;
566  char *cacheResc;
567 
568  cacheResc = ( char * ) xcacheResc->inOutStruct;
569 
570  RE_TEST_MACRO( " Calling msiStageDataObj" )
571 
572  rei->status = 0;
573 
574  if ( cacheResc == NULL || strcmp( cacheResc, "null" ) == 0 ) {
575  return rei->status;
576  }
577 
578  /* preProcessing */
579  if ( rei->doinp->oprType == REPLICATE_OPR ||
580  rei->doinp->oprType == COPY_DEST ||
581  rei->doinp->oprType == COPY_SRC ) {
582  return rei->status;
583  }
584 
585  if ( getValByKey( &rei->doinp->condInput, RESC_NAME_KW ) != NULL ||
586  getValByKey( &rei->doinp->condInput, REPL_NUM_KW ) != NULL ) {
587  /* a specific replNum or resource is specified. Don't cache */
588  return rei->status;
589  }
590 
591  status = msiSysReplDataObj( xcacheResc, NULL, rei );
592 
593  return status;
594 }
595 
637 [[deprecated("msiSysReplDataObj is no longer supported, use msiDataObjRepl instead")]]
638 int
639 msiSysReplDataObj( msParam_t *xcacheResc, msParam_t *xflag,
640  ruleExecInfo_t *rei ) {
641 // int writeFlag;
642  dataObjInfo_t *dataObjInfoHead;
643  char *cacheResc;
644  char *flag = NULL;
645 
646  cacheResc = ( char * ) xcacheResc->inOutStruct;
647  if ( xflag != NULL && xflag->inOutStruct != NULL ) {
648  flag = ( char * ) xflag->inOutStruct;
649  }
650 
651  RE_TEST_MACRO( " Calling msiSysReplDataObj" )
652 
653  rei->status = 0;
654 
655  if ( cacheResc == NULL || strcmp( cacheResc, "null" ) == 0 ||
656  strlen( cacheResc ) == 0 ) {
657  return rei->status;
658  }
659 
660  dataObjInfoHead = rei->doi;
661 
662  if ( dataObjInfoHead == NULL ) {
663  return rei->status;
664  }
665 
666 // writeFlag = getWriteFlag( rei->doinp->openFlags );
667 
668 // if ( requeDataObjInfoByResc( &dataObjInfoHead, cacheResc, writeFlag, 1 )
669 // >= 0 ) {
670 // /* we have a good copy on cache */
671 // rei->status = 1;
672 // return ( rei->status );
673 // }
674 
675  rei->status = rsReplAndRequeDataObjInfo( rei->rsComm, &dataObjInfoHead,
676  cacheResc, flag );
677  if ( rei->status >= 0 ) {
678  rei->doi = dataObjInfoHead;
679  }
680  return rei->status;
681 }
682 
722 int
723 msiSetNumThreads( msParam_t *xsizePerThrInMbStr, msParam_t *xmaxNumThrStr,
724  msParam_t *xwindowSizeStr, ruleExecInfo_t *rei ) {
725  int sizePerThr;
726  int maxNumThr;
727  dataObjInp_t *doinp;
728  int numThr;
729  char *sizePerThrInMbStr;
730  char *maxNumThrStr;
731  char *windowSizeStr;
732 
733  sizePerThrInMbStr = ( char * ) xsizePerThrInMbStr->inOutStruct;
734  maxNumThrStr = ( char * ) xmaxNumThrStr->inOutStruct;
735  windowSizeStr = ( char * ) xwindowSizeStr->inOutStruct;
736 
737 
738  int def_num_thr = 0;
739  try {
740  def_num_thr = irods::get_advanced_setting<const int>(irods::CFG_DEF_NUMBER_TRANSFER_THREADS);
741  } catch ( const irods::exception& e ) {
742  irods::log(e);
743  return e.code();
744  }
745 
746  if ( rei->rsComm != NULL ) {
747  if ( strcmp( windowSizeStr, "null" ) == 0 ||
748  strcmp( windowSizeStr, "default" ) == 0 ) {
749  rei->rsComm->windowSize = 0;
750  }
751  else {
752  rei->rsComm->windowSize = atoi( windowSizeStr );
753  }
754  }
755 
756  int size_per_tran_thr = 0;
757  try {
758  size_per_tran_thr = irods::get_advanced_setting<const int>(irods::CFG_TRANS_BUFFER_SIZE_FOR_PARA_TRANS);
759  } catch ( const irods::exception& e ) {
760  irods::log(e);
761  return e.code();
762  }
763  if ( 0 >= size_per_tran_thr ) {
764  rodsLog( LOG_ERROR, "%d is an invalid size_per_tran_thr value. "
765  "size_per_tran_thr must be greater than zero.", size_per_tran_thr );
767  }
768  size_per_tran_thr *= 1024 * 1024;
769 
770  if ( strcmp( sizePerThrInMbStr, "default" ) == 0 ) {
771  sizePerThr = size_per_tran_thr;
772  }
773  else {
774  sizePerThr = atoi( sizePerThrInMbStr ) * ( 1024 * 1024 );
775  if ( sizePerThr <= 0 ) {
777  "msiSetNumThreads: Bad input sizePerThrInMb %s", sizePerThrInMbStr );
778  sizePerThr = size_per_tran_thr;
779  }
780  }
781 
782  doinp = rei->doinp;
783  if ( doinp == NULL ) {
785  "msiSetNumThreads: doinp is NULL" );
786  rei->status = def_num_thr;
787  return def_num_thr;
788  }
789 
790  if ( strcmp( maxNumThrStr, "default" ) == 0 ) {
791  maxNumThr = def_num_thr;
792  }
793  else {
794  maxNumThr = atoi( maxNumThrStr );
795  if ( maxNumThr < 0 ) {
797  "msiSetNumThreads: Bad input maxNumThr %s", maxNumThrStr );
798  maxNumThr = def_num_thr;
799  }
800  else if ( maxNumThr == 0 ) {
801  rei->status = 0;
802  return rei->status;
803  }
804  else if ( maxNumThr > MAX_NUM_CONFIG_TRAN_THR ) {
806  "msiSetNumThreads: input maxNumThr %s too large", maxNumThrStr );
807  maxNumThr = MAX_NUM_CONFIG_TRAN_THR;
808  }
809  }
810 
811 
812  if ( doinp->numThreads > 0 ) {
813 
814  int trans_buff_size = 0;
815  try {
816  trans_buff_size = irods::get_advanced_setting<const int>(irods::CFG_TRANS_BUFFER_SIZE_FOR_PARA_TRANS);
817  } catch ( const irods::exception& e ) {
818  irods::log(e);
819  return e.code();
820  }
821  if ( 0 >= trans_buff_size ) {
822  rodsLog( LOG_ERROR, "%d is an invalid trans_buff size. "
823  "trans_buff_size must be greater than zero.", trans_buff_size );
825  }
826  trans_buff_size *= 1024 * 1024;
827 
828  numThr = doinp->dataSize / trans_buff_size + 1;
829  if ( numThr > doinp->numThreads ) {
830  numThr = doinp->numThreads;
831  }
832  }
833  else {
834  numThr = doinp->dataSize / sizePerThr + 1;
835  }
836 
837  if ( numThr > maxNumThr ) {
838  numThr = maxNumThr;
839  }
840 
841  rei->status = numThr;
842  return rei->status;
843 
844 }
845 
875 int
877  RE_TEST_MACRO( " Calling msiDeleteDisallowed" )
878 
880 
881  return rei->status;
882 }
883 
914 int
916  RE_TEST_MACRO( " Calling msiOprDisallowed" )
917 
919 
920  return rei->status;
921 }
922 
923 
953 int
956  return 0;
957 }
958 
990 int
992  rei->status = NO_CHK_PATH_PERM;
993  return NO_CHK_PATH_PERM;
994 }
1027 int
1029  char *chkType;
1030 
1031  chkType = ( char * ) xchkType->inOutStruct;
1032 
1033  if ( strcmp( chkType, DO_CHK_PATH_PERM_STR ) == 0 ) {
1034  rei->status = DO_CHK_PATH_PERM;
1035  }
1036  else if ( strcmp( chkType, NO_CHK_PATH_PERM_STR ) == 0 ) {
1037  rei->status = NO_CHK_PATH_PERM;
1038  }
1039  else if ( strcmp( chkType, CHK_NON_VAULT_PATH_PERM_STR ) == 0 ) {
1041  }
1042  else if ( strcmp( chkType, DISALLOW_PATH_REG_STR ) == 0 ) {
1043  rei->status = DISALLOW_PATH_REG;
1044  }
1045  else {
1046  rodsLog( LOG_ERROR,
1047  "msiNoChkFilePathPerm:invalid check type %s,set to DISALLOW_PATH_REG" );
1048  rei->status = DISALLOW_PATH_REG;
1049  }
1050  return rei->status;
1051 }
1052 // =-=-=-=-=-=-=-
1053 
1083 int
1085  rei->status = NO_TRASH_CAN;
1086  return NO_TRASH_CAN;
1087 }
1088 
1122 int
1124 
1125  char *value;
1126  strArray_t strArray;
1127  int status, i;
1128  char *oprList;
1129 
1130  oprList = ( char * ) xoprList->inOutStruct;
1131 
1132  RE_TEST_MACRO( " Calling msiSetPublicUserOpr" )
1133 
1134  rei->status = 0;
1135 
1136  if ( oprList == NULL || strcmp( oprList, "null" ) == 0 ) {
1137  return 0;
1138  }
1139 
1141  /* not enough privilege */
1142  return SYS_NO_API_PRIV;
1143  }
1144 
1145  memset( &strArray, 0, sizeof( strArray ) );
1146 
1147  status = parseMultiStr( oprList, &strArray );
1148 
1149  if ( status <= 0 ) {
1150  return 0;
1151  }
1152 
1153  value = strArray.value;
1154  for ( i = 0; i < strArray.len; i++ ) {
1155  if ( strcmp( "read", &value[i * strArray.size] ) == 0 ) {
1156  /* a match */
1159  PUBLIC_USER_AUTH );
1161  PUBLIC_USER_AUTH );
1163  PUBLIC_USER_AUTH );
1165  PUBLIC_USER_AUTH );
1167  PUBLIC_USER_AUTH );
1169  PUBLIC_USER_AUTH );
1171  PUBLIC_USER_AUTH );
1174  }
1175  else if ( strcmp( "query", &value[i * strArray.size] ) == 0 ) {
1177  }
1178  else {
1179  rodsLog( LOG_ERROR,
1180  "msiSetPublicUserOpr: operation %s for user public not allowed",
1181  &value[i * strArray.size] );
1182  }
1183  }
1184 
1185  if ( value != NULL ) {
1186  free( value );
1187  }
1188 
1189  return 0;
1190 }
1191 
1192 int
1193 setApiPerm( int apiNumber, int proxyPerm, int clientPerm ) {
1194  int apiInx;
1195 
1196  if ( proxyPerm < NO_USER_AUTH || proxyPerm > LOCAL_PRIV_USER_AUTH ) {
1197  rodsLog( LOG_ERROR,
1198  "setApiPerm: input proxyPerm %d out of range", proxyPerm );
1200  }
1201 
1202  if ( clientPerm < NO_USER_AUTH || clientPerm > LOCAL_PRIV_USER_AUTH ) {
1203  rodsLog( LOG_ERROR,
1204  "setApiPerm: input clientPerm %d out of range", clientPerm );
1206  }
1207 
1208  apiInx = apiTableLookup( apiNumber );
1209 
1210  if ( apiInx < 0 ) {
1211  return apiInx;
1212  }
1213 
1215  RsApiTable[apiInx]->proxyUserAuth = proxyPerm;
1216  RsApiTable[apiInx]->clientUserAuth = clientPerm;
1217 
1218  return 0;
1219 }
1220 
1260 int
1261 msiSetGraftPathScheme( msParam_t *xaddUserName, msParam_t *xtrimDirCnt,
1262  ruleExecInfo_t *rei ) {
1263  char *addUserNameStr;
1264  char *trimDirCntStr;
1265  int addUserName;
1266  int trimDirCnt;
1267  msParam_t *msParam;
1268  vaultPathPolicy_t *vaultPathPolicy;
1269 
1270  RE_TEST_MACRO( " Calling msiSetGraftPathScheme" )
1271 
1272  addUserNameStr = ( char * ) xaddUserName->inOutStruct;
1273  trimDirCntStr = ( char * ) xtrimDirCnt->inOutStruct;
1274 
1275  if ( strcmp( addUserNameStr, "no" ) == 0 ) {
1276  addUserName = 0;
1277  }
1278  else if ( strcmp( addUserNameStr, "yes" ) == 0 ) {
1279  addUserName = 1;
1280  }
1281  else {
1282  rodsLog( LOG_ERROR,
1283  "msiSetGraftPathScheme: invalid input addUserName %s", addUserNameStr );
1286  }
1287 
1288  if ( !isdigit( trimDirCntStr[0] ) ) {
1289  rodsLog( LOG_ERROR,
1290  "msiSetGraftPathScheme: input trimDirCnt %s", trimDirCntStr );
1293  }
1294  else {
1295  trimDirCnt = atoi( trimDirCntStr );
1296  }
1297 
1298  rei->status = 0;
1299 
1300  if ( ( msParam = getMsParamByLabel( &rei->inOutMsParamArray,
1301  VAULT_PATH_POLICY ) ) != NULL ) {
1302  vaultPathPolicy = ( vaultPathPolicy_t * ) msParam->inOutStruct;
1303  if ( vaultPathPolicy == NULL ) {
1304  vaultPathPolicy = ( vaultPathPolicy_t* )malloc( sizeof( vaultPathPolicy_t ) );
1305  msParam->inOutStruct = ( void * ) vaultPathPolicy;
1306  }
1307  vaultPathPolicy->scheme = GRAFT_PATH_S;
1308  vaultPathPolicy->addUserName = addUserName;
1309  vaultPathPolicy->trimDirCnt = trimDirCnt;
1310  return 0;
1311  }
1312  else {
1313  vaultPathPolicy = ( vaultPathPolicy_t * ) malloc(
1314  sizeof( vaultPathPolicy_t ) );
1315  vaultPathPolicy->scheme = GRAFT_PATH_S;
1316  vaultPathPolicy->addUserName = addUserName;
1317  vaultPathPolicy->trimDirCnt = trimDirCnt;
1319  VaultPathPolicy_MS_T, ( void * ) vaultPathPolicy, NULL );
1320  }
1321  return 0;
1322 }
1323 
1355 int
1357  msParam_t *msParam;
1358  vaultPathPolicy_t *vaultPathPolicy;
1359 
1360  RE_TEST_MACRO( " Calling msiSetRandomScheme" )
1361 
1362  rei->status = 0;
1363 
1364  if ( ( msParam = getMsParamByLabel( &rei->inOutMsParamArray,
1365  VAULT_PATH_POLICY ) ) != NULL ) {
1366  vaultPathPolicy = ( vaultPathPolicy_t * ) msParam->inOutStruct;
1367  if ( vaultPathPolicy == NULL ) {
1368  vaultPathPolicy = ( vaultPathPolicy_t* )malloc( sizeof( vaultPathPolicy_t ) );
1369  msParam->inOutStruct = ( void * ) vaultPathPolicy;
1370  }
1371  memset( vaultPathPolicy, 0, sizeof( vaultPathPolicy_t ) );
1372  vaultPathPolicy->scheme = RANDOM_S;
1373  return 0;
1374  }
1375  else {
1376  vaultPathPolicy = ( vaultPathPolicy_t * ) malloc(
1377  sizeof( vaultPathPolicy_t ) );
1378  memset( vaultPathPolicy, 0, sizeof( vaultPathPolicy_t ) );
1379  vaultPathPolicy->scheme = RANDOM_S;
1381  VaultPathPolicy_MS_T, ( void * ) vaultPathPolicy, NULL );
1382  }
1383  return 0;
1384 }
1385 
1386 
1418 int
1421  char* numProcStr = ( char* )xnumProc->inOutStruct;
1422 
1423  if (0 != strcmp(numProcStr, "default")) {
1424  numProc = atoi( numProcStr );
1426  try {
1427  max_re_procs = irods::get_advanced_setting<const int>(irods::CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS);
1428  } catch ( const irods::exception& e ) {
1429  irods::log(e);
1430  return e.code();
1431  }
1432 
1433  if ( numProc > max_re_procs ) {
1434  numProc = max_re_procs;
1435  }
1436  else if ( numProc < 0 ) {
1438  }
1439  }
1440  rei->status = numProc;
1441 
1442  return numProc;
1443 }
1444 
1476 int
1478  char *flag;
1479 
1480  flag = ( char * ) xflag->inOutStruct;
1481 
1482  RE_TEST_MACRO( " Calling msiSetRescQuotaPolic" )
1483 
1484  if ( strcmp( flag, "on" ) == 0 ) {
1486  }
1487  else {
1489  }
1490  return rei->status;
1491 }
1492 
1528 int
1529 msiSetReplComment( msParam_t *inpParam1, msParam_t *inpParam2,
1530  msParam_t *inpParam3, msParam_t *inpParam4,
1531  ruleExecInfo_t *rei ) {
1532  rsComm_t *rsComm;
1533  char *dataCommentStr, *dataIdStr; /* for parsing of input params */
1534 
1535  modDataObjMeta_t modDataObjMetaInp; /* for rsModDataObjMeta() */
1536  dataObjInfo_t dataObjInfo; /* for rsModDataObjMeta() */
1537  keyValPair_t regParam; /* for rsModDataObjMeta() */
1538 
1539  RE_TEST_MACRO( " Calling msiSetReplComment" )
1540 
1541  if ( rei == NULL || rei->rsComm == NULL ) {
1542  rodsLog( LOG_ERROR, "msiSetReplComment: input rei or rsComm is NULL." );
1544  }
1545  rsComm = rei->rsComm ;
1546 
1547  memset( &dataObjInfo, 0, sizeof( dataObjInfo ) );
1548 
1549  /* parse inpParam1: data object ID */
1550  if ( ( dataIdStr = parseMspForStr( inpParam1 ) ) != NULL ) {
1551  dataObjInfo.dataId = ( rodsLong_t ) atoll( dataIdStr );
1552  }
1553  else {
1554  dataObjInfo.dataId = 0;
1555  }
1556 
1557  /* parse inpParam2: data object path */
1558  if ( parseMspForStr( inpParam2 ) ) {
1559  snprintf( dataObjInfo.objPath, sizeof( dataObjInfo.objPath ), "%s", parseMspForStr( inpParam2 ) );
1560  }
1561  /* make sure to have at least data ID or path */
1562  if ( !( dataIdStr || strlen( dataObjInfo.objPath ) > 0 ) ) {
1563  rodsLog( LOG_ERROR, "msiSetReplComment: No data object ID or path provided." );
1564  return USER__NULL_INPUT_ERR;
1565  }
1566 
1567  if ( inpParam3 != NULL ) {
1568  dataObjInfo.replNum = parseMspForPosInt( inpParam3 );
1569  }
1570 
1571  /* parse inpParam3: data type string */
1572  if ( ( dataCommentStr = parseMspForStr( inpParam4 ) ) == NULL ) {
1573  rodsLog( LOG_ERROR, "msiSetReplComment: parseMspForStr error for param 4." );
1574  return USER__NULL_INPUT_ERR;
1575  }
1576  memset( &regParam, 0, sizeof( regParam ) );
1577  addKeyVal( &regParam, DATA_COMMENTS_KW, dataCommentStr );
1578  if ( strcmp( dataObjInfo.rescHier, "" ) ) {
1579  addKeyVal( &regParam, IN_PDMO_KW, dataObjInfo.rescHier );
1580  }
1581 
1582  rodsLog( LOG_NOTICE, "msiSetReplComment: mod %s (%d) with %s",
1583  dataObjInfo.objPath, dataObjInfo.replNum, dataCommentStr );
1584  /* call rsModDataObjMeta() */
1585  modDataObjMetaInp.dataObjInfo = &dataObjInfo;
1586  modDataObjMetaInp.regParam = &regParam;
1587  rei->status = rsModDataObjMeta( rsComm, &modDataObjMetaInp );
1588 
1589  /* failure? */
1590  if ( rei->status < 0 ) {
1591  if ( strlen( dataObjInfo.objPath ) > 0 ) {
1592  rodsLog( LOG_ERROR,
1593  "msiSetReplComment: rsModDataObjMeta failed for object %s, status = %d",
1594  dataObjInfo.objPath, rei->status );
1595  }
1596  else {
1597  rodsLog( LOG_ERROR,
1598  "msiSetReplComment: rsModDataObjMeta failed for object ID %d, status = %d",
1599  dataObjInfo.dataId, rei->status );
1600  }
1601  }
1602  else {
1603  rodsLog( LOG_NOTICE, "msiSetReplComment: OK mod %s (%d) with %s",
1604  dataObjInfo.objPath, dataObjInfo.replNum, dataCommentStr );
1605  }
1606  return rei->status;
1607 }
1608 
1642 int
1644  char *flag;
1645 
1646  flag = ( char * ) xflag->inOutStruct;
1647 
1648  RE_TEST_MACRO( " Calling msiSetBulkPutPostProcPolicy" )
1649 
1650  if ( strcmp( flag, "on" ) == 0 ) {
1651  rei->status = POLICY_ON;
1652  }
1653  else {
1654  rei->status = POLICY_OFF;
1655  }
1656  return rei->status;
1657 }
1658 
1699 int
1701  keyValPair_t regParam;
1702  modDataObjMeta_t modDataObjMetaInp;
1703  // =-=-=-=-=-=-=-
1704  // JMC - backport 4573
1705  dataObjInfo_t dataObjInfo;
1706  char theTime[TIME_LEN], *inpStr = 0, mdname[MAX_NAME_LEN], replAttr[MAX_NAME_LEN], *pstr1 = 0, *pstr2 = 0;
1707  int allRepl = 0, len1 = 0, len2 = 0, numRepl = 0, status = 0;
1708  // =-=-=-=-=-=-=-
1709  rsComm_t *rsComm = 0;
1710 
1711  RE_TEST_MACRO( " Calling msiSysMetaModify" )
1712 
1713  memset( &mdname, 0, sizeof( mdname ) );
1714 
1715 
1716  if ( rei == NULL || rei->rsComm == NULL ) {
1717  rodsLog( LOG_ERROR,
1718  "msiSysMetaModify: input rei or rsComm is NULL" );
1720  }
1721 
1722  rsComm = rei->rsComm;
1723 
1724  if ( sysMetadata == NULL ) {
1725  rodsLogAndErrorMsg( LOG_ERROR, &rsComm->rError, rei->status,
1726  "msiSysMetaModify: input Param1 is NULL" );
1728  return rei->status;
1729  }
1730 
1731  if ( value == NULL ) {
1732  rodsLogAndErrorMsg( LOG_ERROR, &rsComm->rError, rei->status,
1733  "msiSysMetaModify: input Param2 is NULL" );
1735  return rei->status;
1736  }
1737 
1738  if ( strcmp( sysMetadata->type, STR_MS_T ) == 0 && strcmp( value->type, STR_MS_T ) == 0 ) {
1739  memset( &regParam, 0, sizeof( regParam ) );
1740  // =-=-=-=-=-=-=-
1741  // JMC - backport 4573
1742  memcpy( &dataObjInfo, rei->doi, sizeof( dataObjInfo_t ) );
1743  inpStr = ( char * ) sysMetadata->inOutStruct;
1744  allRepl = 1;
1745  /* parse the input parameter which is: <string> or <string>++++replNum=<int> */
1746  pstr1 = strstr( inpStr, "++++" );
1747  if ( pstr1 != NULL ) {
1748  len1 = strlen( inpStr ) - strlen( pstr1 );
1749  if ( len1 > 0 ) {
1750  strncpy( mdname, inpStr, len1 );
1751  }
1752  pstr2 = strstr( pstr1 + 4, "=" );
1753  if ( pstr2 != NULL ) {
1754  len2 = strlen( pstr1 + 4 ) - strlen( pstr2 );
1755  memset( replAttr, 0, sizeof( replAttr ) ); // JMC - backport 4803
1756  strncpy( replAttr, pstr1 + 4, len2 );
1757  if ( len2 > 0 ) {
1758  if ( strcmp( replAttr, "numRepl" ) == 0 ) {
1759  numRepl = atoi( pstr2 + 1 );
1760  if ( ( numRepl == 0 && strcmp( pstr2 + 1, "0" ) == 0 ) || numRepl > 0 ) {
1761  dataObjInfo.replNum = numRepl;
1762  allRepl = 0;
1763  }
1764  }
1765  }
1766  }
1767  }
1768  else {
1769  strncpy( mdname , inpStr, strlen( inpStr ) );
1770  allRepl = 1;
1771  }
1772  /* end of the parsing */
1773  // =-=-=-=-=-=-=-
1774  if ( strcmp( mdname, "datatype" ) == 0 ) {
1775  addKeyVal( &regParam, DATA_TYPE_KW, ( char * ) value->inOutStruct );
1776  }
1777  else if ( strcmp( mdname, "comment" ) == 0 ) {
1778  addKeyVal( &regParam, DATA_COMMENTS_KW, ( char * ) value->inOutStruct );
1779  // =-=-=-=-=-=-=-
1780  // JMC - backport 4573
1781  if ( allRepl == 1 ) {
1782  addKeyVal( &regParam, ALL_KW, ( char * ) value->inOutStruct );
1783  }
1784 
1785  // =-=-=-=-=-=-=-
1786  }
1787  else if ( strcmp( mdname, "expirytime" ) == 0 ) {
1788  rstrcpy( theTime, ( char * ) value->inOutStruct, TIME_LEN );
1789  if ( strncmp( theTime, "+", 1 ) == 0 ) {
1790  rstrcpy( theTime, ( char * ) value->inOutStruct + 1, TIME_LEN ); /* skip the + */
1791  status = checkDateFormat( theTime ); /* check and convert the time value */
1792  getOffsetTimeStr( theTime, theTime ); /* convert delta format to now + this*/
1793  }
1794  else {
1795  status = checkDateFormat( theTime ); /* check and convert the time value */
1796  }
1797  if ( status != 0 ) {
1798  rei->status = DATE_FORMAT_ERR;
1799  rodsLogAndErrorMsg( LOG_ERROR, &rsComm->rError, rei->status,
1800  "msiSysMetaModify: bad format for the input time: %s. Please refer to isysmeta help.",
1801  ( char * ) value->inOutStruct );
1802  return rei->status;
1803  }
1804  else {
1805  addKeyVal( &regParam, DATA_EXPIRY_KW, theTime );
1806  // =-=-=-=-=-=-=-
1807  // JMC - backport 4573
1808  if ( allRepl == 1 ) {
1809  addKeyVal( &regParam, ALL_KW, theTime );
1810  }
1811  // =-=-=-=-=-=-=-
1812  }
1813  }
1814  else {
1816  rodsLogAndErrorMsg( LOG_ERROR, &rsComm->rError, rei->status,
1817  "msiSysMetaModify: unknown system metadata or impossible to modify it: %s",
1818  ( char * ) sysMetadata->inOutStruct );
1819  }
1820 
1821  if ( strcmp( dataObjInfo.rescHier, "" ) ) {
1822  addKeyVal( &regParam, IN_PDMO_KW, dataObjInfo.rescHier );
1823  }
1824 
1825  modDataObjMetaInp.dataObjInfo = &dataObjInfo; // JMC - backport 4573
1826  modDataObjMetaInp.regParam = &regParam;
1827  rei->status = rsModDataObjMeta( rsComm, &modDataObjMetaInp );
1828  }
1829  else { /* one or two bad input parameter type for the msi */
1830  rodsLogAndErrorMsg( LOG_ERROR, &rsComm->rError, rei->status,
1831  "msiSysMetaModify: Unsupported input Param1 type %s or Param2 type %s",
1832  sysMetadata->type, value->type );
1834  return rei->status;
1835  }
1836 
1837  return rei->status;
1838 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
getValByKey
char * getValByKey(const keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:675
NO_TRASH_CAN
#define NO_TRASH_CAN
Definition: objInfo.h:263
RESC_NAME_KW
#define RESC_NAME_KW
Definition: rodsKeyWdDef.h:19
msiSetGraftPathScheme
int msiSetGraftPathScheme(msParam_t *xaddUserName, msParam_t *xtrimDirCnt, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1261
NULL
#define NULL
Definition: rodsDef.h:70
rsComm_t
Definition: rcConnect.h:145
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
FILE_CLOSE_AN
#define FILE_CLOSE_AN
Definition: apiNumber.h:16
DATA_OBJ_GET_AN
#define DATA_OBJ_GET_AN
Definition: apiNumber.h:46
vaultPathPolicy_t
Definition: rodsDef.h:353
DATA_OBJ_LSEEK_AN
#define DATA_OBJ_LSEEK_AN
Definition: apiNumber.h:101
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
USER_DIRECT_RESC_INPUT_ERR
@ USER_DIRECT_RESC_INPUT_ERR
Definition: rodsErrorTable.h:251
svrCloseQueryOut
int svrCloseQueryOut(rsComm_t *rsComm, genQueryOut_t *genQueryOut)
Definition: objMetaOpr.cpp:26
SYS_NO_API_PRIV
@ SYS_NO_API_PRIV
Definition: rodsErrorTable.h:81
DataObjInp::openFlags
int openFlags
Definition: dataObjInpOut.h:68
irods_server_properties.hpp
COL_TOKEN_NAMESPACE
#define COL_TOKEN_NAMESPACE
Definition: rodsGenQuery.h:335
DATA_EXPIRY_KW
#define DATA_EXPIRY_KW
Definition: rodsKeyWdDef.h:39
getMsParamByLabel
msParam_t * getMsParamByLabel(msParamArray_t *msParamArray, const char *label)
Definition: msParam.cpp:376
setApiPerm
int setApiPerm(int apiNumber, int proxyPerm, int clientPerm)
Definition: reSysDataObjOpr.cpp:1193
FILE_READ_AN
#define FILE_READ_AN
Definition: apiNumber.h:18
msiOprDisallowed
int msiOprDisallowed(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:915
irods::CFG_TRANS_BUFFER_SIZE_FOR_PARA_TRANS
const std::string CFG_TRANS_BUFFER_SIZE_FOR_PARA_TRANS("transfer_buffer_size_for_parallel_transfer_in_megabytes")
msiSetMultiReplPerResc
int msiSetMultiReplPerResc(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:954
reSysDataObjOpr.hpp
RuleExecInfo::status
int status
Definition: irods_re_structs.hpp:19
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
msiSetDataTypeFromExt
int msiSetDataTypeFromExt(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:454
DATA_OBJ_OPEN_AN
#define DATA_OBJ_OPEN_AN
Definition: apiNumber.h:43
GenQueryInp
Definition: rodsGenQuery.h:24
MSI_OPERATION_NOT_ALLOWED
@ MSI_OPERATION_NOT_ALLOWED
Definition: rodsErrorTable.h:684
rcMisc.h
PUBLIC_USER_AUTH
#define PUBLIC_USER_AUTH
Definition: rodsUser.h:32
parseMspForStr
char * parseMspForStr(msParam_t *inpParam)
Definition: msParam.cpp:893
parseMultiStr
int parseMultiStr(char *strInput, strArray_t *strArray)
Definition: rcMisc.cpp:1539
DISALLOW_PATH_REG_STR
#define DISALLOW_PATH_REG_STR
Definition: objInfo.h:250
msiSetDefaultResc
int msiSetDefaultResc(msParam_t *xdefaultRescList, msParam_t *xoptionStr, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:69
DataObjInfo::rescHier
char rescHier[(1024+64)]
Definition: objInfo.h:132
msiSetChkFilePathPerm
int msiSetChkFilePathPerm(msParam_t *xchkType, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1028
irods::set_default_resource
error set_default_resource(rsComm_t *, const std::string &, const std::string &, keyValPair_t *, std::string &)
Definition: irods_resource_backport.cpp:298
msiSetPublicUserOpr
int msiSetPublicUserOpr(msParam_t *xoprList, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1123
RuleExecInfo::doi
dataObjInfo_t * doi
Definition: irods_re_structs.hpp:28
RsApiTable
irods::api_entry_table RsApiTable
irods_resource_backport.hpp
VAULT_PATH_POLICY
#define VAULT_PATH_POLICY
Definition: rodsDef.h:342
REPL_NUM_KW
#define REPL_NUM_KW
Definition: rodsKeyWdDef.h:30
RuleExecInfo::doinp
dataObjInp_t * doinp
Definition: irods_re_structs.hpp:27
ALL_KW
#define ALL_KW
Definition: rodsKeyWdDef.h:10
DATA_GET_AN
#define DATA_GET_AN
Definition: apiNumber.h:47
FILE_OPEN_AN
#define FILE_OPEN_AN
Definition: apiNumber.h:14
msiSetRescQuotaPolicy
int msiSetRescQuotaPolicy(msParam_t *xflag, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1477
MAX_NUM_CONFIG_TRAN_THR
#define MAX_NUM_CONFIG_TRAN_THR
Definition: rodsDef.h:96
addInxVal
int addInxVal(inxValPair_t *inxValPair, int inx, const char *value)
Definition: rcMisc.cpp:921
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
SYS_INVALID_INPUT_PARAM
@ SYS_INVALID_INPUT_PARAM
Definition: rodsErrorTable.h:195
DataObjInfo::dataId
rodsLong_t dataId
Definition: objInfo.h:143
msiStageDataObj
int msiStageDataObj(msParam_t *xcacheResc, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:564
MsParam::type
char * type
Definition: msParam.h:78
msiSysMetaModify
int msiSysMetaModify(msParam_t *sysMetadata, msParam_t *value, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1700
DataObjInfo::next
struct DataObjInfo * next
Definition: objInfo.h:163
GenQueryInp::selectInp
inxIvalPair_t selectInp
Definition: rodsGenQuery.h:53
GenQueryInp::maxRows
int maxRows
Definition: rodsGenQuery.h:25
GenQueryOut::sqlResult
sqlResult_t sqlResult[50]
Definition: rodsGenQuery.h:72
checkDateFormat
int checkDateFormat(char *s)
Definition: rcMisc.cpp:2129
irodsReServer.hpp
STR_MS_T
#define STR_MS_T
Definition: msParam.h:21
DATA_TYPE_KW
#define DATA_TYPE_KW
Definition: rodsKeyWdDef.h:23
StrArray::len
int len
Definition: objInfo.h:221
RuleExecInfo::rsComm
rsComm_t * rsComm
Definition: irods_re_structs.hpp:22
DO_CHK_PATH_PERM
#define DO_CHK_PATH_PERM
Definition: objInfo.h:247
SYS_NOT_SUPPORTED
@ SYS_NOT_SUPPORTED
Definition: rodsErrorTable.h:133
BACKUP_RESC_NAME_KW
#define BACKUP_RESC_NAME_KW
Definition: rodsKeyWdDef.h:22
DEST_RESC_NAME_KW
#define DEST_RESC_NAME_KW
Definition: rodsKeyWdDef.h:20
DATA_COMMENTS_KW
#define DATA_COMMENTS_KW
Definition: rodsKeyWdDef.h:40
GRAFT_PATH_S
@ GRAFT_PATH_S
Definition: rodsDef.h:345
rsComm_t::rError
rError_t rError
Definition: rcConnect.h:158
irods::error::code
long long code() const
Definition: irods_error.cpp:194
VaultPathPolicy_MS_T
#define VaultPathPolicy_MS_T
Definition: msParam.h:43
USER_BAD_KEYWORD_ERR
@ USER_BAD_KEYWORD_ERR
Definition: rodsErrorTable.h:246
rodsLogAndErrorMsg
void rodsLogAndErrorMsg(int level, rError_t *myError, int status, const char *formatStr,...)
Definition: rodsLog.cpp:231
COL_TOKEN_NAME
#define COL_TOKEN_NAME
Definition: rodsGenQuery.h:337
msiSysReplDataObj
int msiSysReplDataObj(msParam_t *xcacheResc, msParam_t *xflag, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:639
FILE_LSEEK_AN
#define FILE_LSEEK_AN
Definition: apiNumber.h:17
msiSortDataObj
int msiSortDataObj(msParam_t *xsortScheme, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:364
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
rsComm_t::proxyUser
userInfo_t proxyUser
Definition: rcConnect.h:152
NO_CHK_PATH_PERM
#define NO_CHK_PATH_PERM
Definition: objInfo.h:246
DATE_FORMAT_ERR
@ DATE_FORMAT_ERR
Definition: rodsErrorTable.h:674
DO_CHK_PATH_PERM_STR
#define DO_CHK_PATH_PERM_STR
Definition: objInfo.h:252
COPY_SRC
#define COPY_SRC
Definition: dataObjInpOut.h:176
TIME_LEN
#define TIME_LEN
Definition: rodsDef.h:54
vaultPathPolicy_t::addUserName
int addUserName
Definition: rodsDef.h:355
irods::get_server_api_table
api_entry_table & get_server_api_table()
Definition: irods_server_api_table.cpp:8
RuleExecInfo::statusStr
char statusStr[(1024+64)]
Definition: irods_re_structs.hpp:20
NO_CHK_PATH_PERM_STR
#define NO_CHK_PATH_PERM_STR
Definition: objInfo.h:251
irods_server_api_table.hpp
msiSetDataObjAvoidResc
int msiSetDataObjAvoidResc(msParam_t *xavoidResc, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:312
msiNoTrashCan
int msiNoTrashCan(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1084
GenQueryInp::sqlCondInp
inxValPair_t sqlCondInp
Definition: rodsGenQuery.h:56
DataObjInp
Definition: dataObjInpOut.h:65
genQuery.h
REMOTE_PRIV_USER_AUTH
#define REMOTE_PRIV_USER_AUTH
Definition: rodsUser.h:35
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
getRescQuota.h
getWriteFlag
int getWriteFlag(int openFlag)
Definition: physPath.cpp:386
getOffsetTimeStr
void getOffsetTimeStr(char *timeStr, const char *offSet)
Definition: rcMisc.cpp:1659
addInxIval
int addInxIval(inxIvalPair_t *inxIvalPair, int inx, int value)
Definition: rcMisc.cpp:883
RescQuotaPolicy
int RescQuotaPolicy
Definition: irods_server_globals.cpp:64
GenQueryOut
Definition: rodsGenQuery.h:67
DataObjInfo::replNum
int replNum
Definition: objInfo.h:140
RESC_QUOTA_OFF
#define RESC_QUOTA_OFF
Definition: getRescQuota.h:10
LOCAL_PRIV_USER_AUTH
#define LOCAL_PRIV_USER_AUTH
Definition: rodsUser.h:36
get_irods_version.value
dictionary value
Definition: get_irods_version.py:27
irods::CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS
const std::string CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS("maximum_number_of_concurrent_rule_engine_server_processes")
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
COL_TOKEN_VALUE2
#define COL_TOKEN_VALUE2
Definition: rodsGenQuery.h:339
MsParam
Definition: msParam.h:76
msiSetDataObjPreferredResc
int msiSetDataObjPreferredResc(msParam_t *xpreferredRescList, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:239
splitPathByKey
int splitPathByKey(const char *srcPath, char *dir, size_t maxDirLen, char *file, size_t maxFileLen, char key)
Definition: stringOpr.cpp:222
GenQueryOut::rowCnt
int rowCnt
Definition: rodsGenQuery.h:68
physPath.hpp
irods::log
void log(const error &)
Definition: irods_log.cpp:13
DEF_RESC_NAME_KW
#define DEF_RESC_NAME_KW
Definition: rodsKeyWdDef.h:21
msiSetReServerNumProc
int msiSetReServerNumProc(msParam_t *xnumProc, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1419
modDataObjMeta_t::regParam
keyValPair_t * regParam
Definition: modDataObjMeta.h:9
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
rsComm_t::clientUser
userInfo_t clientUser
Definition: rcConnect.h:153
msiSetNoDirectRescInp
int msiSetNoDirectRescInp(msParam_t *xrescList, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:147
irods::error
Definition: irods_error.hpp:23
modDataObjMeta_t::dataObjInfo
dataObjInfo_t * dataObjInfo
Definition: modDataObjMeta.h:8
apiNumber.h
irods::api_entry_table
Definition: apiHandler.hpp:353
DATA_OBJ_CLOSE_AN
#define DATA_OBJ_CLOSE_AN
Definition: apiNumber.h:100
SqlResult::value
char * value
Definition: rodsGenQuery.h:64
IN_PDMO_KW
#define IN_PDMO_KW
Definition: rodsKeyWdDef.h:227
REPLICATE_OPR
#define REPLICATE_OPR
Definition: dataObjInpOut.h:172
GEN_QUERY_AN
#define GEN_QUERY_AN
Definition: apiNumber.h:131
msiDeleteDisallowed
int msiDeleteDisallowed(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:876
StrArray::size
int size
Definition: objInfo.h:222
MULTI_COPIES_PER_RESC
#define MULTI_COPIES_PER_RESC
Definition: dataObjOpr.hpp:32
COPY_DEST
#define COPY_DEST
Definition: dataObjInpOut.h:175
UNKNOWN_PARAM_IN_RULE_ERR
@ UNKNOWN_PARAM_IN_RULE_ERR
Definition: rodsErrorTable.h:599
sortDataObjInfoRandom
int sortDataObjInfoRandom(dataObjInfo_t **dataObjInfoHead)
Definition: dataObjOpr.cpp:701
DataObjInp::oprType
int oprType
Definition: dataObjInpOut.h:72
vaultPathPolicy_t::scheme
vaultPathScheme_t scheme
Definition: rodsDef.h:354
apiTableLookup
int apiTableLookup(int apiNumber)
Definition: procApiRequest.cpp:461
RuleExecInfo::rescName
char rescName[64]
Definition: irods_re_structs.hpp:29
RuleExecInfo
Definition: irods_re_structs.hpp:18
rsModDataObjMeta
int rsModDataObjMeta(rsComm_t *rsComm, modDataObjMeta_t *modDataObjMetaInp)
Definition: rsModDataObjMeta.cpp:23
SYS_DELETE_DISALLOWED
@ SYS_DELETE_DISALLOWED
Definition: rodsErrorTable.h:108
SYS_INPUT_PERM_OUT_OF_RANGE
@ SYS_INPUT_PERM_OUT_OF_RANGE
Definition: rodsErrorTable.h:115
RE_TEST_MACRO
#define RE_TEST_MACRO(msg)
Definition: reDefines.h:58
CHK_NON_VAULT_PATH_PERM
#define CHK_NON_VAULT_PATH_PERM
Definition: objInfo.h:248
rsModDataObjMeta.hpp
parseMspForPosInt
int parseMspForPosInt(msParam_t *inpParam)
Definition: msParam.cpp:861
resource.hpp
StrArray::value
char * value
Definition: objInfo.h:223
irods::exception
Definition: irods_exception.hpp:15
rsReplAndRequeDataObjInfo
int rsReplAndRequeDataObjInfo(rsComm_t *rsComm, dataObjInfo_t **srcDataObjInfoHead, char *destRescName, char *flagStr)
Definition: rsDataObjRepl.cpp:1416
DISALLOW_PATH_REG
#define DISALLOW_PATH_REG
Definition: objInfo.h:245
msiSysChksumDataObj
int msiSysChksumDataObj(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:415
DataObjInfo::objPath
char objPath[(1024+64)]
Definition: objInfo.h:130
irods::CFG_DEF_NUMBER_TRANSFER_THREADS
const std::string CFG_DEF_NUMBER_TRANSFER_THREADS("default_number_of_transfer_threads")
OBJ_STAT_AN
#define OBJ_STAT_AN
Definition: apiNumber.h:64
rsGenQuery.hpp
userInfo_t::authInfo
authInfo_t authInfo
Definition: rodsUser.h:70
vaultPathPolicy_t::trimDirCnt
int trimDirCnt
Definition: rodsDef.h:356
msiSetRescSortScheme
int msiSetRescSortScheme(msParam_t *, ruleExecInfo_t *)
Definition: reSysDataObjOpr.cpp:105
MsParam::inOutStruct
void * inOutStruct
Definition: msParam.h:80
addMsParam
int addMsParam(msParamArray_t *msParamArray, const char *label, const char *packInstruct, void *inOutStruct, bytesBuf_t *inpOutBuf)
Definition: msParam.cpp:17
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
dataObjOpr.hpp
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
modDataObjMeta_t
Definition: modDataObjMeta.h:7
requeDataObjInfoByResc
int requeDataObjInfoByResc(dataObjInfo_t **dataObjInfoHead, const char *preferedResc, int writeFlag, int topFlag)
Definition: dataObjOpr.cpp:760
freeGenQueryOut
int freeGenQueryOut(genQueryOut_t **genQueryOut)
Definition: rcMisc.cpp:1133
msiSetRandomScheme
int msiSetRandomScheme(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1356
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
CHK_NON_VAULT_PATH_PERM_STR
#define CHK_NON_VAULT_PATH_PERM_STR
Definition: objInfo.h:253
KeyValPair
Definition: objInfo.h:120
RANDOM_S
@ RANDOM_S
Definition: rodsDef.h:346
authInfo_t::authFlag
int authFlag
Definition: rodsUser.h:42
msiNoChkFilePathPerm
int msiNoChkFilePathPerm(ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:991
POLICY_OFF
#define POLICY_OFF
Definition: rodsDef.h:143
msiSetBulkPutPostProcPolicy
int msiSetBulkPutPostProcPolicy(msParam_t *xflag, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1643
DataObjInfo
Definition: objInfo.h:129
clearGenQueryInp
void clearGenQueryInp(void *voidInp)
Definition: rcMisc.cpp:1118
rsGenQuery
int rsGenQuery(rsComm_t *rsComm, genQueryInp_t *genQueryInp, genQueryOut_t **genQueryOut)
Definition: rsGenQuery.cpp:604
irods::default_max_number_of_concurrent_re_threads
constexpr int default_max_number_of_concurrent_re_threads
Definition: irodsReServer.hpp:6
RuleExecInfo::inOutMsParamArray
msParamArray_t inOutMsParamArray
Definition: irods_re_structs.hpp:25
rsDataObjRepl.hpp
POLICY_ON
#define POLICY_ON
Definition: rodsDef.h:144
RESC_QUOTA_ON
#define RESC_QUOTA_ON
Definition: getRescQuota.h:11
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
StrArray
Definition: objInfo.h:220
msiSetNumThreads
int msiSetNumThreads(msParam_t *xsizePerThrInMbStr, msParam_t *xmaxNumThrStr, msParam_t *xwindowSizeStr, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:723
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247
msiSetReplComment
int msiSetReplComment(msParam_t *inpParam1, msParam_t *inpParam2, msParam_t *inpParam3, msParam_t *inpParam4, ruleExecInfo_t *rei)
Definition: reSysDataObjOpr.cpp:1529