1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Compile under -W -Wall -Werror.

Fix API - keycrunch takes const char's, not chars.
This commit is contained in:
Paul Traina 1998-02-27 22:36:51 +00:00
parent ebef4c231e
commit 897e6eb1f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33894
6 changed files with 14 additions and 11 deletions

View File

@ -10,6 +10,7 @@ MLINKS= skey.3 skeylookup.3 skey.3 skeyverify.3 skey.3 skeychallenge.3 \
MAN5= skey.access.5
CFLAGS+=-DPERMIT_CONSOLE -D_SKEY_INTERNAL -I${.CURDIR}
CFLAGS+=-W -Wall -Werror
.if ${BINFORMAT} == elf
DPADD+= ${LIBCRYPT} ${LIBMD}

View File

@ -2107,7 +2107,8 @@ char *out;
char *e;
{
char *word, *cp;
int i, p, v,l, low,high;
int i, v,l, low,high;
unsigned int p;
char b[9];
char input[36];

View File

@ -35,7 +35,7 @@ struct mc {
#define sevenbit _sk_sevenbit
void f __P((char *x));
int keycrunch __P((char *result,char *seed,char *passwd));
int keycrunch __P((char *result,const char *seed,const char *passwd));
char *btoe __P((char *engout,char *c));
char *put8 __P((char *out,char *s));
int atob8 __P((char *out, char *in));

View File

@ -229,9 +229,9 @@ struct login_info *login_info;
static int match_internet_addr(login_info)
struct login_info *login_info;
{
char *tok;
long pattern;
long mask;
char * tok;
u_int32_t pattern;
u_int32_t mask;
struct in_addr *addrp;
if (login_info->internet_addr == 0)
@ -249,7 +249,7 @@ struct login_info *login_info;
*/
for (addrp = login_info->internet_addr; addrp->s_addr; addrp++)
if (addrp->s_addr != -1 && (addrp->s_addr & mask) == pattern)
if (addrp->s_addr != INADDR_NONE && (addrp->s_addr & mask) == pattern)
return (1);
return (0);
}

View File

@ -104,8 +104,8 @@ struct skey *mp;
const char *name;
{
int found;
int len;
long recstart;
size_t len;
long recstart = 0;
char *cp, *p;
struct stat statbuf;
mode_t oldmask;

View File

@ -1,3 +1,4 @@
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -15,8 +16,8 @@
int
keycrunch(result,seed,passwd)
char *result; /* 8-byte result */
char *seed; /* Seed, any length */
char *passwd; /* Password, any length */
const char *seed; /* Seed, any length */
const char *passwd; /* Password, any length */
{
char *buf;
MDX_CTX md;
@ -76,7 +77,7 @@ static void interrupt(sig)
int sig;
{
tcsetattr(0, TCSANOW, &saved_ttymode);
exit(1);
err(1, "interrupted by signal %s", sys_siglist[sig]);
}
char *