Andy Fanton
2009-Oct-07 14:47 UTC
[dtrace-discuss] How to determine logged-in user id from syscall probe
Hello All - Does anybody know how I can determine the actual logged in user ID for the process/thread that is making a syscall from within a dtrace syscall probe handler? If I use the dtrace variable curpsinfo->pr_uid or curpsinfo->pr_euid I can obtain the correct UID as long as that user is not SUed to another user or root. If the user is SUed to root, then both the pr_uid and pr_euid values are 0 (for root), and the original logged-in UID is no longer available there. Can someone please help me find another place in some dtrace or kernel data structure that would contain the actual logged-in user ID for when the user is SUed? Maybe somewhere in an audit data structure or something? I''ve spent hours coming the source unsuccessfully. Any help is greatly appreciated !! Thanks! -- This message posted from opensolaris.org