File tree Expand file tree Collapse file tree 2 files changed +0
-38
lines changed Expand file tree Collapse file tree 2 files changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ bool pcmk__valid_int(const char *value);
117
117
bool pcmk__valid_positive_int (const char * value );
118
118
bool pcmk__valid_no_quorum_policy (const char * value );
119
119
bool pcmk__valid_percentage (const char * value );
120
- bool pcmk__valid_script (const char * value );
121
120
bool pcmk__valid_placement_strategy (const char * value );
122
121
123
122
// from watchdog.c
Original file line number Diff line number Diff line change @@ -1315,43 +1315,6 @@ pcmk__valid_percentage(const char *value)
1315
1315
return ((end == NULL ) || (end [0 ] == '%' )) && (number >= 0 );
1316
1316
}
1317
1317
1318
- /*!
1319
- * \internal
1320
- * \brief Check whether a string represents a valid script
1321
- *
1322
- * Valid values include \c /dev/null and paths of executable regular files
1323
- *
1324
- * \param[in] value String to validate
1325
- *
1326
- * \return \c true if \p value is a valid script, or \c false otherwise
1327
- */
1328
- bool
1329
- pcmk__valid_script (const char * value )
1330
- {
1331
- struct stat st ;
1332
-
1333
- if (pcmk__str_eq (value , "/dev/null" , pcmk__str_none )) {
1334
- return true;
1335
- }
1336
-
1337
- if (stat (value , & st ) != 0 ) {
1338
- crm_err ("Script %s does not exist" , value );
1339
- return false;
1340
- }
1341
-
1342
- if (S_ISREG (st .st_mode ) == 0 ) {
1343
- crm_err ("Script %s is not a regular file" , value );
1344
- return false;
1345
- }
1346
-
1347
- if ((st .st_mode & (S_IXUSR | S_IXGRP )) == 0 ) {
1348
- crm_err ("Script %s is not executable" , value );
1349
- return false;
1350
- }
1351
-
1352
- return true;
1353
- }
1354
-
1355
1318
/*!
1356
1319
* \internal
1357
1320
* \brief Check whether a string represents a valid placement strategy
You can’t perform that action at this time.
0 commit comments