IRC channel logs

2021-09-10.log

back to list of logs

<dhruvin>hello guile!
<dhruvin>I'm a beginner to guile. I'm running a guile script as root. Is there a way to run a section of it as some other user? Something like (with-uid <uid-of-some-user> ...)?
<xiews>Will it work if you login as another user?
<flatwhatson>dhruvin: setgid/setuid: https://www.gnu.org/software/guile/manual/html_node/Processes.html
<flatwhatson>you can use these to drop privileges, but not to get back again. if you want to keep root privs, you would need to make a fork and drop privs inside the child, while retaining them in the parent
<dhruvin>xiews: Context: I'm building a guix image for sourcehut builder. I created a shepherd-service which runs as root (runs my guile code) to configure the build user. I could not use setuid because I couldn't setuid back to root.
<dhruvin>flatwhatson: ^
<flatwhatson>yeah it's not possible to setuid back, so you need a different approach (eg. fork)
<dhruvin>flatwhatson: Okay, I'll read more about fork and dropping privilages. Thanks :)
<lloda>civodul: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=221203b0df6420b0b8e7678fab7d056325364731
<civodul>lloda: oh cool, thanks!
<zap>Hello guilers!
<zap>regarding the embedding discussion and guile's support for other languages. It sounds very exiting but I always wondered whether it is practically possible to have solid support for e.g. python, cause its carryig a lot of bagage with it, and from the first glance cost of maintaining python on top of guile vm outweights the benefits.
<zap>And in general Im curious about who are the audience of packages like python-on-guile, or in other words what is the primary usecase?
<zap>Oh man it was yesterday. Weechat doesn't scroll down the history automatically
<mwette>I view use case for extension languages in guile is providing the capability to write extension code for a specific application. I'm doubtful exact conormance (e.g., to javascript) is possible.
<mwette>In my nyacc package, I've been playing with implementing extension languages. I use nx- prefix to mean "nyacc extension" or "not exactly". The nxdev branch has many incomplete ones: https://git.savannah.nongnu.org/cgit/nyacc.git/tree/examples/nyacc/lang, but javascript and mlang are somewhat usable.
<dsmith-work>Happy Friday, Guilers!!
<mwette>Yes. Have a good day.
<chrislck>is it possible to link gnucash-cli without any gtk?
<stis>Hi guilers!