return true;
}
-int glob_extend(char ***strv, const char *path) {
+int glob_extend(char ***strv, const char *path, int flags) {
_cleanup_globfree_ glob_t g = {};
int k;
- k = safe_glob(path, GLOB_NOSORT|GLOB_BRACE, &g);
+ k = safe_glob(path, GLOB_NOSORT|GLOB_BRACE|flags, &g);
if (k < 0)
return k;
int safe_glob(const char *path, int flags, glob_t *pglob);
int glob_exists(const char *path);
-int glob_extend(char ***strv, const char *path);
+int glob_extend(char ***strv, const char *path, int flags);
#define _cleanup_globfree_ _cleanup_(globfree)
if (!path)
return -ENOMEM;
- r = glob_extend(&names, path);
+ r = glob_extend(&names, path, 0);
if (r == -ENOENT)
continue;
if (r < 0)
break;
case ARG_FILE:
- r = glob_extend(&arg_file, optarg);
+ r = glob_extend(&arg_file, optarg, GLOB_NOCHECK);
if (r < 0)
return log_error_errno(r, "Failed to add paths: %m");
break;
break;
case ARG_FILE:
- r = glob_extend(&arg_file, optarg);
+ r = glob_extend(&arg_file, optarg, GLOB_NOCHECK);
if (r < 0)
return log_error_errno(r, "Failed to add paths: %m");
break;
* STDIN. To avoid confusion we hence don't document this feature. */
arg_file_stdin = true;
else {
- r = glob_extend(&arg_file, optarg);
+ r = glob_extend(&arg_file, optarg, GLOB_NOCHECK);
if (r < 0)
return log_error_errno(r, "Failed to add paths: %m");
}
if (!pattern)
return log_oom();
- k = glob_extend(&paths, pattern);
+ k = glob_extend(&paths, pattern, GLOB_NOCHECK);
if (k < 0) {
if (option->ignore_failure || ERRNO_IS_PRIVILEGE(k))
log_debug_errno(k, "Failed to resolve glob '%s', ignoring: %m",