summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/login_chpass/login_chpass.c24
-rw-r--r--libexec/login_krb4/login_krb4.c4
-rw-r--r--libexec/login_krb5/login_krb5.c18
-rw-r--r--libexec/login_lchpass/login_lchpass.c12
-rw-r--r--libexec/login_passwd/login.c3
-rw-r--r--libexec/login_radius/raddauth.c4
-rw-r--r--libexec/login_reject/login_reject.c10
-rw-r--r--libexec/login_skey/login_skey.c12
8 files changed, 33 insertions, 54 deletions
diff --git a/libexec/login_chpass/login_chpass.c b/libexec/login_chpass/login_chpass.c
index 51328758bb4..b266af2b9aa 100644
--- a/libexec/login_chpass/login_chpass.c
+++ b/libexec/login_chpass/login_chpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_chpass.c,v 1.9 2002/06/28 01:14:37 deraadt Exp $ */
+/* $OpenBSD: login_chpass.c,v 1.10 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 1995,1996 Berkeley Software Design, Inc. All rights reserved.
@@ -92,13 +92,10 @@ void krb_chpass(char *, char *, char **);
void yp_chpass(char *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
+ char *username, *instance;
struct rlimit rl;
- char *username;
- char *instance;
int c;
rl.rlim_cur = 0;
@@ -156,8 +153,7 @@ main(argc, argv)
}
void
-local_chpass(argv)
- char *argv[];
+local_chpass(char *argv[])
{
/* login_lchpass doesn't check instance so don't bother restoring it */
@@ -169,8 +165,7 @@ local_chpass(argv)
#ifdef YP
void
-yp_chpass(username)
- char *username;
+yp_chpass(char *username)
{
char *master;
int r, rpcport, status;
@@ -268,8 +263,8 @@ yp_chpass(username)
exit(0);
}
-void kbintr(signo)
- int signo;
+void
+kbintr(int signo)
{
char msg[] = "YP passwd database unchanged.\n";
struct iovec iv[3];
@@ -289,10 +284,7 @@ void kbintr(signo)
#ifdef KERBEROS
void
-krb_chpass(username, instance, argv)
- char *username;
- char *instance;
- char *argv[];
+krb_chpass(char *username, char *instance, char *argv[])
{
int rval;
char pword[MAX_KPW_LEN];
diff --git a/libexec/login_krb4/login_krb4.c b/libexec/login_krb4/login_krb4.c
index 279b9047dd1..fbec0346411 100644
--- a/libexec/login_krb4/login_krb4.c
+++ b/libexec/login_krb4/login_krb4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_krb4.c,v 1.4 2002/05/30 06:09:21 deraadt Exp $ */
+/* $OpenBSD: login_krb4.c,v 1.5 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 2001 Hans Insulander <hin@openbsd.org>.
@@ -80,7 +80,7 @@ krb4_login(char *username, char *password, char *invokinguser, int new_tickets)
chown(tkfile, pwd->pw_uid, pwd->pw_gid);
if (ret == KSUCCESS &&
- krb_kuserok(username, instance, realm, targetuser) == 0) {
+ krb_kuserok(username, instance, realm, targetuser) == 0) {
fprintf(back, BI_AUTH "\n");
if (strlen(tkfile) > 0)
fprintf(back, BI_SETENV " KRBTKFILE %s\n", tkfile);
diff --git a/libexec/login_krb5/login_krb5.c b/libexec/login_krb5/login_krb5.c
index 91c8d2f13a8..333ffd3a36d 100644
--- a/libexec/login_krb5/login_krb5.c
+++ b/libexec/login_krb5/login_krb5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_krb5.c,v 1.16 2002/05/30 06:09:21 deraadt Exp $ */
+/* $OpenBSD: login_krb5.c,v 1.17 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 2001, 2002 Hans Insulander <hin@openbsd.org>.
@@ -75,15 +75,15 @@ store_tickets(struct passwd *pwd, int ticket_newfiles, int ticket_store,
"krb5_cc_gen_new");
exit(1);
}
-
+
ret = krb5_cc_copy_cache(context, ccache, ccache_store);
if (ret != 0)
krb5_syslog(context, LOG_ERR, ret,
"krb5_cc_copy_cache");
-
+
chown(krb5_cc_get_name(context, ccache_store),
pwd->pw_uid, pwd->pw_gid);
-
+
fprintf(back, BI_SETENV " KRB5CCNAME %s:%s\n",
krb5_cc_get_type(context, ccache_store),
krb5_cc_get_name(context, ccache_store));
@@ -96,14 +96,14 @@ store_tickets(struct passwd *pwd, int ticket_newfiles, int ticket_store,
CREDENTIALS c;
krb5_creds cred;
krb5_cc_cursor cursor;
-
+
ret = krb5_cc_start_seq_get(context, ccache, &cursor);
if (ret != 0) {
krb5_syslog(context, LOG_ERR, ret,
"start seq");
exit(1);
}
-
+
ret = krb5_cc_next_cred(context, ccache,
&cursor, &cred);
if (ret != 0) {
@@ -111,7 +111,7 @@ store_tickets(struct passwd *pwd, int ticket_newfiles, int ticket_store,
"next cred");
exit(1);
}
-
+
ret = krb5_cc_end_seq_get(context, ccache,
&cursor);
if (ret != 0) {
@@ -119,7 +119,7 @@ store_tickets(struct passwd *pwd, int ticket_newfiles, int ticket_store,
"end seq");
exit(1);
}
-
+
ret = krb524_convert_creds_kdc_ccache(context, ccache,
&cred, &c);
if (ret != 0) {
@@ -137,7 +137,7 @@ store_tickets(struct passwd *pwd, int ticket_newfiles, int ticket_store,
}
#endif
}
-
+
/* Need to chown the ticket file */
#ifdef KRB524
if (get_krb4_ticket)
diff --git a/libexec/login_lchpass/login_lchpass.c b/libexec/login_lchpass/login_lchpass.c
index 6c1c6882ea2..5271385fa77 100644
--- a/libexec/login_lchpass/login_lchpass.c
+++ b/libexec/login_lchpass/login_lchpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_lchpass.c,v 1.9 2002/06/28 01:14:37 deraadt Exp $ */
+/* $OpenBSD: login_lchpass.c,v 1.10 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 1995,1996 Berkeley Software Design, Inc. All rights reserved.
@@ -58,18 +58,14 @@
int local_passwd(char *, int);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct iovec iov[2];
struct passwd *pwd;
char localhost[MAXHOSTNAMELEN];
- char *username = NULL;
- char *salt;
- char *p;
- int c;
+ char *username = NULL, *salt, *p;
struct rlimit rl;
+ int c;
iov[0].iov_base = BI_SILENT;
iov[0].iov_len = sizeof(BI_SILENT) - 1;
diff --git a/libexec/login_passwd/login.c b/libexec/login_passwd/login.c
index 5d5bc1bd2f6..618807caee7 100644
--- a/libexec/login_passwd/login.c
+++ b/libexec/login_passwd/login.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login.c,v 1.4 2002/06/02 01:27:15 deraadt Exp $ */
+/* $OpenBSD: login.c,v 1.5 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -136,7 +136,6 @@ main(int argc, char **argv)
case MODE_LOGIN:
password = getpass("Password:");
break;
-
case MODE_CHALLENGE:
fprintf(back, BI_AUTH "\n");
exit(0);
diff --git a/libexec/login_radius/raddauth.c b/libexec/login_radius/raddauth.c
index 85683b333f4..e48b396f418 100644
--- a/libexec/login_radius/raddauth.c
+++ b/libexec/login_radius/raddauth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raddauth.c,v 1.9 2002/06/28 01:14:37 deraadt Exp $ */
+/* $OpenBSD: raddauth.c,v 1.10 2002/09/06 18:45:06 deraadt Exp $ */
/*-
* Copyright (c) 1996, 1997 Berkeley Software Design, Inc. All rights reserved.
@@ -352,7 +352,7 @@ rad_request(pid_t id, char *name, char *password, int port, char *vector,
*ptr++ = p * AUTH_VECTOR_LEN + 2;
memset(pass_buf, 0, sizeof(pass_buf)); /* must zero fill */
- strlcpy(pass_buf, password, sizeof(pass_buf));
+ strlcpy((char *)pass_buf, password, sizeof(pass_buf));
/* Calculate the md5 digest */
secretlen = strlen(auth_secret);
diff --git a/libexec/login_reject/login_reject.c b/libexec/login_reject/login_reject.c
index 26d32053eea..91ee3532944 100644
--- a/libexec/login_reject/login_reject.c
+++ b/libexec/login_reject/login_reject.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_reject.c,v 1.5 2002/06/28 01:14:37 deraadt Exp $ */
+/* $OpenBSD: login_reject.c,v 1.6 2002/09/06 18:45:07 deraadt Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -53,15 +53,12 @@
#include <unistd.h>
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FILE *back;
char passbuf[1];
- int c;
struct rlimit rl;
- int mode = 0;
+ int mode = 0, c;
rl.rlim_cur = 0;
rl.rlim_max = 0;
@@ -124,7 +121,6 @@ main(argc, argv)
} else
getpass("Password:");
-
crypt("password", "xx");
fprintf(back, BI_REJECT "\n");
exit(1);
diff --git a/libexec/login_skey/login_skey.c b/libexec/login_skey/login_skey.c
index c76690fd9cb..b71b1359e5c 100644
--- a/libexec/login_skey/login_skey.c
+++ b/libexec/login_skey/login_skey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_skey.c,v 1.10 2002/06/28 01:14:37 deraadt Exp $ */
+/* $OpenBSD: login_skey.c,v 1.11 2002/09/06 18:45:07 deraadt Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -64,9 +64,7 @@ volatile sig_atomic_t resumed;
struct skey skey;
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
FILE *back = NULL;
char *class = 0;
@@ -224,16 +222,14 @@ main(argc, argv)
}
void
-quit(signo)
- int signo;
+quit(int signo)
{
_exit(1);
}
void
-suspend(signo)
- int signo;
+suspend(int signo)
{
sigset_t nset;
int save_errno = errno;