We use a widely available perl script named "activity mail" to send email to developers who commit file to our cvs repository. The script sends a diff attachment with the email. The file name of the attachment is created like this:
filename=$user-@gm5,4,3,2,1,0-diff.txtThe problem is, regardless of who commits files, the $user is ALWAYS "bernie", which is my username on the cvs server. I found that the perl getlogin function always returns "bernie", regardless of who commits files:
my $user = getlogin || getpwuid($<) || "unknown";I bit more research, and I found that get login returns the user name associated with the controlling terminal. But is a remote CentOS 5.5 server. So why does getlogin think that "bernie" is logged into the controlling terminal on this remote server? -Thanks
In reply to Why does getlogin always return same user name? by zBernie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |