Actually, it depends on the implementation of su. I ended up using the who am i approach but it isn't full proof.
sub whoami { return (split /\s+/, `/bin/who am i`)[0]; }
Jason L. Froebe
No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
In reply to Re^2: (solaris) pbrun and the real user id
by jfroebe
in thread (solaris) pbrun and the real user id
by jfroebe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |