mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 05:48:28 +01:00
calibre-mount-helper: disallow paths that contain /shm/
This commit is contained in:
parent
2532de27fb
commit
b660c352a4
1 changed files with 6 additions and 0 deletions
|
|
@ -260,10 +260,16 @@ void check_dev(const char *dev) {
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (strstr(dev, "/shm/") != NULL) {
|
||||
fprintf(stderr, "naughty, naughty!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!S_ISBLK(file_info.st_mode)) {
|
||||
fprintf(stderr, "dev node is not a block device\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
|||
Loading…
Reference in a new issue