diff options
author | smitsohu <smitsohu@gmail.com> | 2018-05-11 00:58:11 +0200 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2018-05-11 00:58:11 +0200 |
commit | 392bedba292d058052157d672129545fdcafdb83 (patch) | |
tree | 9cdd8cc653a0e204441f8a0378dd7e977dad80b3 /src/firejail/pulseaudio.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/pulseaudio.c')
-rw-r--r-- | src/firejail/pulseaudio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firejail/pulseaudio.c b/src/firejail/pulseaudio.c index eaaba86c0..15d44e4cc 100644 --- a/src/firejail/pulseaudio.c +++ b/src/firejail/pulseaudio.c | |||
@@ -178,10 +178,10 @@ void pulseaudio_init(void) { | |||
178 | 178 | ||
179 | // check /proc/self/mountinfo to confirm the mount is ok | 179 | // check /proc/self/mountinfo to confirm the mount is ok |
180 | MountData *mptr = get_last_mount(); | 180 | MountData *mptr = get_last_mount(); |
181 | if (strncmp(mptr->dir, homeusercfg, strlen(homeusercfg)) != 0) | 181 | if (strcmp(mptr->dir, homeusercfg) != 0) |
182 | errLogExit("invalid mount on top of %s (should be %s)\n", mptr->dir, homeusercfg); | 182 | errLogExit("invalid pulseaudio mount"); |
183 | if (strncmp(mptr->fstype, "tmpfs", 5) != 0) | 183 | if (strcmp(mptr->fstype, "tmpfs") != 0) |
184 | errLogExit("invalid mount on top of %s (filesystem type is %s)\n", mptr->dir, mptr->fstype); | 184 | errLogExit("invalid pulseaudio mount"); |
185 | 185 | ||
186 | char *p; | 186 | char *p; |
187 | if (asprintf(&p, "%s/client.conf", homeusercfg) == -1) | 187 | if (asprintf(&p, "%s/client.conf", homeusercfg) == -1) |