In usr.sbin/keyserv, fix some implicit enum conversions, and use the

correct printf length modifiers for uid_t.

MFC after:	1 week
This commit is contained in:
dim 2011-12-17 20:53:06 +00:00
parent 14cb3a31d3
commit 376711b828
2 changed files with 12 additions and 12 deletions

View File

@ -223,8 +223,8 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp)
bcopy(argp->des_key, dparm.des_key, 8);
bcopy(argp->des_ivec, dparm.des_ivec, 8);
dparm.des_mode = argp->des_mode;
dparm.des_dir = argp->des_dir;
dparm.des_mode = (argp->des_mode == CBC_DES) ? CBC : ECB;
dparm.des_dir = (argp->des_dir == ENCRYPT_DES) ? ENCRYPT : DECRYPT;
#ifdef BROKEN_DES
dparm.UDES.UDES_buf = argp->desbuf.desbuf_val;
#endif

View File

@ -361,7 +361,7 @@ key_set_1_svc_prog(uid, key)
static keystatus status;
if (debugging) {
(void) fprintf(stderr, "set(%ld, %.*s) = ", uid,
(void) fprintf(stderr, "set(%u, %.*s) = ", uid,
(int) sizeof (keybuf), key);
}
status = pk_setkey(uid, key);
@ -380,7 +380,7 @@ key_encrypt_pk_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
(void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
(void) fprintf(stderr, "encrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@ -408,7 +408,7 @@ key_decrypt_pk_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
(void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
(void) fprintf(stderr, "decrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@ -460,7 +460,7 @@ key_net_get_2_svc_prog(uid, arg)
static key_netstres keynetname;
if (debugging)
(void) fprintf(stderr, "net_get(%ld) = ", uid);
(void) fprintf(stderr, "net_get(%u) = ", uid);
keynetname.status = pk_netget(uid, &keynetname.key_netstres_u.knet);
if (debugging) {
@ -489,8 +489,8 @@ key_get_conv_2_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging)
(void) fprintf(stderr, "get_conv(%ld, %.*s) = ", uid,
(int)sizeof (arg), arg);
(void) fprintf(stderr, "get_conv(%u, %.*s) = ", uid,
(int)sizeof (keybuf), arg);
res.status = pk_get_conv_key(uid, arg, &res);
@ -517,7 +517,7 @@ key_encrypt_1_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
(void) fprintf(stderr, "encrypt(%ld, %s, %08x%08x) = ", uid,
(void) fprintf(stderr, "encrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@ -545,7 +545,7 @@ key_decrypt_1_svc_prog(uid, arg)
static cryptkeyres res;
if (debugging) {
(void) fprintf(stderr, "decrypt(%ld, %s, %08x%08x) = ", uid,
(void) fprintf(stderr, "decrypt(%u, %s, %08x%08x) = ", uid,
arg->remotename, arg->deskey.key.high,
arg->deskey.key.low);
}
@ -789,7 +789,7 @@ root_auth(trans, rqstp)
}
if (debugging)
fprintf(stderr, "local_uid %ld\n", uid);
fprintf(stderr, "local_uid %u\n", uid);
if (uid == 0)
return (1);
if (rqstp->rq_cred.oa_flavor == AUTH_SYS) {
@ -800,7 +800,7 @@ root_auth(trans, rqstp)
} else {
if (debugging)
fprintf(stderr,
"local_uid %ld mismatches auth %ld\n", uid,
"local_uid %u mismatches auth %u\n", uid,
((uid_t) ((struct authunix_parms *)rqstp->rq_clntcred)->aup_uid));
return (0);
}