diff options
author | 2018-05-11 00:58:11 +0200 | |
---|---|---|
committer | 2018-05-11 00:58:11 +0200 | |
commit | 392bedba292d058052157d672129545fdcafdb83 (patch) | |
tree | 9cdd8cc653a0e204441f8a0378dd7e977dad80b3 /src/firejail/x11.c | |
parent | Merge branch 'master' of https://github.com/netblue30/firejail (diff) | |
download | firejail-392bedba292d058052157d672129545fdcafdb83.tar.gz firejail-392bedba292d058052157d672129545fdcafdb83.tar.zst firejail-392bedba292d058052157d672129545fdcafdb83.zip |
harden read-write mounts, cleanup
Diffstat (limited to 'src/firejail/x11.c')
-rw-r--r-- | src/firejail/x11.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/firejail/x11.c b/src/firejail/x11.c index 0eace3215..ec8775370 100644 --- a/src/firejail/x11.c +++ b/src/firejail/x11.c | |||
@@ -1196,10 +1196,11 @@ void x11_xorg(void) { | |||
1196 | 1196 | ||
1197 | // check /proc/self/mountinfo to confirm the mount is ok | 1197 | // check /proc/self/mountinfo to confirm the mount is ok |
1198 | MountData *mptr = get_last_mount(); | 1198 | MountData *mptr = get_last_mount(); |
1199 | if (strncmp(mptr->dir, dest, strlen(dest)) != 0) | 1199 | if (strcmp(mptr->dir, dest) != 0) |
1200 | errLogExit("invalid mount on top of %s (should be %s)\n", mptr->dir, dest); | 1200 | errLogExit("invalid .Xauthority mount"); |
1201 | if (strncmp(mptr->fstype, "tmpfs", 5) != 0) | 1201 | if (strcmp(mptr->fstype, "tmpfs") != 0) |
1202 | errLogExit("invalid mount on top of %s (filesystem type is %s)\n", mptr->dir, mptr->fstype); | 1202 | errLogExit("invalid .Xauthority mount"); |
1203 | |||
1203 | free(dest); | 1204 | free(dest); |
1204 | #endif | 1205 | #endif |
1205 | } | 1206 | } |