Compare commits
No commits in common. "5dff492663719ac687e682db5010fe360ad533a6" and "6423e3b2ef7fef387c6f8a5f03bfa24e2b30907e" have entirely different histories.
5dff492663
...
6423e3b2ef
@ -468,11 +468,9 @@ static int xmp_create(const char *path, mode_t mode,
|
|||||||
|
|
||||||
// fprintf(stderr, "%s, %d\n", path, ask_access(path, pi));
|
// fprintf(stderr, "%s, %d\n", path, ask_access(path, pi));
|
||||||
|
|
||||||
if (auto_create_perm != 0) {
|
if (!interactive_access(path, pi, auto_create_perm)) {
|
||||||
if (!interactive_access(path, pi, auto_create_perm)) {
|
free(pi.name);
|
||||||
free(pi.name);
|
return -EACCES;
|
||||||
return -EACCES;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pi.name);
|
free(pi.name);
|
||||||
|
@ -143,9 +143,6 @@ int main(int argc, char **argv) {
|
|||||||
fprintf(stdout, "icfs_dialogue 1.0.0");
|
fprintf(stdout, "icfs_dialogue 1.0.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable accessibility features to prevent attacks
|
|
||||||
g_setenv("NO_AT_BRIDGE", "1", TRUE);
|
|
||||||
|
|
||||||
// Create a new application
|
// Create a new application
|
||||||
AdwApplication *app = adw_application_new("de.umbrasolis.icfs_dialogue",
|
AdwApplication *app = adw_application_new("de.umbrasolis.icfs_dialogue",
|
||||||
G_APPLICATION_HANDLES_COMMAND_LINE);
|
G_APPLICATION_HANDLES_COMMAND_LINE);
|
||||||
|
20
src/main.c
20
src/main.c
@ -31,12 +31,11 @@ int main(int argc, char *argv[]) {
|
|||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
||||||
"the permanent permissions database] <ICFS "
|
"the permanent permissions database] <ICFS "
|
||||||
"arguments>\n\t--no-perm-on-create - do not give any "
|
"arguments>\n\t--no-perm-on-create - reqire access "
|
||||||
"access permissions on file creation"
|
"permissions to create new files "
|
||||||
"(incompatible with --temp-on-create)\n\t--perm-on-create "
|
"(incompatible with --perm-on-create)\n\t--perm-on-create "
|
||||||
"- automatically give permanent access permission to files "
|
"- give permanent permissions to files a process creates "
|
||||||
"a process creates "
|
"automatically (incompatible with --no-perm-on-create)\n");
|
||||||
"(incompatible with --no-perm-on-create)\n");
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,12 +45,11 @@ int main(int argc, char *argv[]) {
|
|||||||
0 == strcmp(argv[argc - 1], "--temp-on-create"))) {
|
0 == strcmp(argv[argc - 1], "--temp-on-create"))) {
|
||||||
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
fprintf(stderr, "Usage: icfs <FUSE arguments> [target directory] [path to "
|
||||||
"the permanent permissions database] <ICFS "
|
"the permanent permissions database] <ICFS "
|
||||||
"arguments>\n\t--no-perm-on-create - do not give any "
|
"arguments>\n\t--no-perm-on-create - reqire access "
|
||||||
"access permissions on file creation"
|
"permissions to create new files"
|
||||||
"(incompatible with --temp-on-create)\n\t--perm-on-create "
|
"(incompatible with --temp-on-create)\n\t--perm-on-create "
|
||||||
"- automatically give permanent access permission to files "
|
"- give permanent permissions to files a process creates "
|
||||||
"a process creates "
|
"automatically (incompatible with --no-perm-on-create)\n");
|
||||||
"(incompatible with --no-perm-on-create)\n");
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,8 +59,6 @@ fi
|
|||||||
|
|
||||||
#valgrind -s ../build/icfs -o default_permissions ./protected &
|
#valgrind -s ../build/icfs -o default_permissions ./protected &
|
||||||
|
|
||||||
echo "[ICFS-TEST]: You may see memory errors from valgrind at this stage. This is normal - memory isn't lost, the libfuse just forked the process."
|
|
||||||
|
|
||||||
# WARN: please don't use `>` or `>>` operators. They force **this script** to open the file, **not the program you are trying to run**. This is probably not what you mean when you want to test a specific program's access.
|
# WARN: please don't use `>` or `>>` operators. They force **this script** to open the file, **not the program you are trying to run**. This is probably not what you mean when you want to test a specific program's access.
|
||||||
# WARN: avoid using touch, since it generates errors because setting times is not implemented in icfs **yet**.
|
# WARN: avoid using touch, since it generates errors because setting times is not implemented in icfs **yet**.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user