Commit 0c47e358 authored by netblue30's avatar netblue30

fixed globbing dot files

parent 3597df9b
......@@ -361,7 +361,7 @@ static void globbing(OPERATION op, const char *pattern, const char *noblacklist[
glob_t globbuf;
// Profiles contain blacklists for files that might not exist on a user's machine.
// GLOB_NOCHECK makes that okay.
int globerr = glob(pattern, GLOB_NOCHECK | GLOB_NOSORT, NULL, &globbuf);
int globerr = glob(pattern, GLOB_NOCHECK | GLOB_NOSORT | GLOB_PERIOD, NULL, &globbuf);
if (globerr) {
fprintf(stderr, "Error: failed to glob pattern %s\n", pattern);
exit(1);
......
......@@ -45,6 +45,9 @@ echo "TESTING: blacklist directory (test/fs/option_blacklist.exp)"
echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)"
./option_blacklist_file.exp
echo "TESTING: blacklist glob (test/fs/option_blacklist_glob.exp)"
./option_blacklist_glob.exp
echo "TESTING: bind as user (test/fs/option_bind_user.exp)"
./option_bind_user.exp
......
#!/usr/bin/expect -f
# This file is part of Firejail project
# Copyright (C) 2014-2016 Firejail Authors
# License GPL v2
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail --blacklist=testdir1/*\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"Child process initialized"
}
sleep 1
send -- "cd testdir1\r"
sleep 1
send -- "cat .file\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"Permission denied"
}
send -- "ls .directory\r"
expect {
timeout {puts "TESTING ERROR 2\n";exit}
"Permission denied"
}
puts "\n"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment