diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-29 05:56:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-29 05:56:37 +0000 |
commit | 026e3c8735ea64d12dff3faafc59cca5e7735381 (patch) | |
tree | 0b6a9b057b3454aee9b8887e3cdac6bf7614e865 /libexec | |
parent | f07dfdfbf3999e600e2efc3a55b3680f98ad361c (diff) |
ugly
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/login_passwd/login_passwd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libexec/login_passwd/login_passwd.c b/libexec/login_passwd/login_passwd.c index ef49a1989bd..b10d2a3986f 100644 --- a/libexec/login_passwd/login_passwd.c +++ b/libexec/login_passwd/login_passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_passwd.c,v 1.3 2001/06/26 05:03:28 hin Exp $ */ +/* $OpenBSD: login_passwd.c,v 1.4 2001/06/29 05:56:36 deraadt Exp $ */ /*- * Copyright (c) 2001 Hans Insulander <hin@openbsd.org>. @@ -30,28 +30,27 @@ int pwd_login(char *username, char *password, char *wheel, int lastchance, - char *class) + char *class) { struct passwd *pwd; char *salt; - - if((wheel != NULL) && strcmp(wheel, "yes") != 0) { - fprintf(back, BI_VALUE " errormsg %s\n", - auth_mkvalue("you are not in group wheel")); - fprintf(back, BI_REJECT "\n"); + if (wheel != NULL && strcmp(wheel, "yes") != 0) { + fprintf(back, BI_VALUE " errormsg %s\n", + auth_mkvalue("you are not in group wheel")); + fprintf(back, BI_REJECT "\n"); return AUTH_FAILED; } pwd = getpwnam(username); /* Check for empty password */ - if((pwd != NULL) && (*pwd->pw_passwd == '\0')) { + if (pwd != NULL && *pwd->pw_passwd == '\0') { fprintf(back, BI_AUTH "\n"); return AUTH_OK; } - if(pwd) + if (pwd) salt = pwd->pw_passwd; else salt = "xx"; @@ -63,7 +62,7 @@ pwd_login(char *username, char *password, char *wheel, int lastchance, if (!pwd || strcmp(salt, pwd->pw_passwd) != 0) return AUTH_FAILED; - if(login_check_expire(back, pwd, class, lastchance) == 0) + if (login_check_expire(back, pwd, class, lastchance) == 0) fprintf(back, BI_AUTH "\n"); else return AUTH_FAILED; |