chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fileio: quote more shell characters in envfiles
[elogind.git]
/
src
/
shared
/
util.h
diff --git
a/src/shared/util.h
b/src/shared/util.h
index fb852d697363300b9911817d737268b460e8caf4..b3187a9ea1d708e789b22862d8544c381526bb22 100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-93,6
+93,12
@@
#define COMMENTS "#;"
#define GLOB_CHARS "*?["
#define COMMENTS "#;"
#define GLOB_CHARS "*?["
+/* What characters are special in the shell? */
+/* must be escaped outside and inside double-quotes */
+#define SHELL_NEED_ESCAPE "\"\\`$"
+/* can be escaped or double-quoted */
+#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;"
+
#define FORMAT_BYTES_MAX 8
#define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
#define FORMAT_BYTES_MAX 8
#define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
@@
-505,7
+511,7
@@
bool tty_is_console(const char *tty) _pure_;
int vtnr_from_tty(const char *tty);
const char *default_term_for_tty(const char *tty);
int vtnr_from_tty(const char *tty);
const char *default_term_for_tty(const char *tty);
-void execute_directory(const char *directory, DIR *_d, usec_t timeout, char *argv[]
, char *env[]
);
+void execute_directory(const char *directory, DIR *_d, usec_t timeout, char *argv[]);
int kill_and_sigcont(pid_t pid, int sig);
int kill_and_sigcont(pid_t pid, int sig);