Groups
Sign in
Groups
SWI-Prolog
Conversations
Labels
About
Send feedback
Help
Pengine - Error: No permission to call sandboxed `name(_G1513,_G1514)'
410 views
Pengines
SWI-Prolog
Skip to first unread message
dagobi
unread,
Sep 21, 2016, 2:32:07 AM
9/21/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWI-Prolog
Got this error with a program (loaded on pengine) that calls name/2.
How to declare system-defined predicates like name/2 safe for the sandbox?
Thanks much in advance.
-- dagobi
dagobi
unread,
Sep 21, 2016, 2:40:17 AM
9/21/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWI-Prolog
A simple example would be to add a call to name/2 in
genealogist.pl
of the GUI example
http://www.swi-prolog.org/pengines/GenealogistGUI.txt
, something like
ancestor_decendant(X, Y) :- parent_child(X, Y), name(X,Z).
Then you'd get the sandbox error when ancestor_decendant(X, Y) is asked.
Jan Wielemaker
unread,
Sep 21, 2016, 3:01:55 AM
9/21/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dagobi, SWI-Prolog
You can redefine (non-ISO) system predicates by defining them before using
them. See
http://swish.swi-prolog.org/p/CjGVbTCX.pl
safe_goal/1 is executed on the loaded source and just follows the same
resolution for predicates as execution.
When defining after use your code will resolve to system:name/2.
system:name/2 was not in the safe list. Added, but it will still not
work correctly.
Cheers --- Jan
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swi-prolog+...@googlegroups.com
> <mailto:
swi-prolog+...@googlegroups.com
>.
> Visit this group at
https://groups.google.com/group/swi-prolog
.
> For more options, visit
https://groups.google.com/d/optout
.
dagobi
unread,
Sep 29, 2016, 12:09:51 AM
9/29/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWI-Prolog, zack...@gmail.com
Thanks Jan. We decided to replace name/2 with atom_codes/2.
> <mailto:
swi-prolog+unsub...@googlegroups.com
>.
Reply all
Reply to author
Forward
0 new messages