V
vimala
Hi,
I have to write a setuid program which is going to check for
accesslogs based on the real user who had invoked the executable.
I need to get the real and effective user-ids of the system
and based on the real user-id i need to filter logs only for that
user and give it for further activity. My idea was to get the real
userid, groupid and search for a pattern x:userid:groupid in the
/etc/password file. But again that involves fork, exec, write the
result to some file etc.....
Instead of doing all that is there any other way of getting
all this done???
-kellogy
I have to write a setuid program which is going to check for
accesslogs based on the real user who had invoked the executable.
I need to get the real and effective user-ids of the system
and based on the real user-id i need to filter logs only for that
user and give it for further activity. My idea was to get the real
userid, groupid and search for a pattern x:userid:groupid in the
/etc/password file. But again that involves fork, exec, write the
result to some file etc.....
Instead of doing all that is there any other way of getting
all this done???
-kellogy