dtsession: revise localAuthenticate.
This commit is contained in:
@@ -1611,6 +1611,9 @@ localAuthenticate(
|
|||||||
char *service;
|
char *service;
|
||||||
struct passwd *pwent;
|
struct passwd *pwent;
|
||||||
|
|
||||||
|
if (!(name && name[0])) name = NULL;
|
||||||
|
if (uid < 0) uid = 0;
|
||||||
|
|
||||||
if (!(name || passwd)) return True;
|
if (!(name || passwd)) return True;
|
||||||
if (!passwd) return False;
|
if (!passwd) return False;
|
||||||
if (!(pwent = name ? getpwnam(name) : getpwuid(uid))) return False;
|
if (!(pwent = name ? getpwnam(name) : getpwuid(uid))) return False;
|
||||||
|
|||||||
Reference in New Issue
Block a user