Skip to main content
edited tags
Link
AviD
  • 73.6k
  • 24
  • 141
  • 222
Tweeted twitter.com/#!/StackSecurity/status/180437921218834432
Source Link
user1187
user1187

vulnerable getlogin

I was reading "A taxonomy of Coding Errors" and I have a doubt regarding the point mentioned in C/C++ >> API Abuse >> Often Misused: Authentication(getlogin).

I fail to understand the attack vector mentioned there. To quote a statement -

The getlogin() function is supposed to return a string containing the name of the user currently logged in at the terminal, but an attacker can cause getlogin() to return the name of any user logged in to the machine.

How does this work?