+Fri Apr 28 07:52:45 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
+
+ * login.c: Lots of lint cleanup; declare functions before they
+ are used, add appropriate return types (int or void)
+ to functions as necessary, etc.
+
Thu Apr 27 21:44:17 1995 Ezra Peisach (epeisach@kangaroo.mit.edu)
* login.c: Remove definition of krb_err_txt. krb.h defines it.
#include <krb.h>
#include <netdb.h>
#include <netinet/in.h>
+#include <krb4-proto.h>
+#include <arpa/inet.h>
#ifdef BIND_HACK
#include <arpa/nameser.h>
#include <arpa/resolv.h>
#define GET_MOTD "/bin/athena/get_message"
#ifndef NO_UT_HOST
+#ifndef UT_HOSTSIZE
+/* linux defines it directly in <utmp.h> */
#define UT_HOSTSIZE sizeof(((struct utmp *)0)->ut_host)
+#endif /* UT_HOSTSIZE */
#endif
#ifndef UT_NAMESIZE
/* linux defines it directly in <utmp.h> */
char *getenv();
void dofork();
+int doremotelogin(), do_krb_login(), rootterm();
+void lgetstr(), doremoteterm(), getloginname(), checknologin(), sleepexit();
+void dolastlog(), motd();
+
#ifndef HAVE_STRSAVE
char * strsave();
#endif
}
#endif
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{
getloginname();
}
- if (pwd = getpwnam(username))
+ if ((pwd = getpwnam(username)))
salt = pwd->pw_passwd;
else
salt = "xx";
exit(0);
}
-getloginname()
+void getloginname()
{
register int ch;
register char *p;
#ifndef HAVE_TTYENT_H
int root_tty_security = 1;
#endif
-rootterm(tty)
+int rootterm(tty)
char *tty;
{
#ifndef HAVE_TTYENT_H
jmp_buf motdinterrupt;
#endif
-motd()
+void motd()
{
register int fd, nchars;
char tbuf[8192];
#endif
}
-checknologin()
+void checknologin()
{
register int fd, nchars;
char tbuf[8192];
}
}
-dolastlog(quiet, tty)
+void dolastlog(quiet, tty)
int quiet;
char *tty;
{
#endif
}
-doremotelogin(host)
+int doremotelogin(host)
char *host;
{
static char lusername[UT_NAMESIZE+1];
}
#ifdef KRB4
-do_krb_login(host, strict)
+int do_krb_login(host, strict)
char *host;
int strict;
{
ticket = (KTEXT) malloc(sizeof(KTEXT_ST));
(void) strcpy(instance, "*");
- if (rc=krb_recvauth(authoptions, 0, ticket, "rcmd",
+ if ((rc=krb_recvauth(authoptions, 0, ticket, "rcmd",
instance, &sin,
(struct sockaddr_in *)0,
- kdata, "", (bit_64 *) 0, version)) {
+ kdata, "", (bit_64 *) 0, version))) {
printf("Kerberos rlogin failed: %s\r\n",krb_err_txt[rc]);
if (strict) {
paranoid:
return(-1);
}
- if (rc=kuserok(kdata,lusername)) {
+ if ((rc=kuserok(kdata,lusername))) {
printf("login: %s has not given you permission to login without a password.\r\n",lusername);
if (strict) {
exit(1);
}
#endif /* KRB4 */
-lgetstr(buf, cnt, err)
+void lgetstr(buf, cnt, err)
char *buf, *err;
int cnt;
{
};
#endif
-doremoteterm(tp)
+void doremoteterm(tp)
#ifdef POSIX_TERMIOS
struct termios *tp;
#else
#endif
}
-sleepexit(eval)
+void sleepexit(eval)
int eval;
{
#ifdef KRB4