guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why do the compiler checks .go directory is writeable?


From: rixed
Subject: Why do the compiler checks .go directory is writeable?
Date: Tue, 19 Jun 2012 16:46:20 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

I'm refering to the ensure-writable-dir function.
I've stumbled upon this problem recently : I have a program that's suid root
but calls guile. The guile compiler then creates some directories in
.cache/guile but then check (with access()) that he can write in there, which
he can't since access revoke the effective uid for the caller uid. We thus have
this situation: the compiler creates a bunch of directories then complains he
cannot write in them.

It's not obvious to me why the compiler should ensure a directory is writable
just to throw an error. Wouldn't it be better to just call opens and writes
and let these fails and report these more acurate errors instead (or, in my
case, let them succeed) ?

Or is it a security concern?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]