diff options
author | netblue30 <netblue30@protonmail.com> | 2023-03-07 08:30:53 -0500 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2023-03-07 08:30:53 -0500 |
commit | a12601f02aecefd6fde2f227bd3536840f7f7b14 (patch) | |
tree | e35164d4ad8b63157170f355be3e0160eb6f172c /src | |
parent | Run make codespell (diff) | |
download | firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.tar.gz firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.tar.zst firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.zip |
testing
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/network.c | 24 | ||||
-rw-r--r-- | src/firejail/sbox.c | 2 |
2 files changed, 2 insertions, 24 deletions
diff --git a/src/firejail/network.c b/src/firejail/network.c index 0d2d53fca..3da51e195 100644 --- a/src/firejail/network.c +++ b/src/firejail/network.c | |||
@@ -89,30 +89,6 @@ int net_get_mtu(const char *ifname) { | |||
89 | return mtu; | 89 | return mtu; |
90 | } | 90 | } |
91 | 91 | ||
92 | //void net_set_mtu(const char *ifname, int mtu) { | ||
93 | // if (strlen(ifname) > IFNAMSIZ) { | ||
94 | // fprintf(stderr, "Error: invalid network device name %s\n", ifname); | ||
95 | // exit(1); | ||
96 | // } | ||
97 | // | ||
98 | // if (arg_debug) | ||
99 | // printf("set interface %s MTU %d.\n", ifname, mtu); | ||
100 | // | ||
101 | // int s; | ||
102 | // struct ifreq ifr; | ||
103 | // | ||
104 | // if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) | ||
105 | // errExit("socket"); | ||
106 | // | ||
107 | // memset(&ifr, 0, sizeof(ifr)); | ||
108 | // ifr.ifr_addr.sa_family = AF_INET; | ||
109 | // strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); | ||
110 | // ifr.ifr_mtu = mtu; | ||
111 | // if (ioctl(s, SIOCSIFMTU, (caddr_t)&ifr) != 0) | ||
112 | // fwarning("cannot set mtu for interface %s\n", ifname); | ||
113 | // close(s); | ||
114 | //} | ||
115 | |||
116 | // return -1 if the interface was not found; if the interface was found return 0 and fill in IP address and mask | 92 | // return -1 if the interface was not found; if the interface was found return 0 and fill in IP address and mask |
117 | int net_get_if_addr(const char *bridge, uint32_t *ip, uint32_t *mask, uint8_t mac[6], int *mtu) { | 93 | int net_get_if_addr(const char *bridge, uint32_t *ip, uint32_t *mask, uint8_t mac[6], int *mtu) { |
118 | assert(bridge); | 94 | assert(bridge); |
diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c index 11ea5b036..ce43b4832 100644 --- a/src/firejail/sbox.c +++ b/src/firejail/sbox.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <sys/resource.h> | 26 | #include <sys/resource.h> |
27 | #include <sys/wait.h> | 27 | #include <sys/wait.h> |
28 | #include "../include/seccomp.h" | 28 | #include "../include/seccomp.h" |
29 | #include "../include/gcov_wrapper.h" | ||
29 | 30 | ||
30 | #include <fcntl.h> | 31 | #include <fcntl.h> |
31 | #ifndef O_PATH | 32 | #ifndef O_PATH |
@@ -238,6 +239,7 @@ static int __attribute__((noreturn)) sbox_do_exec_v(unsigned filtermask, char * | |||
238 | fprintf(stderr, "Error: %s is world writable, refusing to execute\n", arg[0]); | 239 | fprintf(stderr, "Error: %s is world writable, refusing to execute\n", arg[0]); |
239 | exit(1); | 240 | exit(1); |
240 | } | 241 | } |
242 | __gcov_dump(); | ||
241 | fexecve(fd, arg, new_environment); | 243 | fexecve(fd, arg, new_environment); |
242 | } else { | 244 | } else { |
243 | assert(0); | 245 | assert(0); |