Kill __P(), ANSIfy, remove main() prototype, whitespace; WARNS=2

This commit is contained in:
xtraeme 2005-01-20 15:41:14 +00:00
parent 743ce43fbc
commit a35b6d287f
4 changed files with 40 additions and 47 deletions

View File

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.42 2004/01/05 03:53:10 lukem Exp $
# $NetBSD: Makefile,v 1.43 2005/01/20 15:41:14 xtraeme Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
.include <bsd.own.mk>
WARNS= 2
PROG= login
SRCS= login.c copyrightstr.c
DPADD+= ${LIBUTIL} ${LIBCRYPT}

View File

@ -1,4 +1,4 @@
/* $NetBSD: k5login.c,v 1.25 2004/12/22 01:28:56 lha Exp $ */
/* $NetBSD: k5login.c,v 1.26 2005/01/20 15:41:14 xtraeme Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -51,7 +51,7 @@
#if 0
static char sccsid[] = "@(#)klogin.c 5.11 (Berkeley) 7/12/92";
#endif
__RCSID("$NetBSD: k5login.c,v 1.25 2004/12/22 01:28:56 lha Exp $");
__RCSID("$NetBSD: k5login.c,v 1.26 2005/01/20 15:41:14 xtraeme Exp $");
#endif /* not lint */
#ifdef KERBEROS5
@ -117,9 +117,7 @@ krb5_to4 (struct passwd *pw, krb5_context context, krb5_ccache id);
* Returns 1 for confirmation, -1 for failure, 0 for uncertainty.
*/
int
k5_verify_creds(c, ccache)
krb5_context c;
krb5_ccache ccache;
k5_verify_creds(krb5_context c, krb5_ccache ccache)
{
char phost[MAXHOSTNAMELEN];
int retval, have_keys;
@ -233,8 +231,7 @@ EGRESS:
* 1 if no forwarded creds.
*/
int
k5_read_creds(username)
char *username;
k5_read_creds(char *username)
{
krb5_error_code kerror;
krb5_creds mcreds;
@ -291,7 +288,7 @@ nuke_ccache:
}
int
k5_write_creds()
k5_write_creds(void)
{
krb5_error_code kerror;
krb5_ccache ccache;
@ -384,9 +381,7 @@ krb5_to4 (struct passwd *pw, krb5_context context, krb5_ccache id)
* 1 if Kerberos failed (try local password in login)
*/
int
k5login(pw, instance, localhost, password)
struct passwd *pw;
char *instance, *localhost, *password;
k5login(struct passwd *pw, char *instance, char *localhost, char *password)
{
krb5_error_code kerror;
krb5_creds my_creds;
@ -537,7 +532,7 @@ k5login(pw, instance, localhost, password)
* Remove any credentials
*/
void
k5destroy()
k5destroy(void)
{
krb5_error_code kerror;
krb5_ccache ccache = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: klogin.c,v 1.19 2003/08/07 11:14:24 agc Exp $ */
/* $NetBSD: klogin.c,v 1.20 2005/01/20 15:41:14 xtraeme Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)klogin.c 8.3 (Berkeley) 4/2/94";
#endif
__RCSID("$NetBSD: klogin.c,v 1.19 2003/08/07 11:14:24 agc Exp $");
__RCSID("$NetBSD: klogin.c,v 1.20 2005/01/20 15:41:14 xtraeme Exp $");
#endif /* not lint */
#ifdef KERBEROS
@ -66,8 +66,8 @@ extern int has_ccache;
static char tkt_location[MAXPATHLEN]; /* a pointer to this is returned... */
int klogin __P((struct passwd *, char *, char *, char *));
void kdestroy __P((void));
int klogin(struct passwd *, char *, char *, char *);
void kdestroy(void);
/*
* Attempt to log the user in using Kerberos authentication
@ -76,9 +76,7 @@ void kdestroy __P((void));
* 1 if Kerberos failed (try local password in login)
*/
int
klogin(pw, instance, localhost, password)
struct passwd *pw;
char *instance, *localhost, *password;
klogin(struct passwd *pw, char *instance, char *localhost, char *password)
{
int kerror;
AUTH_DAT authdata;
@ -216,7 +214,7 @@ klogin(pw, instance, localhost, password)
}
void
kdestroy()
kdestroy(void)
{
char *file = krbtkfile_env;
int i, fd;

View File

@ -1,4 +1,4 @@
/* $NetBSD: login.c,v 1.80 2005/01/12 05:34:23 xtraeme Exp $ */
/* $NetBSD: login.c,v 1.81 2005/01/20 15:41:14 xtraeme Exp $ */
/*-
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
__RCSID("$NetBSD: login.c,v 1.80 2005/01/12 05:34:23 xtraeme Exp $");
__RCSID("$NetBSD: login.c,v 1.81 2005/01/20 15:41:14 xtraeme Exp $");
#endif /* not lint */
/*
@ -99,40 +99,39 @@ int login_krb5_forwardable_tgt = 0;
int login_krb5_retain_ccache = 0;
#endif
void badlogin (char *);
void checknologin (char *);
void badlogin(char *);
void checknologin(char *);
#ifdef SUPPORT_UTMP
static void doutmp (void);
static void dolastlog (int);
static void doutmp(void);
static void dolastlog(int);
#endif
#ifdef SUPPORT_UTMPX
static void doutmpx (void);
static void dolastlogx (int);
static void doutmpx(void);
static void dolastlogx(int);
#endif
static void update_db (int);
void getloginname (void);
int main (int, char *[]);
void motd (char *);
int rootterm (char *);
void sigint (int);
void sleepexit (int);
const char *stypeof (const char *);
void timedout (int);
static void update_db(int);
void getloginname(void);
void motd(char *);
int rootterm(char *);
void sigint(int);
void sleepexit(int);
const char *stypeof(const char *);
void timedout(int);
#if defined(KERBEROS)
int klogin (struct passwd *, char *, char *, char *);
void kdestroy (void);
int klogin(struct passwd *, char *, char *, char *);
void kdestroy(void);
#endif
#ifdef KERBEROS5
int k5login (struct passwd *, char *, char *, char *);
void k5destroy (void);
int k5_read_creds (char*);
int k5_write_creds (void);
int k5login(struct passwd *, char *, char *, char *);
void k5destroy(void);
int k5_read_creds(char*);
int k5_write_creds(void);
#endif
#if defined(KERBEROS) || defined(KERBEROS5)
void dofork (void);
void dofork(void);
#endif
void decode_ss (const char *);
void usage (void);
void decode_ss(const char *);
void usage(void);
#define TTYGRPNAME "tty" /* name of group to own ttys */