Re: effective user id
From: Hubble (reiner_at_huober.de)
Date: 11/28/05
- Previous message: Matthieu Gaillet: "Re: Using grep to find a string containing stars"
- In reply to: Hubble: "Re: effective user id"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Nov 2005 04:30:10 -0800
Note from the manual page of bash(1):
If the shell is started with the effective user (group)
id not equal to the real user (group) id, and the -p
option is not supplied, these actions are taken ***and the
effective user id is set to the real user id***.
Since system(1) invokes a shell, in most cases bash on linux
systems, it will reset euid to user1before executing "ls -l". You
must use setuid(geteuid()) before calling system(3).
Hubble.
- Previous message: Matthieu Gaillet: "Re: Using grep to find a string containing stars"
- In reply to: Hubble: "Re: effective user id"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|