get effective and real user names in a setuid program in linux
From: vimala (vimala_at_ncb.ernet.in)
Date: 07/31/03
- Next message: Mike Cocker: "Re: Linux (Samba) New Guy"
- Previous message: Doug Laidlaw: "Re: Neighbor Tanning Nude 759"
- Next in thread: Lew Pitcher: "Re: get effective and real user names in a setuid program in linux"
- Reply: Lew Pitcher: "Re: get effective and real user names in a setuid program in linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Jul 2003 04:42:12 -0700
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
- Next message: Mike Cocker: "Re: Linux (Samba) New Guy"
- Previous message: Doug Laidlaw: "Re: Neighbor Tanning Nude 759"
- Next in thread: Lew Pitcher: "Re: get effective and real user names in a setuid program in linux"
- Reply: Lew Pitcher: "Re: get effective and real user names in a setuid program in linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]