• tcllibc in a safe interpreter

    From Julian H J Loaring@21:1/5 to All on Wed Apr 20 13:12:14 2022
    I have built tcllib.dylib using critcl but I cannot load it into a Safe Interpreter because there is no Tcllibc_SafeInit entry point.

    Is there a way to do this in critcl or should I dust of my C programming skills and try to roll my own DLL?

    All help welcome :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From apn@21:1/5 to Julian H J Loaring on Fri Apr 22 16:28:15 2022
    On 4/21/2022 1:42 AM, Julian H J Loaring wrote:
    I have built tcllib.dylib using critcl but I cannot load it into a Safe Interpreter because there is no Tcllibc_SafeInit entry point.

    Is there a way to do this in critcl or should I dust of my C programming skills and try to roll my own DLL?

    All help welcome :)


    I'm afraid I don't know the direct answer to your question. However I
    would suggest that instead of adding a Tcllibc_SafeInit entry point (if
    there isn't one), you instead load tcllibc into your (unsafe) master and
    then alias the specific commands you need into the safe slave taking
    care that those commands are indeed safe to run within untrusted code.

    tcllib is pretty big and includes various system access procedures
    ranging from file access, process kills etc. I'm not sure how much of
    that is covered by tcllibc but I would guess the range of commands in
    tcllib is why a Tcllibc_SafeInit is not provided; many commands may not
    be appropriate for inclusion into a safe interp.

    /Ashok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian H J Loaring@21:1/5 to apn on Fri Apr 22 14:10:27 2022
    On Friday, 22 April 2022 at 11:58:20 UTC+1, apn wrote:
    On 4/21/2022 1:42 AM, Julian H J Loaring wrote:
    I have built tcllib.dylib using critcl but I cannot load it into a Safe Interpreter because there is no Tcllibc_SafeInit entry point.

    Is there a way to do this in critcl or should I dust of my C programming skills and try to roll my own DLL?

    All help welcome :)

    I'm afraid I don't know the direct answer to your question. However I
    would suggest that instead of adding a Tcllibc_SafeInit entry point (if
    there isn't one), you instead load tcllibc into your (unsafe) master and
    then alias the specific commands you need into the safe slave taking
    care that those commands are indeed safe to run within untrusted code.

    tcllib is pretty big and includes various system access procedures
    ranging from file access, process kills etc. I'm not sure how much of
    that is covered by tcllibc but I would guess the range of commands in
    tcllib is why a Tcllibc_SafeInit is not provided; many commands may not
    be appropriate for inclusion into a safe interp.

    /Ashok
    Thank you, I think you are right.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)