The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



Thread: seteuid
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-05-2008
moriah moriah is offline
Registered User
 

Join Date: May 2008
Posts: 1
seteuid

I am writing programm that changes permission in the running;
I used at the command : seteuid();
the id of the process is changed but the permission not, why??

The program:
Code:
int status;
pid_t child = fork();
if (child == 0)
{
   seteuid(1200); // I checks that "1200" is exist id process
   execl("......");
}
else wait(&status);
In the Hand Mode :The process "1200" can to exec the command.
but in the this programm It can not.

Last edited by Yogesh Sawant; 05-05-2008 at 06:27 AM. Reason: added code tags
Reply With Quote
Forum Sponsor