[Cvsnt] Getting username

Gary L Peskin garyp at firstech.com
Tue Feb 12 01:36:45 GMT 2002


I use this:

$login = $ENV{'USER'} || getlogin || (getpwuid($<))[0] ||
sprintf("uid#%d",$<);

I don't really know perl but it seems to work.

HTH,
Gary

> -----Original Message-----
> From: cvsnt-admin at cvsnt.org [mailto:cvsnt-admin at cvsnt.org] On 
> Behalf Of Russell Brasser
> Sent: Monday, February 11, 2002 3:24 PM
> To: cvsnt at cvsnt.org
> Subject: [Cvsnt] Getting username
> 
> 
> Hello,
> 
>     I am running a perl script to log checkins and send 
> notifications. In thi script I am using a standard way of 
> getting the username so that the logs/e-mails can reflect who 
> checked what in.
> 
> When checking in locally, everything works fine. However, 
> when I check in using the pserver (even if it is in 
> "impersonation" mode) the username always says SYSTEM.
> 
> Any suggestions?
> 
> Thanks
> -Russ
> 
> 
> _______________________________________________
> Cvsnt mailing list
> Cvsnt at cvsnt.org http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt
> 

_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt



More information about the cvsnt mailing list