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
+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.
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
int iamrecursive;
int pflag;
struct passwd *pwd;
-#ifndef convex
-struct passwd *getpwuid();
-#endif
int userid;
int port;
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;
# endif /* TIOCPKT_WINDOW */
char *getenv();
-#ifndef convex
-struct passwd *getpwuid();
-#endif
char *name;
int rem = -1; /* Remote socket fd */
char cmdchar = '~';
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
/*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);
extern int errno;
int reapchild();
-struct passwd *getpwnam();
#if (!defined(__STDC__) && !defined(ultrix))
char *malloc();
#endif
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <errno.h>
#include <signal.h>
#include <pwd.h>
#include <krb5/crc-32.h>
#include <krb5/mit-des.h>
#include <krb5/osconf.h>
+#include <com_err.h>
#include "defines.h"
#endif /* KERBEROS */
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;
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) {
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));