This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ownership of files when running gcc under setuid


Hello,

I'm having a problem that I cannot track down and I'm hoping that there
might be an answer here.  I'm writing a program to allow students submit
programming assignments and have them compiled and run automatically as
part of the submission process.

The student will run a setuid-enabled program, handin, which will copy
the files from his/her space in to mine.  It's written in perl and my
idea is to make a perl "system" call to the appropriate compilation
command.  My difficulty lies with the ownership of the files created as
a result.  Even though the effective UID is the class account right
before the perl system functino call, the ownership of the .o files and
executable is the student's.

If I understand UNIX correctly this should not be, as the files should
be owned by the EUID at the time.  Could anybody comment on this -- or
even better, help me out :-).

Many thanks,
Patrick healy
-- 
   http://garryowen.csisdmz.ul.ie/~healyp/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]