Fix bug related to current working dir and allow writes
Allow writes due to "save copy" functionality and also to save settings.
This commit is contained in:
2
qssb.h
2
qssb.h
Submodule qssb.h updated: 7547644013...60776be416
@ -472,7 +472,7 @@ int main(int argc, char** argv)
|
|||||||
//break it? only allow "reasonable" paths? (which would that be?)
|
//break it? only allow "reasonable" paths? (which would that be?)
|
||||||
struct qssb_path_policy root_policy;
|
struct qssb_path_policy root_policy;
|
||||||
root_policy.mountpoint = "/";
|
root_policy.mountpoint = "/";
|
||||||
root_policy.policy = QSSB_MOUNT_ALLOW_READ | QSSB_MOUNT_ALLOW_EXEC;
|
root_policy.policy = QSSB_MOUNT_ALLOW_READ | QSSB_MOUNT_ALLOW_EXEC | QSSB_MOUNT_ALLOW_WRITE;
|
||||||
root_policy.next = &data_dir_policy;
|
root_policy.next = &data_dir_policy;
|
||||||
|
|
||||||
data_dir_policy.mountpoint = data_dir;
|
data_dir_policy.mountpoint = data_dir;
|
||||||
@ -484,6 +484,8 @@ int main(int argc, char** argv)
|
|||||||
config_dir_policy.next = NULL;
|
config_dir_policy.next = NULL;
|
||||||
|
|
||||||
policy->path_policies = &root_policy;
|
policy->path_policies = &root_policy;
|
||||||
|
char *cwd = get_current_dir_name();
|
||||||
|
policy->chdir_path = cwd;
|
||||||
|
|
||||||
//a pdfreader has no business accessing the network
|
//a pdfreader has no business accessing the network
|
||||||
policy->namespace_options |= QSSB_UNSHARE_NETWORK;
|
policy->namespace_options |= QSSB_UNSHARE_NETWORK;
|
||||||
@ -493,8 +495,7 @@ int main(int argc, char** argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(cwd);
|
||||||
|
|
||||||
qRegisterMetaType< QList< QRectF > >("QList<QRectF>");
|
qRegisterMetaType< QList< QRectF > >("QList<QRectF>");
|
||||||
qRegisterMetaType< Rotation >("Rotation");
|
qRegisterMetaType< Rotation >("Rotation");
|
||||||
qRegisterMetaType< RenderParam >("RenderParam");
|
qRegisterMetaType< RenderParam >("RenderParam");
|
||||||
|
Reference in New Issue
Block a user