aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-10-01 08:39:55 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-10-01 08:39:55 -0400
commitaf3e5b21afd587187d820aba493738162db8615b (patch)
treef2e6cba5c00f05938770bd76f9fe5664eba5be8e /src
parentfix shell=none for --audit (#3116) (diff)
downloadfirejail-af3e5b21afd587187d820aba493738162db8615b.tar.gz
firejail-af3e5b21afd587187d820aba493738162db8615b.tar.zst
firejail-af3e5b21afd587187d820aba493738162db8615b.zip
print error for /home/netblue in profile files (#3071)
Diffstat (limited to 'src')
-rw-r--r--src/firejail/macros.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firejail/macros.c b/src/firejail/macros.c
index e52a7a430..2623d794f 100644
--- a/src/firejail/macros.c
+++ b/src/firejail/macros.c
@@ -208,7 +208,11 @@ char *expand_macros(const char *path) {
208 208
209 // Replace home macro 209 // Replace home macro
210 char *new_name = NULL; 210 char *new_name = NULL;
211 if (strncmp(path, "${HOME}", 7) == 0) { 211 if (strncmp(path, "$HOME", 5) == 0) {
212 fprintf(stderr, "Error: $HOME is not allowed in profile files, please replace it with ${HOME}\n");
213 exit(1);
214 }
215 else if (strncmp(path, "${HOME}", 7) == 0) {
212 if (asprintf(&new_name, "%s%s", cfg.homedir, path + 7) == -1) 216 if (asprintf(&new_name, "%s%s", cfg.homedir, path + 7) == -1)
213 errExit("asprintf"); 217 errExit("asprintf");
214 if(called_as_root) 218 if(called_as_root)