1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

dtsession: revise localAuthenticate.

This commit is contained in:
Liang Chang 2021-02-01 08:06:07 +08:00 committed by Jon Trulson
parent 7d8dea61b2
commit e68846d543

View file

@ -1611,6 +1611,9 @@ localAuthenticate(
char *service;
struct passwd *pwent;
if (!(name && name[0])) name = NULL;
if (uid < 0) uid = 0;
if (!(name || passwd)) return True;
if (!passwd) return False;
if (!(pwent = name ? getpwnam(name) : getpwuid(uid))) return False;