Home
restrain pledge in kiosk mode - clic - Clic is an command line interactive client for gopher written in Common LISP HTML git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit be4bf91b222d03b0de1c9c83ab2afccbfa41dc28 DIR parent 2f63cd38c68eee0baa1493d432a295f4009136af HTML Author: Solene Rapenne <solene@perso.pw> Date: Thu, 21 Jun 2018 10:53:10 +0200 restrain pledge in kiosk mode Diffstat: M clic.lisp | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) --- DIR diff --git a/clic.lisp b/clic.lisp @@ -16,6 +16,10 @@ void gotoPledge() { pledge(\"dns inet stdio rpath tty wpath cpath proc exec\",NULL); } + + void kioskPledge() { + pledge(\"dns inet stdio tty rpath\",NULL); + } #endif int ttyPredicate() { @@ -24,6 +28,9 @@ struct winsize w; return ioctl(1,TIOCGWINSZ,&w)<0?UINT_MAX:w.ws_row;}") (ffi:def-function + ("kioskPledge" c-kiosk-pledge) + () :returning :void) + (ffi:def-function ("gotoPledge" c-pledge) () :returning :void) (ffi:def-function @@ -410,6 +417,7 @@ (quit)) ((string= "-k" url) + (c-kiosk-pledge) (setf *kiosk-mode* t)) ((= 0 (or (search "file://" url) 1))