Skip to content

Commit

Permalink
Merge pull request #1854 from melvinvermeeren/master
Browse files Browse the repository at this point in the history
add --noautopulse arg for complex pulse setups
  • Loading branch information
netblue30 authored Apr 2, 2018
2 parents c38d28f + 617ff40 commit 05bddb5
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELNOTES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
firejail (0.9.53) baseline; urgency=low
* work in progress
* add --noautopulse to disable automatic ~/.config/pulse (for complex setups)
* modif: support for private-bin, private-lib and shell none has been
disabled while running AppImage archives in order to be able to use
our regular profile files with AppImages.
Expand Down
1 change: 1 addition & 0 deletions src/firejail/firejail.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ extern int arg_private_lib; // private lib directory
extern int arg_scan; // arp-scan all interfaces
extern int arg_whitelist; // whitelist commad
extern int arg_nosound; // disable sound
extern int arg_noautopulse; // disable automatic ~/.config/pulse init
extern int arg_novideo; //disable video devices in /dev
extern int arg_no3d; // disable 3d hardware acceleration
extern int arg_quiet; // no output for scripting
Expand Down
3 changes: 3 additions & 0 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int arg_private_lib = 0; // private lib directory
int arg_scan = 0; // arp-scan all interfaces
int arg_whitelist = 0; // whitelist commad
int arg_nosound = 0; // disable sound
int arg_noautopulse = 0; // disable automatic ~/.config/pulse init
int arg_novideo = 0; //disable video devices in /dev
int arg_no3d; // disable 3d hardware acceleration
int arg_quiet = 0; // no output for scripting
Expand Down Expand Up @@ -1727,6 +1728,8 @@ int main(int argc, char **argv) {
env_store(argv[i] + 8, RMENV);
else if (strcmp(argv[i], "--nosound") == 0)
arg_nosound = 1;
else if (strcmp(argv[i], "--noautopulse") == 0)
arg_noautopulse = 1;
else if (strcmp(argv[i], "--novideo") == 0)
arg_novideo = 1;
else if (strcmp(argv[i], "--no3d") == 0)
Expand Down
4 changes: 4 additions & 0 deletions src/firejail/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
arg_nosound = 1;
return 0;
}
else if (strcmp(ptr, "noautopulse") == 0) {
arg_noautopulse = 1;
return 0;
}
else if (strcmp(ptr, "notv") == 0) {
arg_notv = 1;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/firejail/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ int sandbox(void* sandbox_arg) {
// disable /dev/snd
fs_dev_disable_sound();
}
else
else if (!arg_noautopulse)
pulseaudio_init();

if (arg_no3d)
Expand Down
1 change: 1 addition & 0 deletions src/firejail/usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void usage(void) {
printf(" --noroot - install a user namespace with only the current user.\n");
#endif
printf(" --nosound - disable sound system.\n");
printf(" --noautopulse - disable automatic ~/.config/pulse init.\n");
printf(" --novideo - disable video devices.\n");
printf(" --nowhitelist=filename - disable whitelist for file or directory .\n");
printf(" --output=logfile - stdout logging and log rotation.\n");
Expand Down
4 changes: 4 additions & 0 deletions src/man/firejail-profile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ Enable IPC namespace.
\fBnosound
Disable sound system.
.TP
\fBnoautopulse
Disable automatic ~/.config/pulse init, for complex setups such as remote
pulse servers or non-standard socket paths.
.TP
\fBnotv
Disable DVB (Digital Video Broadcasting) TV devices.
.TP
Expand Down
11 changes: 11 additions & 0 deletions src/man/firejail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,17 @@ Example:
.br
$ firejail \-\-nosound firefox

.TP
\fB\-\-noautopulse
Disable automatic ~/.config/pulse init, for complex setups such as remote
pulse servers or non-standard socket paths.
.br

.br
Example:
.br
$ firejail \-\-noautopulse firefox

.TP
\fB\-\-notv
Disable DVB (Digital Video Broadcasting) TV devices.
Expand Down

0 comments on commit 05bddb5

Please sign in to comment.