Changed perm/temp permission logic
This commit is contained in:
20
src/main.c
20
src/main.c
@@ -31,10 +31,10 @@ int main(int argc, char *argv[]) {
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
||||
"the permanent permissions database] <ICFS "
|
||||
"arguments>\n\t--no-perm-on-create - do not give permanent "
|
||||
"permissions to files a process creates automatically "
|
||||
"(incompatible with --temp-on-create)\n\t--temp-on-create "
|
||||
"- give temporary permissions to files a process creates "
|
||||
"arguments>\n\t--no-perm-on-create - reqire access "
|
||||
"permissions to create new files "
|
||||
"(incompatible with --perm-on-create)\n\t--perm-on-create "
|
||||
"- give permanent permissions to files a process creates "
|
||||
"automatically (incompatible with --no-perm-on-create)\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -45,10 +45,10 @@ int main(int argc, char *argv[]) {
|
||||
0 == strcmp(argv[argc - 1], "--temp-on-create"))) {
|
||||
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
||||
"the permanent permissions database] <ICFS "
|
||||
"arguments>\n\t--no-perm-on-create - do not give permanent "
|
||||
"permissions to files a process creates automatically "
|
||||
"(incompatible with --temp-on-create)\n\t--temp-on-create "
|
||||
"- give temporary permissions to files a process creates "
|
||||
"arguments>\n\t--no-perm-on-create - reqire access "
|
||||
"permissions to create new files"
|
||||
"(incompatible with --temp-on-create)\n\t--perm-on-create "
|
||||
"- give permanent permissions to files a process creates "
|
||||
"automatically (incompatible with --no-perm-on-create)\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -61,8 +61,8 @@ int main(int argc, char *argv[]) {
|
||||
set_auto_create_perm(0);
|
||||
argc--;
|
||||
}
|
||||
if (0 == strcmp(argv[argc - 1], "--temp-on-create")) {
|
||||
set_auto_create_perm(GRANT_TEMP);
|
||||
if (0 == strcmp(argv[argc - 1], "--perm-on-create")) {
|
||||
set_auto_create_perm(GRANT_PERM);
|
||||
argc--;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user