From: danw Date: Wed, 29 Jan 1997 23:12:21 +0000 (+0000) Subject: ${CRYPT} in Imakefile X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/7ff930dff5e76a5708d22a161fdd8120776e1acc ${CRYPT} in Imakefile random sanity fixes #includes instead of externs --- diff --git a/clients/userreg/Imakefile b/clients/userreg/Imakefile index 442d37f8..2556fb8c 100644 --- a/clients/userreg/Imakefile +++ b/clients/userreg/Imakefile @@ -16,6 +16,6 @@ SCRIPTS= register xregister 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} diff --git a/clients/userreg/disable.c b/clients/userreg/disable.c index 1a074138..187c8a34 100644 --- a/clients/userreg/disable.c +++ b/clients/userreg/disable.c @@ -106,7 +106,7 @@ char **msg; return(ctime(&itime)); } -static char * +char * cmp(p, v) char *p; { @@ -143,7 +143,7 @@ char *p; return(cp); } -static init() +init() { /* * Don't free in case was longer than LISTS. Trades off @@ -157,7 +157,7 @@ static init() listend = list; } -static append(fn) +append(fn) char *fn; { register int i, c; @@ -253,7 +253,7 @@ ignore: goto loop; } -static number(c, f) +number(c, f) register char c; FILE *f; { diff --git a/clients/userreg/display.c b/clients/userreg/display.c index b22375c0..bdc527ca 100644 --- a/clients/userreg/display.c +++ b/clients/userreg/display.c @@ -11,7 +11,7 @@ #ifndef lint static char *rcsid_display_c = "$Header$"; -#endif lint +#endif #include #include @@ -21,7 +21,7 @@ static char *rcsid_display_c = "$Header$"; #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 @@ -34,6 +34,7 @@ static char *rcsid_display_c = "$Header$"; 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 () { @@ -199,7 +200,9 @@ retry: 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); } @@ -271,8 +274,7 @@ askyn(prompt) 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. */ diff --git a/clients/userreg/reg_stubs.c b/clients/userreg/reg_stubs.c index 03851aa1..8138b8f8 100644 --- a/clients/userreg/reg_stubs.c +++ b/clients/userreg/reg_stubs.c @@ -10,10 +10,11 @@ #ifndef lint static char *rcsid_reg_stubs_c = "$Header$"; -#endif lint +#endif #include #include +#include #include #include #include @@ -28,6 +29,7 @@ static char *rcsid_reg_stubs_c = "$Header$"; #include #include #include +#include #include "ureg_err.h" #include "ureg_proto.h" #include @@ -52,7 +54,6 @@ ureg_init() char **p, *s; struct hostent *hp; struct sockaddr_in s_in; - extern char *getenv(), **hes_resolve(); initialize_ureg_error_table(); initialize_krb_error_table(); @@ -68,7 +69,7 @@ ureg_init() p = hes_resolve("registration", "sloc"); if (p) host = *p; } -#endif HESIOD +#endif if (!host || (strlen(host) == 0)) { host = strsave(MOIRA_SERVER); s = strchr(host, ':'); @@ -91,7 +92,7 @@ ureg_init() 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; } @@ -352,7 +353,7 @@ do_secure_operation(login, idnumber, passwd, newpasswd, opcode) } -static do_call(buf, len, seq_no, login) +do_call(buf, len, seq_no, login) char *buf; char *login; int seq_no; @@ -384,7 +385,8 @@ static do_call(buf, len, seq_no, login) 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)); diff --git a/clients/userreg/userreg.c b/clients/userreg/userreg.c index af176e9a..b35324be 100644 --- a/clients/userreg/userreg.c +++ b/clients/userreg/userreg.c @@ -11,7 +11,7 @@ #ifndef lint static char *rcsid_userreg_c = "$Header$"; -#endif lint +#endif #include #include @@ -38,7 +38,6 @@ static char *rcsid_userreg_c = "$Header$"; struct user user, db_user; struct alias alias; -char typed_mit_id[100]; char realm[REALM_SZ]; jmp_buf redo; int restart(); @@ -49,6 +48,7 @@ int user_has_login = 0; int already_registered = 0; int enrollment = 0; extern char *disabled(); +char typed_mit_id[100]; fix_display(sig) { diff --git a/clients/userreg/userreg.h b/clients/userreg/userreg.h index 0e04d73e..dee6866e 100644 --- a/clients/userreg/userreg.h +++ b/clients/userreg/userreg.h @@ -71,4 +71,3 @@ extern display_text (); /* Global variables */ extern struct user user, db_user; -char typed_mit_id[100];