unsigned long xflag;
unsigned long mask;
char * data;
+ char * data_parsed;
};
struct Options {
unsigned long const xflag;
bool const is_dflt;
} const FSTAB_OPTIONS[] = {
- { "defaults", 0, (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|
+ { "defaults", MS_NODEV, (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|
MS_SYNCHRONOUS), 0, false },
{ "rbind", MS_BIND|MS_REC, MS_BIND|MS_REC, 0, false },
{ "bind", MS_BIND, MS_BIND, 0, false },
goto err0;
}
- if (flock(fd, LOCK_EX)==-1) {
- perror("secure-mount: flock()");
+ if (lockf(fd, F_LOCK, 0)==-1) {
+ perror("secure-mount: lockf()");
goto err1;
}
if (canHandleInternal(mnt)) {
if (mount(mnt->src, ".",
mnt->type ? mnt->type : "",
- mnt->flag, mnt->data)==-1) {
+ mnt->flag, mnt->data_parsed)==-1) {
perror("secure-mount: mount()");
return false;
}
} while (*ptr!='\0');
- info->data = data;
+ info->data_parsed = data;
return true;
}
default :
WRITE_MSG(2, "Try '");
WRITE_STR(2, argv[0]);
- WRITE_MSG(2, " --help\" for more information.\n");
+ WRITE_MSG(2, " --help' for more information.\n");
return EXIT_FAILURE;
break;
}