From: Mark Eichin Date: Sun, 14 Aug 1994 04:09:53 +0000 (+0000) Subject: lint X-Git-Tag: krb5-1.0-beta4.3~196 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2f1c04f9639ee005ba6cc9516bee011e2260ff19;p=krb5.git lint fix LOGIN_PROGRAM (from net) get rid of getpw* misdeclarations make default args char* instead of int fix error message pointer git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4127 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 90ec9a6d4..705c49c15 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,7 @@ +Sat Aug 13 02:04:37 1994 Mark Eichin (eichin@perdiem) + + * Makefile.in (DEFINES): set LOGIN_PROGRAM correctly. + Thu Aug 11 23:16:31 1994 Mark Eichin (eichin@perdiem) * krsh.c: Don't (mis)declare getpwuid ever. diff --git a/src/appl/bsd/Makefile.in b/src/appl/bsd/Makefile.in index 5f495d465..c4905c919 100644 --- a/src/appl/bsd/Makefile.in +++ b/src/appl/bsd/Makefile.in @@ -16,7 +16,7 @@ OBJS= krcp.o krlogin.o krsh.o kcmd.o forward.c logutil.o $(SETENVOBJ) \ RSH= -DKRB_RLOGIN=\"$(PROGDIR)/rlogin\" DEFINES= $(RSH) $(RPROGS) \ - -DLOGIN_PROGRAM=\"$(SERVER_BINDIR)/login.krb\" -DKPROGDIR=\"$(CLIENT_BINDIR)\" + -DLOGIN_PROGRAM=\"$(SERVER_BINDIR)/login.krb5\" -DKPROGDIR=\"$(CLIENT_BINDIR)\" all:: rsh rcp rlogin krshd krlogind login.krb5 diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index b181a5cab..8cdf80095 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -119,9 +119,6 @@ int iamremote, targetshouldbedirectory; int iamrecursive; int pflag; struct passwd *pwd; -#ifndef convex -struct passwd *getpwuid(); -#endif int userid; int port; @@ -1136,7 +1133,7 @@ void send_auth() char *princ; /* principal in credentials cache */ krb5_ccache cc; krb5_creds creds; - krb5_data reply, msg, princ_data; + krb5_data reply, princ_data; krb5_tkt_authent *authdat; krb5_error_code status; krb5_address faddr; diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index cfb4e132d..f046f8d65 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -177,9 +177,6 @@ struct sockaddr_in local, foreign; # endif /* TIOCPKT_WINDOW */ char *getenv(); -#ifndef convex -struct passwd *getpwuid(); -#endif char *name; int rem = -1; /* Remote socket fd */ char cmdchar = '~'; @@ -571,7 +568,7 @@ main(argc, argv) if ( status = krb5_process_key(&eblock,&cred->keyblock)) { fprintf(stderr, "%s: Cannot process session key : %s.\n", - orig_argv, error_message(status)); + orig_argv[0], error_message(status)); exit(1); } #else @@ -1488,6 +1485,7 @@ mode(f) /*VARARGS*/ prf(f, a1, a2, a3, a4, a5) char *f; + char *a1, *a2, *a3, *a4, *a5; { fprintf(stderr, f, a1, a2, a3, a4, a5); fprintf(stderr, CRLF); diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 518f6c5bc..ab62d7310 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -283,7 +283,6 @@ krb5_principal client; extern int errno; int reapchild(); -struct passwd *getpwnam(); #if (!defined(__STDC__) && !defined(ultrix)) char *malloc(); #endif diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 1cc494fa1..c0202129c 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -38,6 +38,9 @@ static char sccsid[] = "@(#)rsh.c 5.7 (Berkeley) 9/20/88"; #include #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include @@ -54,6 +57,7 @@ static char sccsid[] = "@(#)rsh.c 5.7 (Berkeley) 9/20/88"; #include #include #include +#include #include "defines.h" #endif /* KERBEROS */ @@ -93,7 +97,6 @@ main(argc, argv0) int rem, pid; char *host=0, *cp, **ap, buf[BUFSIZ], *args, **argv = argv0, *user = 0; register int cc; - int asrsh = 0; struct passwd *pwd; int readfrom, ready; int one = 1; diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index d3c19d2e4..0440f5024 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -1041,7 +1041,7 @@ dolastlog(quiet, tty) int fd; if ((fd = open(LASTLOG, O_RDWR, 0)) >= 0) { - (void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), L_SET); + (void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); if (!quiet) { if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) && ll.ll_time != 0) { @@ -1054,7 +1054,7 @@ dolastlog(quiet, tty) printf("on %.*s\n", sizeof(ll.ll_line), ll.ll_line); } - (void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), L_SET); + (void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); } (void)time(&ll.ll_time); (void) strncpy(ll.ll_line, tty, sizeof(ll.ll_line));