Re: file handling with fopen() and fclose()



Hi,

John Breen <locutus borg apana org au> writes:

> > Also, note that /etc/shadow is probably only readable by root - which means
> > that you're in for *LOADS* of security fun (you get to run set-UID, or
> > run as root, or figure out how to use PAM on systems that support it).
> 
> the code's been compiled, and then
> 
> chgrp shadow executable
> chmod g+s executable
> 
> which means that the app will be run if by a member of the shadow group,
> which is the group on /etc/shadow, and has read-access to /etc/shadow.  

which is actually a very bad idea for a GUI application. You can as
well make /etc/shadow world-readable then. See http://gtk.org/setuid.html.
GTK+-2.0 will even refuse to run if you make the executable setuid or
setgid.


Salut, Sven



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