CODE=${SRCS} ${TEXT} ${SCRIPTS} Imakefile files.h userreg.h
OBJS= userreg.o display.o reg_stubs.o disable.o
-program(userreg, ${OBJS},${MR_LIBDEP} ${GDB_LIBDEP}, -lkadm ${CLIBS} ${CURSES},${PROGDIR})
+program(userreg, ${OBJS},${MR_LIBDEP} ${GDB_LIBDEP}, -lkadm ${CLIBS} ${CRYPT} ${CURSES},${PROGDIR})
depend:: ${CODE}
#ifndef lint
static char *rcsid_display_c = "$Header$";
-#endif lint
+#endif
#include <mit-copyright.h>
#include <stdio.h>
#define DESC_WIDTH 18
#define HEADER "*** Athena User Account Registration ***"
-#if defined(vax) || defined(ultrix)
+#if defined(ultrix)
#define HELP " Press the key above RETURN to delete a character. Press Ctrl-C to start over."
#endif
#ifndef HELP
WINDOW * displayw, *queryw;
WINDOW * dataw, *helpw;
WINDOW * fnamew, *midw, *lnamew, *idw, *loginw;
+extern char typed_mit_id[100];
/* Set up the windows and subwindows on the display */
setup_display () {
if (i) {
i--;
if (echop) {
- wmove (queryw, queryw -> _cury, queryw -> _curx - 1);
+ int x, y;
+ getyx(queryw, y, x);
+ wmove (queryw, y, x - 1);
wclrtoeol (queryw);
wrefresh (queryw);
}
mvwaddstr (queryw, 0, 0, prompt);
wrefresh (queryw);
- xpos = queryw->_curx;
- ypos = queryw->_cury;
+ getyx(queryw, ypos, xpos);
answer = 2; /* No answer. */
/* Reset interval timer for y/n question. */
#ifndef lint
static char *rcsid_reg_stubs_c = "$Header$";
-#endif lint
+#endif
#include <mit-copyright.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <errno.h>
#include <moira.h>
#include <moira_site.h>
+#include <hesiod.h>
#include "ureg_err.h"
#include "ureg_proto.h"
#include <string.h>
char **p, *s;
struct hostent *hp;
struct sockaddr_in s_in;
- extern char *getenv(), **hes_resolve();
initialize_ureg_error_table();
initialize_krb_error_table();
p = hes_resolve("registration", "sloc");
if (p) host = *p;
}
-#endif HESIOD
+#endif
if (!host || (strlen(host) == 0)) {
host = strsave(MOIRA_SERVER);
s = strchr(host, ':');
memcpy((char *)&s_in.sin_addr, hp->h_addr, sizeof(struct in_addr));
s_in.sin_family = AF_INET;
- if (connect(reg_sock, &s_in, sizeof(s_in)) < 0)
+ if (connect(reg_sock, (struct sockaddr *)&s_in, sizeof(s_in)) < 0)
return errno;
return 0;
}
}
-static do_call(buf, len, seq_no, login)
+do_call(buf, len, seq_no, login)
char *buf;
char *login;
int seq_no;
break;
else if (rtn < 0) return errno;
- len = recvfrom(reg_sock, ibuf, BUFSIZ, 0, &s_in, &addrlen);
+ len = recvfrom(reg_sock, ibuf, BUFSIZ, 0,
+ (struct sockaddr *)&s_in, &addrlen);
if (len < 0) return errno;
if (len < 12) return UREG_BROKEN_PACKET;
memcpy((char *)&vno, ibuf, sizeof(long));