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