mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
calibre-mount-helper: disallow paths that contain /shm/
This commit is contained in:
parent
2532de27fb
commit
b660c352a4
@ -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…
x
Reference in New Issue
Block a user