diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-13 21:39:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-13 21:39:42 +0000 |
commit | 80d7c5b1caf0f61593ba1869dd36962ec863801e (patch) | |
tree | d14f99e0cf265f40b2cced55bd49a544d30f64e2 /lib/libc | |
parent | e84ad2bef8db5fd0a873f86b5d33d9f6569a7259 (diff) |
Convert indentation whitespace -> tabs and kill $@%^#! ^M's
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/auth_subr.c | 26 | ||||
-rw-r--r-- | lib/libc/gen/authenticate.c | 58 |
2 files changed, 42 insertions, 42 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index ac68d4196cf..15b1f3a9591 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.8 2002/02/05 07:51:52 mpech Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.9 2002/03/13 21:39:41 millert Exp $ */ /*- * Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. @@ -81,7 +81,7 @@ struct auth_session_t { char *challenge; /* last challenge issued */ int flags; /* see below */ struct passwd *pwd; /* password entry for user */ - struct timeval now; /* time of authentication */ + struct timeval now; /* time of authentication */ int state; /* authenticated state */ @@ -176,10 +176,10 @@ auth_clean(auth_session_t *as) /* * Clean out the opt list */ - while ((opt = as->optlist) != NULL) { - as->optlist = opt->next; - free(opt); - } + while ((opt = as->optlist) != NULL) { + as->optlist = opt->next; + free(opt); + } /* * Clean out data @@ -208,8 +208,8 @@ int auth_close(auth_session_t *as) { struct rmfiles *rm; - struct authopts *opt; - struct authdata *data; + struct authopts *opt; + struct authdata *data; int s; /* @@ -237,10 +237,10 @@ auth_close(auth_session_t *as) /* * Clean out the opt list */ - while ((opt = as->optlist) != NULL) { - as->optlist = opt->next; - free(opt); - } + while ((opt = as->optlist) != NULL) { + as->optlist = opt->next; + free(opt); + } /* * Clean out data @@ -296,7 +296,7 @@ auth_challenge(auth_session_t *as) } snprintf(path, sizeof(path), _PATH_AUTHPROG "%s", as->style); - auth_call(as, path, as->style, "-s", "challenge", as->name, + auth_call(as, path, as->style, "-s", "challenge", as->name, as->class, NULL); if (as->state & AUTH_CHALLENGE) as->challenge = auth_getvalue(as, "challenge"); diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c index 4d5d9b73584..bfc16b594ee 100644 --- a/lib/libc/gen/authenticate.c +++ b/lib/libc/gen/authenticate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authenticate.c,v 1.7 2002/02/05 07:51:52 mpech Exp $ */ +/* $OpenBSD: authenticate.c,v 1.8 2002/03/13 21:39:41 millert Exp $ */ /*- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -112,45 +112,45 @@ _auth_checknologin(login_cap_t *lc, int print) { struct stat sb; char *nologin; - int mustfree;
-
- if (login_getcapbool(lc, "ignorenologin", 0))
- return (0);
+ int mustfree; + + if (login_getcapbool(lc, "ignorenologin", 0)) + return (0); /* * If we fail to get the nologin file due to a database error, * assume there should have been one... */ - nologin = login_getcapstr(lc, "nologin", "", NULL);
- mustfree = nologin && *nologin != '\0';
- if (nologin == NULL)
- goto print_nologin;
-
- /* First try the nologin file specified in login.conf. */
- if (*nologin != '\0' && stat(nologin, &sb) == 0)
- goto print_nologin;
- if (mustfree)
- free(nologin);
-
- /* If that doesn't exist try _PATH_NOLOGIN. */
- if (stat(_PATH_NOLOGIN, &sb) == 0) {
- nologin = _PATH_NOLOGIN;
- goto print_nologin;
+ nologin = login_getcapstr(lc, "nologin", "", NULL); + mustfree = nologin && *nologin != '\0'; + if (nologin == NULL) + goto print_nologin; + + /* First try the nologin file specified in login.conf. */ + if (*nologin != '\0' && stat(nologin, &sb) == 0) + goto print_nologin; + if (mustfree) + free(nologin); + + /* If that doesn't exist try _PATH_NOLOGIN. */ + if (stat(_PATH_NOLOGIN, &sb) == 0) { + nologin = _PATH_NOLOGIN; + goto print_nologin; } - /* Couldn't stat any nologin files, must be OK to login. */
- return (0);
+ /* Couldn't stat any nologin files, must be OK to login. */ + return (0); -print_nologin:
- if (print) {
- if (!nologin || *nologin == '\0' || auth_cat(nologin) == 0) {
- puts("Logins are not allowed at this time.");
+print_nologin: + if (print) { + if (!nologin || *nologin == '\0' || auth_cat(nologin) == 0) { + puts("Logins are not allowed at this time."); fflush(stdout); } } - if (mustfree)
- free(nologin);
- return (-1);
+ if (mustfree) + free(nologin); + return (-1); } int |