diff options
Diffstat (limited to 'gnu/usr.bin/cvs/windows-NT/pwd.c')
-rw-r--r-- | gnu/usr.bin/cvs/windows-NT/pwd.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/usr.bin/cvs/windows-NT/pwd.c b/gnu/usr.bin/cvs/windows-NT/pwd.c index 683bb0c3653..62f32cd3ad8 100644 --- a/gnu/usr.bin/cvs/windows-NT/pwd.c +++ b/gnu/usr.bin/cvs/windows-NT/pwd.c @@ -87,13 +87,16 @@ getgrnam (char *name) char * getlogin () { + /* This is how a windows user would override their login name. */ if (!login) - login = win32getlogin(); - - if (!login) /* have we been called before? */ login = lookup_env (login_strings); - if (!login) /* have we been successful? */ + /* In the absence of user override, ask the operating system. */ + if (!login) + login = win32getlogin(); + + /* If all else fails, fall back on Old Faithful. */ + if (!login) login = anonymous; return login; |