mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
llvm scan
This commit is contained in:
parent
5061532a26
commit
4e22add644
6 changed files with 15 additions and 6 deletions
|
|
@ -184,3 +184,9 @@ deb: dist
|
|||
extras: all
|
||||
$(MAKE) -C extras/firetools
|
||||
|
||||
cppcheck: clean
|
||||
cppcheck --force .
|
||||
|
||||
scan-build: clean
|
||||
scan-build make
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ void fs_logger_print(void) {
|
|||
}
|
||||
|
||||
int rv = chown(RUN_FSLOGGER_FILE, getuid(), getgid());
|
||||
(void) rv; // best effort!
|
||||
rv = chmod(RUN_FSLOGGER_FILE, 0600);
|
||||
(void) rv; // best effort!
|
||||
|
||||
|
|
|
|||
|
|
@ -390,8 +390,10 @@ void fs_whitelist(void) {
|
|||
// mark symbolic links
|
||||
if (is_link(new_name))
|
||||
entry->link = new_name;
|
||||
else
|
||||
else {
|
||||
free(new_name);
|
||||
new_name = NULL;
|
||||
}
|
||||
|
||||
// change file name in entry->data
|
||||
if (strcmp(fname, entry->data + 10) != 0) {
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@ void net_set_mtu(const char *ifname, int mtu) {
|
|||
ifr.ifr_addr.sa_family = AF_INET;
|
||||
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
||||
ifr.ifr_mtu = mtu;
|
||||
if (ioctl(s, SIOCSIFMTU, (caddr_t)&ifr) == 0)
|
||||
mtu = ifr.ifr_mtu;
|
||||
if (ioctl(s, SIOCSIFMTU, (caddr_t)&ifr) != 0)
|
||||
fprintf(stderr, "Warning: cannot set mtu for interface %s\n", ifname);
|
||||
close(s);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -490,9 +490,9 @@ int socket(int domain, int type, int protocol) {
|
|||
|
||||
str = translate(socket_protocol, protocol);
|
||||
if (str == NULL)
|
||||
ptr += sprintf(ptr, "%d", protocol);
|
||||
sprintf(ptr, "%d", protocol);
|
||||
else
|
||||
ptr += sprintf(ptr, "%s", str);
|
||||
sprintf(ptr, "%s", str);
|
||||
|
||||
printf("%s\n", buf);
|
||||
return rv;
|
||||
|
|
|
|||
2
todo
2
todo
|
|
@ -154,4 +154,4 @@ I was messing around with my fstab, and found out that firejail can't have /usr/
|
|||
/dev/mapper/asdf-usr--local /usr/local ext4 defaults,nosuid,noatime,ro 0 2
|
||||
/dev/mapper/asdf-usr--sbin /usr/sbin ext4 defaults,nosuid,,noatime,ro 0 2
|
||||
/dev/mapper/asdf-var /var ext4 discard,noatime,nodev,nosuid 0 2
|
||||
tmpfs /tmp tmpfs noatime,nosuid,nodev,size=2G 0 1
|
||||
tmpfs /tmp tmpfs noatime,nosuid,nodev,size=2G 0 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue