mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 13:46:01 +01:00
improve feedback
This commit is contained in:
parent
004a35dba1
commit
5ba87e5c72
2 changed files with 17 additions and 2 deletions
|
@ -308,6 +308,11 @@ cmd_save(girara_session_t* session, girara_list_t* argument_list)
|
|||
g_return_val_if_fail(session->global.data != NULL, false);
|
||||
zathura_t* zathura = session->global.data;
|
||||
|
||||
if (zathura->global.sandbox == ZATHURA_SANDBOX_STRICT) {
|
||||
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Saving is not permitted in strict sandbox mode"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (zathura->document == NULL) {
|
||||
girara_notify(session, GIRARA_ERROR, _("No document opened."));
|
||||
return false;
|
||||
|
@ -330,6 +335,11 @@ cmd_savef(girara_session_t* session, girara_list_t* argument_list)
|
|||
g_return_val_if_fail(session->global.data != NULL, false);
|
||||
zathura_t* zathura = session->global.data;
|
||||
|
||||
if (zathura->global.sandbox == ZATHURA_SANDBOX_STRICT) {
|
||||
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Saving is not permitted in strict sandbox mode"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (zathura->document == NULL) {
|
||||
girara_notify(session, GIRARA_ERROR, _("No document opened."));
|
||||
return false;
|
||||
|
@ -426,6 +436,12 @@ cmd_export(girara_session_t* session, girara_list_t* argument_list)
|
|||
g_return_val_if_fail(session != NULL, false);
|
||||
g_return_val_if_fail(session->global.data != NULL, false);
|
||||
zathura_t* zathura = session->global.data;
|
||||
|
||||
if (zathura->global.sandbox == ZATHURA_SANDBOX_STRICT) {
|
||||
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Exporting attachments is not permitted in strict sandbox mode"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (zathura->document == NULL) {
|
||||
girara_notify(session, GIRARA_ERROR, _("No document opened."));
|
||||
return false;
|
||||
|
|
|
@ -203,7 +203,7 @@ seccomp_enable_strict_filter(zathura_t* zathura)
|
|||
/* ALLOW_RULE (open); specified below */
|
||||
/* ALLOW_RULE (openat); specified below */
|
||||
/* ALLOW_RULE(pipe); unused? */
|
||||
/* ALLOW_RULE(pipe2); unused? required by x11, see below */
|
||||
ALLOW_RULE(pipe2);
|
||||
ALLOW_RULE(poll);
|
||||
ALLOW_RULE(pwrite64); /* equals pwrite */
|
||||
ALLOW_RULE(pread64); /* equals pread */
|
||||
|
@ -257,7 +257,6 @@ seccomp_enable_strict_filter(zathura_t* zathura)
|
|||
ALLOW_RULE(setsockopt);
|
||||
ALLOW_RULE(getsockopt);
|
||||
ALLOW_RULE(getsockname);
|
||||
ALLOW_RULE(pipe2);
|
||||
ALLOW_RULE(connect);
|
||||
ALLOW_RULE(umask);
|
||||
ALLOW_RULE(uname);
|
||||
|
|
Loading…
Reference in a new issue