File permissions, games and GTK



Some time ago someone had been working on a GTK interface to NetHack.

The issue was ownership and permissions on files and not being able to 
setuid/gid from within GTK.

I was reading Stevens 'Advanced Programming in the Unix Environment' and 
stumbled across an interesting solution.  On page 490 Stevens describes 
the creation of a 'file opening server.'  This would be a program whose 
entire function is to open a file and pass te file descriptor itself to 
the calling process (or daemonized to the requesting process.)  The 
result of interest being that the opening process can be setuid and the 
GTK program on the receiving end simply gets an already open file 
descriptor for reading/writing.

Hope this helps.

Leeman Strout
strout etcsupport com





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