diff options
author | netblue30 <netblue30@yahoo.com> | 2018-04-04 07:41:17 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-04-04 07:41:17 -0400 |
commit | 23d10c8fa0bc1dface09d71cc9d6475d53c42645 (patch) | |
tree | 5a5a3b39c1a64d956e31b295990b768795780974 | |
parent | Merge branch 'master' of http://github.com/netblue30/firejail (diff) | |
download | firejail-23d10c8fa0bc1dface09d71cc9d6475d53c42645.tar.gz firejail-23d10c8fa0bc1dface09d71cc9d6475d53c42645.tar.zst firejail-23d10c8fa0bc1dface09d71cc9d6475d53c42645.zip |
deprecated --git-install and --git-uninstall
-rw-r--r-- | Makefile.in | 5 | ||||
-rw-r--r-- | RELNOTES | 5 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rwxr-xr-x | mkdeb.sh | 2 | ||||
-rw-r--r-- | src/common.mk.in | 3 | ||||
-rw-r--r-- | src/firejail/checkcfg.c | 8 | ||||
-rw-r--r-- | src/firejail/git.c | 90 | ||||
-rw-r--r-- | src/firejail/main.c | 9 | ||||
-rw-r--r-- | src/firejail/usage.c | 5 | ||||
-rw-r--r-- | src/man/firejail.txt | 33 | ||||
-rwxr-xr-x | test/root/git.exp | 51 | ||||
-rwxr-xr-x | test/root/root.sh | 3 |
13 files changed, 6 insertions, 236 deletions
diff --git a/Makefile.in b/Makefile.in index e9df6264d..2d73daa46 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -19,7 +19,6 @@ DOCDIR=@docdir@ | |||
19 | HAVE_SECCOMP=@HAVE_SECCOMP@ | 19 | HAVE_SECCOMP=@HAVE_SECCOMP@ |
20 | HAVE_APPARMOR=@HAVE_APPARMOR@ | 20 | HAVE_APPARMOR=@HAVE_APPARMOR@ |
21 | HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ | 21 | HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ |
22 | HAVE_GIT_INSTALL=@HAVE_GIT_INSTALL@ | ||
23 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ | 22 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ |
24 | HAVE_SUID=@HAVE_SUID@ | 23 | HAVE_SUID=@HAVE_SUID@ |
25 | 24 | ||
@@ -96,10 +95,6 @@ endif | |||
96 | install -c -m 0644 src/libpostexecseccomp/libpostexecseccomp.so $(DESTDIR)/$(libdir)/firejail/. | 95 | install -c -m 0644 src/libpostexecseccomp/libpostexecseccomp.so $(DESTDIR)/$(libdir)/firejail/. |
97 | install -c -m 0755 src/ftee/ftee $(DESTDIR)/$(libdir)/firejail/. | 96 | install -c -m 0755 src/ftee/ftee $(DESTDIR)/$(libdir)/firejail/. |
98 | install -c -m 0755 src/fshaper/fshaper.sh $(DESTDIR)/$(libdir)/firejail/. | 97 | install -c -m 0755 src/fshaper/fshaper.sh $(DESTDIR)/$(libdir)/firejail/. |
99 | ifeq ($(HAVE_GIT_INSTALL),-DHAVE_GIT_INSTALL) | ||
100 | install -c -m 0755 src/fgit/fgit-install.sh $(DESTDIR)/$(libdir)/firejail/. | ||
101 | install -c -m 0755 src/fgit/fgit-uninstall.sh $(DESTDIR)/$(libdir)/firejail/. | ||
102 | endif | ||
103 | 98 | ||
104 | install -c -m 0644 src/firecfg/firecfg.config $(DESTDIR)/$(libdir)/firejail/. | 99 | install -c -m 0644 src/firecfg/firecfg.config $(DESTDIR)/$(libdir)/firejail/. |
105 | install -c -m 0755 src/faudit/faudit $(DESTDIR)/$(libdir)/firejail/. | 100 | install -c -m 0755 src/faudit/faudit $(DESTDIR)/$(libdir)/firejail/. |
@@ -1,6 +1,7 @@ | |||
1 | firejail (0.9.53) baseline; urgency=low | 1 | firejail (0.9.53) baseline; urgency=low |
2 | * work in progress | 2 | * work in progress |
3 | * --force depercated | 3 | * modif: --force depercated |
4 | * modif: --git-install and --git-uninstall deprecated | ||
4 | * modif: support for private-bin, private-lib and shell none has been | 5 | * modif: support for private-bin, private-lib and shell none has been |
5 | disabled while running AppImage archives in order to be able to use | 6 | disabled while running AppImage archives in order to be able to use |
6 | our regular profile files with AppImages. | 7 | our regular profile files with AppImages. |
@@ -10,6 +11,8 @@ firejail (0.9.53) baseline; urgency=low | |||
10 | All users of Firefox-based browsers who use addons and plugins | 11 | All users of Firefox-based browsers who use addons and plugins |
11 | that read/write from ${HOME} will need to uncomment the includes for | 12 | that read/write from ${HOME} will need to uncomment the includes for |
12 | firefox-common-addons.inc in firefox-common.profile. | 13 | firefox-common-addons.inc in firefox-common.profile. |
14 | * modif: split disable-devel.inc into disable-devel and | ||
15 | disable-interpreters.inc | ||
13 | * add --noautopulse to disable automatic ~/.config/pulse (for complex setups) | 16 | * add --noautopulse to disable automatic ~/.config/pulse (for complex setups) |
14 | * Spectre mitigation patch for gcc and clang compiler | 17 | * Spectre mitigation patch for gcc and clang compiler |
15 | * D-Bus handling (--nodbus) | 18 | * D-Bus handling (--nodbus) |
@@ -626,7 +626,6 @@ ac_subst_vars='LTLIBOBJS | |||
626 | LIBOBJS | 626 | LIBOBJS |
627 | HAVE_SECCOMP_H | 627 | HAVE_SECCOMP_H |
628 | HAVE_CONTRIB_INSTALL | 628 | HAVE_CONTRIB_INSTALL |
629 | HAVE_GIT_INSTALL | ||
630 | HAVE_GCOV | 629 | HAVE_GCOV |
631 | BUSYBOX_WORKAROUND | 630 | BUSYBOX_WORKAROUND |
632 | HAVE_FATAL_WARNINGS | 631 | HAVE_FATAL_WARNINGS |
@@ -717,7 +716,6 @@ enable_suid | |||
717 | enable_fatal_warnings | 716 | enable_fatal_warnings |
718 | enable_busybox_workaround | 717 | enable_busybox_workaround |
719 | enable_gcov | 718 | enable_gcov |
720 | enable_git_install | ||
721 | enable_contrib_install | 719 | enable_contrib_install |
722 | ' | 720 | ' |
723 | ac_precious_vars='build_alias | 721 | ac_precious_vars='build_alias |
@@ -1369,7 +1367,6 @@ Optional Features: | |||
1369 | --enable-busybox-workaround | 1367 | --enable-busybox-workaround |
1370 | enable busybox workaround | 1368 | enable busybox workaround |
1371 | --enable-gcov Gcov instrumentation | 1369 | --enable-gcov Gcov instrumentation |
1372 | --enable-git-install enable git install feature | ||
1373 | --enable-contrib-install | 1370 | --enable-contrib-install |
1374 | install contrib scripts | 1371 | install contrib scripts |
1375 | 1372 | ||
@@ -3787,20 +3784,6 @@ if test "x$enable_gcov" = "xyes"; then : | |||
3787 | 3784 | ||
3788 | fi | 3785 | fi |
3789 | 3786 | ||
3790 | |||
3791 | HAVE_GIT_INSTALL="" | ||
3792 | # Check whether --enable-git-install was given. | ||
3793 | if test "${enable_git_install+set}" = set; then : | ||
3794 | enableval=$enable_git_install; | ||
3795 | fi | ||
3796 | |||
3797 | if test "x$enable_git_install" = "xyes"; then : | ||
3798 | |||
3799 | HAVE_GIT_INSTALL="-DHAVE_GIT_INSTALL" | ||
3800 | |||
3801 | |||
3802 | fi | ||
3803 | |||
3804 | HAVE_CONTRIB_INSTALL="yes" | 3787 | HAVE_CONTRIB_INSTALL="yes" |
3805 | # Check whether --enable-contrib-install was given. | 3788 | # Check whether --enable-contrib-install was given. |
3806 | if test "${enable_contrib_install+set}" = set; then : | 3789 | if test "${enable_contrib_install+set}" = set; then : |
@@ -5080,7 +5063,6 @@ echo " whitelisting: $HAVE_WHITELIST" | |||
5080 | echo " private home support: $HAVE_PRIVATE_HOME" | 5063 | echo " private home support: $HAVE_PRIVATE_HOME" |
5081 | echo " file transfer support: $HAVE_FILE_TRANSFER" | 5064 | echo " file transfer support: $HAVE_FILE_TRANSFER" |
5082 | echo " overlayfs support: $HAVE_OVERLAYFS" | 5065 | echo " overlayfs support: $HAVE_OVERLAYFS" |
5083 | echo " git install support: $HAVE_GIT_INSTALL" | ||
5084 | echo " busybox workaround: $BUSYBOX_WORKAROUND" | 5066 | echo " busybox workaround: $BUSYBOX_WORKAROUND" |
5085 | echo " Spectre compiler patch: $HAVE_SPECTRE" | 5067 | echo " Spectre compiler patch: $HAVE_SPECTRE" |
5086 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" | 5068 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" |
diff --git a/configure.ac b/configure.ac index 7495ac4c4..bd87ed9ee 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -179,15 +179,6 @@ AS_IF([test "x$enable_gcov" = "xyes"], [ | |||
179 | AC_SUBST(HAVE_GCOV) | 179 | AC_SUBST(HAVE_GCOV) |
180 | ]) | 180 | ]) |
181 | 181 | ||
182 | |||
183 | HAVE_GIT_INSTALL="" | ||
184 | AC_ARG_ENABLE([git-install], | ||
185 | AS_HELP_STRING([--enable-git-install], [enable git install feature])) | ||
186 | AS_IF([test "x$enable_git_install" = "xyes"], [ | ||
187 | HAVE_GIT_INSTALL="-DHAVE_GIT_INSTALL" | ||
188 | AC_SUBST(HAVE_GIT_INSTALL) | ||
189 | ]) | ||
190 | |||
191 | HAVE_CONTRIB_INSTALL="yes" | 182 | HAVE_CONTRIB_INSTALL="yes" |
192 | AC_ARG_ENABLE([contrib-install], | 183 | AC_ARG_ENABLE([contrib-install], |
193 | AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])) | 184 | AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])) |
@@ -229,7 +220,6 @@ echo " whitelisting: $HAVE_WHITELIST" | |||
229 | echo " private home support: $HAVE_PRIVATE_HOME" | 220 | echo " private home support: $HAVE_PRIVATE_HOME" |
230 | echo " file transfer support: $HAVE_FILE_TRANSFER" | 221 | echo " file transfer support: $HAVE_FILE_TRANSFER" |
231 | echo " overlayfs support: $HAVE_OVERLAYFS" | 222 | echo " overlayfs support: $HAVE_OVERLAYFS" |
232 | echo " git install support: $HAVE_GIT_INSTALL" | ||
233 | echo " busybox workaround: $BUSYBOX_WORKAROUND" | 223 | echo " busybox workaround: $BUSYBOX_WORKAROUND" |
234 | echo " Spectre compiler patch: $HAVE_SPECTRE" | 224 | echo " Spectre compiler patch: $HAVE_SPECTRE" |
235 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" | 225 | echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" |
@@ -18,7 +18,7 @@ echo "*****************************************" | |||
18 | tar -xJvf $CODE_ARCHIVE | 18 | tar -xJvf $CODE_ARCHIVE |
19 | #mkdir -p $INSTALL_DIR | 19 | #mkdir -p $INSTALL_DIR |
20 | cd $CODE_DIR | 20 | cd $CODE_DIR |
21 | ./configure --prefix=/usr --enable-git-install | 21 | ./configure --prefix=/usr |
22 | make -j2 | 22 | make -j2 |
23 | mkdir debian | 23 | mkdir debian |
24 | DESTDIR=debian make install-strip | 24 | DESTDIR=debian make install-strip |
diff --git a/src/common.mk.in b/src/common.mk.in index 1d4dbe304..fd9f2e5a5 100644 --- a/src/common.mk.in +++ b/src/common.mk.in | |||
@@ -23,14 +23,13 @@ HAVE_APPARMOR=@HAVE_APPARMOR@ | |||
23 | HAVE_OVERLAYFS=@HAVE_OVERLAYFS@ | 23 | HAVE_OVERLAYFS=@HAVE_OVERLAYFS@ |
24 | HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@ | 24 | HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@ |
25 | HAVE_GCOV=@HAVE_GCOV@ | 25 | HAVE_GCOV=@HAVE_GCOV@ |
26 | HAVE_GIT_INSTALL=@HAVE_GIT_INSTALL@ | ||
27 | 26 | ||
28 | H_FILE_LIST = $(sort $(wildcard *.[h])) | 27 | H_FILE_LIST = $(sort $(wildcard *.[h])) |
29 | C_FILE_LIST = $(sort $(wildcard *.c)) | 28 | C_FILE_LIST = $(sort $(wildcard *.c)) |
30 | OBJS = $(C_FILE_LIST:.c=.o) | 29 | OBJS = $(C_FILE_LIST:.c=.o) |
31 | BINOBJS = $(foreach file, $(OBJS), $file) | 30 | BINOBJS = $(foreach file, $(OBJS), $file) |
32 | 31 | ||
33 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) $(HAVE_GIT_INSTALL) -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_SECCOMP) $(HAVE_GLOBALCFG) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) $(HAVE_FILE_TRANSFER) $(HAVE_WHITELIST) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security | 32 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_SECCOMP) $(HAVE_GLOBALCFG) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) $(HAVE_FILE_TRANSFER) $(HAVE_WHITELIST) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security |
34 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread | 33 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread |
35 | EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@ | 34 | EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@ |
36 | EXTRA_CFLAGS +=@EXTRA_CFLAGS@ | 35 | EXTRA_CFLAGS +=@EXTRA_CFLAGS@ |
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c index 20845270e..7b0ae30b6 100644 --- a/src/firejail/checkcfg.c +++ b/src/firejail/checkcfg.c | |||
@@ -450,14 +450,6 @@ void print_compiletime_support(void) { | |||
450 | #endif | 450 | #endif |
451 | ); | 451 | ); |
452 | 452 | ||
453 | printf("\t- git install support is %s\n", | ||
454 | #ifdef HAVE_GIT_INSTALL | ||
455 | "enabled" | ||
456 | #else | ||
457 | "disabled" | ||
458 | #endif | ||
459 | ); | ||
460 | |||
461 | printf("\t- networking support is %s\n", | 453 | printf("\t- networking support is %s\n", |
462 | #ifdef HAVE_NETWORK | 454 | #ifdef HAVE_NETWORK |
463 | "enabled" | 455 | "enabled" |
diff --git a/src/firejail/git.c b/src/firejail/git.c deleted file mode 100644 index d6525aa89..000000000 --- a/src/firejail/git.c +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014-2018 Firejail Authors | ||
3 | * | ||
4 | * This file is part of firejail project | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #ifdef HAVE_GIT_INSTALL | ||
22 | |||
23 | #include "firejail.h" | ||
24 | #include <sys/utsname.h> | ||
25 | #include <sched.h> | ||
26 | #include <sys/mount.h> | ||
27 | |||
28 | // install a very simple mount namespace sandbox with a tmpfs on top of /tmp | ||
29 | // and drop privileges | ||
30 | static void sbox_ns(void) { | ||
31 | if (unshare(CLONE_NEWNS) < 0) | ||
32 | errExit("unshare"); | ||
33 | |||
34 | // mount events are not forwarded between the host the sandbox | ||
35 | if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL) < 0) { | ||
36 | errExit("mount"); | ||
37 | } | ||
38 | |||
39 | // mount a tmpfs on top of /tmp | ||
40 | if (mount(NULL, "/tmp", "tmpfs", 0, NULL) < 0) | ||
41 | errExit("mount"); | ||
42 | |||
43 | |||
44 | // drop privileges | ||
45 | if (setgid(getgid()) < 0) | ||
46 | errExit("setgid/getgid"); | ||
47 | if (setuid(getuid()) < 0) | ||
48 | errExit("setuid/getuid"); | ||
49 | assert(getenv("LD_PRELOAD") == NULL); | ||
50 | |||
51 | printf("Running as "); fflush(0); | ||
52 | int rv = system("whoami"); | ||
53 | (void) rv; | ||
54 | printf("/tmp directory: "); fflush(0); | ||
55 | rv = system("ls -l /tmp"); | ||
56 | (void) rv; | ||
57 | } | ||
58 | |||
59 | |||
60 | void git_install(void) { | ||
61 | // redirect to "/usr/bin/firejail --noprofile --private-tmp /usr/lib/firejail/fgit-install.sh" | ||
62 | EUID_ASSERT(); | ||
63 | EUID_ROOT(); | ||
64 | |||
65 | // install a mount namespace with a tmpfs on top of /tmp | ||
66 | sbox_ns(); | ||
67 | |||
68 | // run command | ||
69 | const char *cmd = LIBDIR "/firejail/fgit-install.sh"; | ||
70 | int rv = system(cmd); | ||
71 | (void) rv; | ||
72 | exit(0); | ||
73 | } | ||
74 | |||
75 | void git_uninstall(void) { | ||
76 | // redirect to "/usr/bin/firejail --noprofile --private-tmp /usr/lib/firejail/fgit-install.sh" | ||
77 | EUID_ASSERT(); | ||
78 | EUID_ROOT(); | ||
79 | |||
80 | // install a mount namespace with a tmpfs on top of /tmp | ||
81 | sbox_ns(); | ||
82 | |||
83 | // run command | ||
84 | const char *cmd = LIBDIR "/firejail/fgit-uninstall.sh"; | ||
85 | int rv = system(cmd); | ||
86 | (void) rv; | ||
87 | exit(0); | ||
88 | } | ||
89 | |||
90 | #endif // HAVE_GIT_INSTALL | ||
diff --git a/src/firejail/main.c b/src/firejail/main.c index 0d53a24a8..f34d2eb79 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -890,15 +890,6 @@ int main(int argc, char **argv) { | |||
890 | profile_add(cmd); | 890 | profile_add(cmd); |
891 | } | 891 | } |
892 | 892 | ||
893 | |||
894 | #ifdef HAVE_GIT_INSTALL | ||
895 | // process git-install and git-uninstall | ||
896 | if (check_arg(argc, argv, "--git-install", 1)) | ||
897 | git_install(); // this function will not return | ||
898 | if (check_arg(argc, argv, "--git-uninstall", 1)) | ||
899 | git_uninstall(); // this function will not return | ||
900 | #endif | ||
901 | |||
902 | // profile builder | 893 | // profile builder |
903 | if (check_arg(argc, argv, "--build", 0)) // supports both --build and --build=filename | 894 | if (check_arg(argc, argv, "--build", 0)) // supports both --build and --build=filename |
904 | run_builder(argc, argv); // this function will not return | 895 | run_builder(argc, argv); // this function will not return |
diff --git a/src/firejail/usage.c b/src/firejail/usage.c index 542747efc..effbf3751 100644 --- a/src/firejail/usage.c +++ b/src/firejail/usage.c | |||
@@ -78,11 +78,6 @@ static char *usage_str = | |||
78 | " --env=name=value - set environment variable.\n" | 78 | " --env=name=value - set environment variable.\n" |
79 | " --fs.print=name|pid - print the filesystem log.\n" | 79 | " --fs.print=name|pid - print the filesystem log.\n" |
80 | " --get=name|pid filename - get a file from sandbox container.\n" | 80 | " --get=name|pid filename - get a file from sandbox container.\n" |
81 | #ifdef HAVE_GIT_INSTALL | ||
82 | " --git-install - download, compile and install mainline git version\n" | ||
83 | "\tof Firejail.\n" | ||
84 | " --git-uninstall - uninstall mainline git version of Firejail\n" | ||
85 | #endif | ||
86 | " --help, -? - this help screen.\n" | 81 | " --help, -? - this help screen.\n" |
87 | " --hostname=name - set sandbox hostname.\n" | 82 | " --hostname=name - set sandbox hostname.\n" |
88 | " --hosts-file=file - use file as /etc/hosts.\n" | 83 | " --hosts-file=file - use file as /etc/hosts.\n" |
diff --git a/src/man/firejail.txt b/src/man/firejail.txt index 85550e576..d89a763a9 100644 --- a/src/man/firejail.txt +++ b/src/man/firejail.txt | |||
@@ -493,39 +493,6 @@ $ firejail \-\-fs.print=3272 | |||
493 | \fB\-\-get=name|pid filename | 493 | \fB\-\-get=name|pid filename |
494 | Get a file from sandbox container, see \fBFILE TRANSFER\fR section for more details. | 494 | Get a file from sandbox container, see \fBFILE TRANSFER\fR section for more details. |
495 | 495 | ||
496 | |||
497 | .TP | ||
498 | \fB\-\-git-install | ||
499 | Download, compile and install mainline git version of Firejail from the official repository on GitHub. | ||
500 | The software is installed in /usr/local/bin, and takes precedence over the (old) version | ||
501 | installed in /usr/bin. If for any reason the new version doesn't work, the user can uninstall it | ||
502 | using \-\-git-uninstall command and revert to the old version. | ||
503 | .br | ||
504 | |||
505 | .br | ||
506 | Prerequisites: git and compile support are required for this command to work. On Debian/Ubuntu | ||
507 | systems this support is installed using "sudo apt-get install build-essential git". | ||
508 | .br | ||
509 | |||
510 | .br | ||
511 | Example: | ||
512 | .br | ||
513 | |||
514 | .br | ||
515 | $ firejail \-\-git-install | ||
516 | |||
517 | .TP | ||
518 | \fB\-\-git-uninstall | ||
519 | Remove the Firejail version previously installed in /usr/local/bin using \-\-git-install command. | ||
520 | .br | ||
521 | |||
522 | .br | ||
523 | Example: | ||
524 | .br | ||
525 | |||
526 | .br | ||
527 | $ firejail \-\-git-uninstall | ||
528 | |||
529 | .TP | 496 | .TP |
530 | \fB\-?\fR, \fB\-\-help\fR | 497 | \fB\-?\fR, \fB\-\-help\fR |
531 | Print options end exit. | 498 | Print options end exit. |
diff --git a/test/root/git.exp b/test/root/git.exp deleted file mode 100755 index c5ddeee89..000000000 --- a/test/root/git.exp +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | |||
8 | |||
9 | send -- "firejail --version\r" | ||
10 | expect { | ||
11 | timeout {puts "TESTING ERROR 1\n";exit} | ||
12 | "git install support is disabled" { puts "TESTING: git support not available in current build\n"; exit} | ||
13 | "git install support is enabled" { puts "git support available\n"} | ||
14 | } | ||
15 | |||
16 | set timeout 120 | ||
17 | send -- "firejail --git-install\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "Cloning into" | ||
21 | } | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "Configuration options" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 4\n";exit} | ||
28 | "src/fseccomp/fseccomp default seccomp" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 5\n";exit} | ||
32 | "Mainline git Firejail version was installed in" | ||
33 | } | ||
34 | after 100 | ||
35 | |||
36 | send -- "firejail --git-uninstall\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 6\n";exit} | ||
39 | "Cloning into" | ||
40 | } | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 7\n";exit} | ||
43 | "Configuration options" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 8\n";exit} | ||
47 | "Firejail mainline git version uninstalled from" | ||
48 | } | ||
49 | after 100 | ||
50 | |||
51 | puts "\nall done\n" | ||
diff --git a/test/root/root.sh b/test/root/root.sh index 4132bc739..4f217b727 100755 --- a/test/root/root.sh +++ b/test/root/root.sh | |||
@@ -77,9 +77,6 @@ echo "TESTING: fs whitelist mnt, opt, media (test/root/whitelist-mnt.exp)" | |||
77 | echo "TESTING: join (test/root/join.exp)" | 77 | echo "TESTING: join (test/root/join.exp)" |
78 | ./join.exp | 78 | ./join.exp |
79 | 79 | ||
80 | echo "TESTING: git-install (test/root/git.exp)" | ||
81 | ./git.exp | ||
82 | |||
83 | echo "TESTING: login-nobody (test/root/login_nobody.exp)" | 80 | echo "TESTING: login-nobody (test/root/login_nobody.exp)" |
84 | ./login_nobody.exp | 81 | ./login_nobody.exp |
85 | 82 | ||