diff options
-rw-r--r-- | etc/inc/disable-programs.inc | 5 | ||||
-rw-r--r-- | etc/profile-a-l/gallery-dl.profile | 17 | ||||
-rw-r--r-- | etc/profile-m-z/youtube-viewers-common.profile | 2 | ||||
-rw-r--r-- | etc/profile-m-z/yt-dlp.profile | 18 | ||||
-rw-r--r-- | src/firecfg/firecfg.config | 2 | ||||
-rw-r--r-- | src/firejail/arp.c | 14 |
6 files changed, 53 insertions, 5 deletions
diff --git a/etc/inc/disable-programs.inc b/etc/inc/disable-programs.inc index ea7c2ea82..9de781fb5 100644 --- a/etc/inc/disable-programs.inc +++ b/etc/inc/disable-programs.inc | |||
@@ -234,6 +234,7 @@ blacklist ${HOME}/.config/font-manager | |||
234 | blacklist ${HOME}/.config/freecol | 234 | blacklist ${HOME}/.config/freecol |
235 | blacklist ${HOME}/.config/gajim | 235 | blacklist ${HOME}/.config/gajim |
236 | blacklist ${HOME}/.config/galculator | 236 | blacklist ${HOME}/.config/galculator |
237 | blacklist ${HOME}/.config/gallery-dl | ||
237 | blacklist ${HOME}/.config/gconf | 238 | blacklist ${HOME}/.config/gconf |
238 | blacklist ${HOME}/.config/geany | 239 | blacklist ${HOME}/.config/geany |
239 | blacklist ${HOME}/.config/geary | 240 | blacklist ${HOME}/.config/geary |
@@ -455,6 +456,7 @@ blacklist ${HOME}/.config/youtube-dlg | |||
455 | blacklist ${HOME}/.config/youtube-music-desktop-app | 456 | blacklist ${HOME}/.config/youtube-music-desktop-app |
456 | blacklist ${HOME}/.config/youtube-viewer | 457 | blacklist ${HOME}/.config/youtube-viewer |
457 | blacklist ${HOME}/.config/youtubemusic-nativefier-040164 | 458 | blacklist ${HOME}/.config/youtubemusic-nativefier-040164 |
459 | blacklist ${HOME}/.config/yt-dlp | ||
458 | blacklist ${HOME}/.config/zathura | 460 | blacklist ${HOME}/.config/zathura |
459 | blacklist ${HOME}/.config/zim | 461 | blacklist ${HOME}/.config/zim |
460 | blacklist ${HOME}/.config/zoomus.conf | 462 | blacklist ${HOME}/.config/zoomus.conf |
@@ -492,6 +494,7 @@ blacklist ${HOME}/.freemind | |||
492 | blacklist ${HOME}/.frogatto | 494 | blacklist ${HOME}/.frogatto |
493 | blacklist ${HOME}/.frozen-bubble | 495 | blacklist ${HOME}/.frozen-bubble |
494 | blacklist ${HOME}/.funnyboat | 496 | blacklist ${HOME}/.funnyboat |
497 | blacklist ${HOME}/.gallery-dl.conf | ||
495 | blacklist ${HOME}/.gimp* | 498 | blacklist ${HOME}/.gimp* |
496 | blacklist ${HOME}/.gist | 499 | blacklist ${HOME}/.gist |
497 | blacklist ${HOME}/.gitconfig | 500 | blacklist ${HOME}/.gitconfig |
@@ -940,6 +943,7 @@ blacklist ${HOME}/hyperrogue.ini | |||
940 | blacklist ${HOME}/i2p | 943 | blacklist ${HOME}/i2p |
941 | blacklist ${HOME}/mps | 944 | blacklist ${HOME}/mps |
942 | blacklist ${HOME}/wallet.dat | 945 | blacklist ${HOME}/wallet.dat |
946 | blacklist ${HOME}/yt-dlp.conf | ||
943 | blacklist ${RUNUSER}/*firefox* | 947 | blacklist ${RUNUSER}/*firefox* |
944 | blacklist /tmp/.wine-* | 948 | blacklist /tmp/.wine-* |
945 | blacklist /tmp/akonadi-* | 949 | blacklist /tmp/akonadi-* |
@@ -1119,4 +1123,5 @@ blacklist ${HOME}/.cache/yandex-browser | |||
1119 | blacklist ${HOME}/.cache/yandex-browser-beta | 1123 | blacklist ${HOME}/.cache/yandex-browser-beta |
1120 | blacklist ${HOME}/.cache/youtube-dl | 1124 | blacklist ${HOME}/.cache/youtube-dl |
1121 | blacklist ${HOME}/.cache/youtube-viewer | 1125 | blacklist ${HOME}/.cache/youtube-viewer |
1126 | blacklist ${HOME}/.cache/yt-dlp | ||
1122 | blacklist ${HOME}/.cache/zim | 1127 | blacklist ${HOME}/.cache/zim |
diff --git a/etc/profile-a-l/gallery-dl.profile b/etc/profile-a-l/gallery-dl.profile new file mode 100644 index 000000000..b2f482835 --- /dev/null +++ b/etc/profile-a-l/gallery-dl.profile | |||
@@ -0,0 +1,17 @@ | |||
1 | # Firejail profile for gallery-dl | ||
2 | # Description: Downloader of images from various sites | ||
3 | # This file is overwritten after every install/update | ||
4 | quiet | ||
5 | # Persistent local customizations | ||
6 | include gallery-dl.local | ||
7 | # Persistent global definitions | ||
8 | include globals.local | ||
9 | |||
10 | noblacklist ${HOME}/.config/gallery-dl | ||
11 | noblacklist ${HOME}/.gallery-dl.conf | ||
12 | |||
13 | private-bin gallery-dl | ||
14 | private-etc gallery-dl.conf | ||
15 | |||
16 | # Redirect | ||
17 | include youtube-dl.profile | ||
diff --git a/etc/profile-m-z/youtube-viewers-common.profile b/etc/profile-m-z/youtube-viewers-common.profile index a6d8c164f..a05f05c51 100644 --- a/etc/profile-m-z/youtube-viewers-common.profile +++ b/etc/profile-m-z/youtube-viewers-common.profile | |||
@@ -50,7 +50,7 @@ shell none | |||
50 | tracelog | 50 | tracelog |
51 | 51 | ||
52 | disable-mnt | 52 | disable-mnt |
53 | private-bin bash,ffmpeg,ffprobe,firefox,mpv,perl,python*,sh,smplayer,stty,wget,which,xterm,youtube-dl | 53 | private-bin bash,ffmpeg,ffprobe,firefox,mpv,perl,python*,sh,smplayer,stty,wget,which,xterm,youtube-dl,yt-dlp |
54 | private-cache | 54 | private-cache |
55 | private-dev | 55 | private-dev |
56 | private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,machine-id,mime.types,nsswitch.conf,passwd,pki,pulse,resolv.conf,ssl,X11,xdg | 56 | private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,machine-id,mime.types,nsswitch.conf,passwd,pki,pulse,resolv.conf,ssl,X11,xdg |
diff --git a/etc/profile-m-z/yt-dlp.profile b/etc/profile-m-z/yt-dlp.profile new file mode 100644 index 000000000..ab90c837e --- /dev/null +++ b/etc/profile-m-z/yt-dlp.profile | |||
@@ -0,0 +1,18 @@ | |||
1 | # Firejail profile for yt-dlp | ||
2 | # Description: Downloader of videos of various sites | ||
3 | # This file is overwritten after every install/update | ||
4 | quiet | ||
5 | # Persistent local customizations | ||
6 | include yt-dlp.local | ||
7 | # Persistent global definitions | ||
8 | include globals.local | ||
9 | |||
10 | noblacklist ${HOME}/.cache/yt-dlp | ||
11 | noblacklist ${HOME}/.config/yt-dlp | ||
12 | noblacklist ${HOME}/yt-dlp.conf | ||
13 | |||
14 | private-bin yt-dlp | ||
15 | private-etc yt-dlp.conf | ||
16 | |||
17 | # Redirect | ||
18 | include youtube-dl.profile | ||
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config index 3d05a86ef..698630180 100644 --- a/src/firecfg/firecfg.config +++ b/src/firecfg/firecfg.config | |||
@@ -279,6 +279,7 @@ funnyboat | |||
279 | gajim | 279 | gajim |
280 | gajim-history-manager | 280 | gajim-history-manager |
281 | galculator | 281 | galculator |
282 | gallery-dl | ||
282 | gapplication | 283 | gapplication |
283 | gcalccmd | 284 | gcalccmd |
284 | gcloud | 285 | gcloud |
@@ -909,6 +910,7 @@ youtube-dl | |||
909 | youtube-dl-gui | 910 | youtube-dl-gui |
910 | youtube-viewer | 911 | youtube-viewer |
911 | youtubemusic-nativefier | 912 | youtubemusic-nativefier |
913 | yt-dlp | ||
912 | ytmdesktop | 914 | ytmdesktop |
913 | zaproxy | 915 | zaproxy |
914 | zart | 916 | zart |
diff --git a/src/firejail/arp.c b/src/firejail/arp.c index bbab9a6d9..c259fc0ad 100644 --- a/src/firejail/arp.c +++ b/src/firejail/arp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | #include <sys/socket.h> | 21 | #include <sys/socket.h> |
22 | #include <sys/ioctl.h> | 22 | #include <sys/ioctl.h> |
23 | #include <sys/time.h> | ||
23 | #include <linux/if_ether.h> //TCP/IP Protocol Suite for Linux | 24 | #include <linux/if_ether.h> //TCP/IP Protocol Suite for Linux |
24 | #include <net/if.h> | 25 | #include <net/if.h> |
25 | #include <netinet/in.h> | 26 | #include <netinet/in.h> |
@@ -188,9 +189,14 @@ int arp_check(const char *dev, uint32_t destaddr) { | |||
188 | FD_SET(sock, &fds); | 189 | FD_SET(sock, &fds); |
189 | int maxfd = sock; | 190 | int maxfd = sock; |
190 | struct timeval ts; | 191 | struct timeval ts; |
191 | ts.tv_sec = 0; // 0.5 seconds wait time | 192 | gettimeofday(&ts, NULL); |
192 | ts.tv_usec = 500000; | 193 | double timerend = ts.tv_sec + ts.tv_usec / 1000000.0 + 0.5; |
193 | while (1) { | 194 | while (1) { |
195 | gettimeofday(&ts, NULL); | ||
196 | double now = ts.tv_sec + ts.tv_usec / 1000000.0; | ||
197 | double timeout = timerend - now; | ||
198 | ts.tv_sec = timeout; | ||
199 | ts.tv_usec = (timeout - ts.tv_sec) * 1000000; | ||
194 | int nready = select(maxfd + 1, &fds, (fd_set *) 0, (fd_set *) 0, &ts); | 200 | int nready = select(maxfd + 1, &fds, (fd_set *) 0, (fd_set *) 0, &ts); |
195 | if (nready < 0) | 201 | if (nready < 0) |
196 | errExit("select"); | 202 | errExit("select"); |
@@ -201,8 +207,8 @@ int arp_check(const char *dev, uint32_t destaddr) { | |||
201 | } | 207 | } |
202 | if (sendto (sock, frame, 14 + sizeof(ArpHdr), 0, (struct sockaddr *) &addr, sizeof (addr)) <= 0) | 208 | if (sendto (sock, frame, 14 + sizeof(ArpHdr), 0, (struct sockaddr *) &addr, sizeof (addr)) <= 0) |
203 | errExit("send"); | 209 | errExit("send"); |
204 | ts.tv_sec = 0; // 0.5 seconds wait time | 210 | gettimeofday(&ts, NULL); |
205 | ts.tv_usec = 500000; | 211 | timerend = ts.tv_sec + ts.tv_usec / 1000000.0 + 0.5; |
206 | fflush(0); | 212 | fflush(0); |
207 | } | 213 | } |
208 | else { | 214 | else { |