diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/jail.c | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 07cfaff..61272a6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -pedantic -Wall -std=gnu99 -fstrict-aliasing -D_GNU_SOURCE=1 $(libssh_CFLAGS) +AM_CFLAGS = -pedantic -Wall -std=gnu99 -fstrict-aliasing -D_GNU_SOURCE=1 $(libssh_CFLAGS) $(SPECTRE_MIT) $(SYMBOL_VISIBILITY) AM_LDFLAGS = $(libssh_LIBS) sbin_PROGRAMS = potd @@ -10,6 +10,7 @@ #include "jail.h" #include "socket.h" +#include "capabilities.h" #include "utils.h" #include "log.h" @@ -229,7 +230,6 @@ static int jail_childfn(prisoner_process *ctx) const char *path_devpts = "/dev/pts"; const char *path_proc = "/proc"; const char *path_shell = "/bin/sh"; - //const char *path_self = "/proc/self/%s"; int s, master_fd; int unshare_flags = CLONE_NEWUTS|CLONE_NEWPID|CLONE_NEWIPC| CLONE_NEWNS|CLONE_NEWNET/*|CLONE_NEWUSER*/; @@ -250,6 +250,8 @@ static int jail_childfn(prisoner_process *ctx) if (clearenv()) FATAL("Clearing ENV for pid %d", self_pid); + caps_drop_dac_override(0); + D2("Unshare prisoner %d", self_pid); if (unshare(unshare_flags)) FATAL("Unshare prisoner %d", self_pid); @@ -319,6 +321,24 @@ static int jail_childfn(prisoner_process *ctx) */ if (close_fds_except(0, 1, 2, -1)) exit(EXIT_FAILURE); + printf("%s", + " _______ ________ __\n" + " | |.-----.-----.-----.| | | |.----.| |_\n" + " | - || _ | -__| || | | || _|| _|\n" + " |_______|| __|_____|__|__||________||__| |____|\n" + " |__| W I R E L E S S F R E E D O M\n" + " -----------------------------------------------------\n" + " ATTITUDE ADJUSTMENT\n" + " -----------------------------------------------------\n" + " * 1/4 oz Vodka Pour all ingredients into mixing\n" + " * 1/4 oz Gin tin with ice, strain into glass.\n" + " * 1/4 oz Amaretto\n" + " * 1/4 oz Triple sec\n" + " * 1/4 oz Peach schnapps\n" + " * 1/4 oz Sour mix\n" + " * 1 splash Cranberry juice\n" + " -----------------------------------------------------\n" + ); if (execl(path_shell, path_shell, (char *) NULL)) exit(EXIT_FAILURE); default: |