ownership of files when running gcc under setuid

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

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux