apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: proposal: apr_get_username()
Date Fri, 27 Jul 2001 05:25:10 GMT
From: "Ben Collins-Sussman" <sussman@collab.net>
Sent: Thursday, July 26, 2001 3:42 PM

> I need to get the char *username of the person running the current
> process.  I looked in apr_user.h, and see routines for converting
> back-and-forth between apr_uid_t and char *username -- but no routines
> for fetching either one!
> If it's okay with people, I'd like to add apr_get_username().  I can
> implement the Unix part by calling getuid().  But somebody else would
> need to write the win32 equivalent.

Well... which exactly do you want, the security context (user, primary group)
of the executing thread, or the process context?  Be warned, the child thread
once impersonating 'nobody' might not be able to ask that about the process.

I have the this-thread implementation ready, if you were thinking in that 
direction.  If not, it's a two line change.


View raw message