summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/pfctl/parse.y6
-rw-r--r--sys/miscfs/umapfs/umap_vnops.c28
-rw-r--r--sys/ufs/ffs/ffs_alloc.c4
-rw-r--r--usr.bin/calendar/calendar.c14
-rw-r--r--usr.bin/lock/lock.c6
-rw-r--r--usr.bin/oldrdist/server.c8
-rw-r--r--usr.bin/rdist/common.c22
-rw-r--r--usr.bin/skeyinit/skeyinit.c4
-rw-r--r--usr.bin/sup/src/supfilesrv.c4
-rw-r--r--usr.bin/top/username.c4
-rw-r--r--usr.sbin/amd/amd/amd.c4
-rw-r--r--usr.sbin/cron/do_command.c14
-rw-r--r--usr.sbin/cron/popen.c8
-rw-r--r--usr.sbin/lpr/lpd/lpd.c6
14 files changed, 66 insertions, 66 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index e470fa36cae..41951cad855 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.104 2002/06/20 08:47:58 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.105 2002/06/23 03:07:21 deraadt Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -825,7 +825,7 @@ uid_item : uid {
uid : NUMBER {
if ($1 < 0 || $1 >= UID_MAX) {
- yyerror("illegal uid value %d", $1);
+ yyerror("illegal uid value %u", $1);
YYERROR;
}
$$ = $1;
@@ -893,7 +893,7 @@ gid_item : gid {
gid : NUMBER {
if ($1 < 0 || $1 >= GID_MAX) {
- yyerror("illegal gid value %d", $1);
+ yyerror("illegal gid value %u", $1);
YYERROR;
}
$$ = $1;
diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c
index 549621bdb1f..c6334821e56 100644
--- a/sys/miscfs/umapfs/umap_vnops.c
+++ b/sys/miscfs/umapfs/umap_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umap_vnops.c,v 1.14 2002/03/14 01:27:08 millert Exp $ */
+/* $OpenBSD: umap_vnops.c,v 1.15 2002/06/23 03:07:22 deraadt Exp $ */
/* $NetBSD: umap_vnops.c,v 1.5.4.1 1996/05/25 22:13:35 jtc Exp $ */
/*
@@ -182,7 +182,7 @@ umap_bypass(v)
credp = *credpp;
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user was %d, group %d\n",
+ printf("umap_bypass: user was %u, group %u\n",
credp->cr_uid, credp->cr_gid);
/* Map all ids in the credential structure. */
@@ -190,7 +190,7 @@ umap_bypass(v)
umap_mapids(vp1->v_mount, credp);
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user now %d, group %d\n",
+ printf("umap_bypass: user now %u, group %u\n",
credp->cr_uid, credp->cr_gid);
}
@@ -207,7 +207,7 @@ umap_bypass(v)
compcredp = (*compnamepp)->cn_cred;
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user was %d, group %d\n",
+ printf("umap_bypass: component credit user was %u, group %u\n",
compcredp->cr_uid, compcredp->cr_gid);
/* Map all ids in the credential structure. */
@@ -215,7 +215,7 @@ umap_bypass(v)
umap_mapids(vp1->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user now %d, group %d\n",
+ printf("umap_bypass: component credit user now %u, group %u\n",
compcredp->cr_uid, compcredp->cr_gid);
}
@@ -263,26 +263,26 @@ umap_bypass(v)
if (descp->vdesc_cred_offset != VDESC_NO_OFFSET
&& *credpp != NOCRED) {
if (umap_bug_bypass && credp && credp->cr_uid != 0)
- printf("umap_bypass: returning-user was %d\n",
+ printf("umap_bypass: returning-user was %u\n",
credp->cr_uid);
crfree(credp);
*credpp = savecredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-user now %d\n\n",
+ printf("umap_bypass: returning-user now %u\n\n",
savecredp->cr_uid);
}
if (descp->vdesc_componentname_offset != VDESC_NO_OFFSET
&& savecompcredp != NOCRED ) {
if (umap_bug_bypass && compcredp && compcredp->cr_uid != 0)
- printf("umap_bypass: returning-component-user was %d\n",
+ printf("umap_bypass: returning-component-user was %u\n",
compcredp->cr_uid);
crfree(compcredp);
(*compnamepp)->cn_cred = savecompcredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-component-user now %d\n",
+ printf("umap_bypass: returning-component-user now %u\n",
savecompcredp->cr_uid);
}
@@ -331,7 +331,7 @@ umap_getattr(v)
uid = ap->a_vap->va_uid;
gid = ap->a_vap->va_gid;
if (umap_bug_bypass)
- printf("umap_getattr: mapped uid = %d, mapped gid = %d\n", uid,
+ printf("umap_getattr: mapped uid = %u, mapped gid = %u\n", uid,
gid);
vp1p = VOPARG_OFFSETTO(struct vnode**, descp->vdesc_vp_offsets[0], ap);
@@ -348,7 +348,7 @@ umap_getattr(v)
if (tmpid != -1) {
ap->a_vap->va_uid = (uid_t) tmpid;
if (umap_bug_bypass)
- printf("umap_getattr: original uid = %d\n", uid);
+ printf("umap_getattr: original uid = %u\n", uid);
} else
ap->a_vap->va_uid = (uid_t) NOBODY;
@@ -359,7 +359,7 @@ umap_getattr(v)
if (tmpid != -1) {
ap->a_vap->va_gid = (gid_t) tmpid;
if (umap_bug_bypass)
- printf("umap_getattr: original gid = %d\n", gid);
+ printf("umap_getattr: original gid = %u\n", gid);
} else
ap->a_vap->va_gid = (gid_t) NULLGROUP;
@@ -541,7 +541,7 @@ umap_rename(v)
compcredp = compnamep->cn_cred = crdup(savecompcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user was %d, group %d\n",
+ printf("umap_rename: rename component credit user was %u, group %u\n",
compcredp->cr_uid, compcredp->cr_gid);
/* Map all ids in the credential structure. */
@@ -549,7 +549,7 @@ umap_rename(v)
umap_mapids(vp->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user now %d, group %d\n",
+ printf("umap_rename: rename component credit user now %u, group %u\n",
compcredp->cr_uid, compcredp->cr_gid);
error = umap_bypass(ap);
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 1b89552d9d5..76946df2b6b 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_alloc.c,v 1.41 2002/03/14 03:16:13 millert Exp $ */
+/* $OpenBSD: ffs_alloc.c,v 1.42 2002/06/23 03:07:22 deraadt Exp $ */
/* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */
/*
@@ -1789,5 +1789,5 @@ ffs_fserr(fs, uid, cp)
char *cp;
{
- log(LOG_ERR, "uid %d on %s: %s\n", uid, fs->fs_fsmnt, cp);
+ log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->fs_fsmnt, cp);
}
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c
index d9288ef3ffc..9ea6589bdd3 100644
--- a/usr.bin/calendar/calendar.c
+++ b/usr.bin/calendar/calendar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: calendar.c,v 1.17 2002/02/16 21:27:44 millert Exp $ */
+/* $OpenBSD: calendar.c,v 1.18 2002/06/23 03:07:21 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
#else
-static char rcsid[] = "$OpenBSD: calendar.c,v 1.17 2002/02/16 21:27:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: calendar.c,v 1.18 2002/06/23 03:07:21 deraadt Exp $";
#endif
#endif /* not lint */
@@ -190,8 +190,8 @@ main(argc, argv)
(void)setlocale(LC_ALL, "");
if (setusercontext(NULL, pw, pw->pw_uid,
LOGIN_SETALL ^ LOGIN_SETLOGIN))
- err(1, "unable to set user context (uid %d)",
- (int)pw->pw_uid);
+ err(1, "unable to set user context (uid %u)",
+ pw->pw_uid);
if (acstat) {
if (chdir(pw->pw_dir) ||
stat(calendarFile, &sbuf) != 0 ||
@@ -233,11 +233,11 @@ main(argc, argv)
* if there's only a zombie now.
*/
(void)kill(kid, SIGTERM);
- warnx("uid %d did not finish in time", (int)pw->pw_uid);
+ warnx("uid %u did not finish in time", pw->pw_uid);
}
if (time(NULL) - t >= SECSPERDAY)
- errx(2, "'calendar -a' took more than a day; stopped at uid %d",
- (int)pw->pw_uid);
+ errx(2, "'calendar -a' took more than a day; stopped at uid %u",
+ pw->pw_uid);
}
for (;;) {
deadkid = waitpid(-1, &kidstat, WNOHANG);
diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c
index 8286d42a054..ab321a2d24c 100644
--- a/usr.bin/lock/lock.c
+++ b/usr.bin/lock/lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.c,v 1.16 2002/05/08 18:04:43 millert Exp $ */
+/* $OpenBSD: lock.c,v 1.17 2002/06/23 03:07:21 deraadt Exp $ */
/* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: lock.c,v 1.16 2002/05/08 18:04:43 millert Exp $";
+static char rcsid[] = "$OpenBSD: lock.c,v 1.17 2002/06/23 03:07:21 deraadt Exp $";
#endif /* not lint */
/*
@@ -109,7 +109,7 @@ main(argc, argv)
no_timeout = 0;
if (!(pw = getpwuid(getuid())))
- errx(1, "unknown uid %d.", getuid());
+ errx(1, "unknown uid %u.", getuid());
lc = login_getclass(pw->pw_class);
diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c
index 973fea3ab71..33ff3cb3df3 100644
--- a/usr.bin/oldrdist/server.c
+++ b/usr.bin/oldrdist/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.19 2002/06/12 06:07:16 mpech Exp $ */
+/* $OpenBSD: server.c,v 1.20 2002/06/23 03:07:21 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: server.c,v 1.19 2002/06/12 06:07:16 mpech Exp $";
+static char *rcsid = "$OpenBSD: server.c,v 1.20 2002/06/23 03:07:21 deraadt Exp $";
#endif /* not lint */
#include <sys/wait.h>
@@ -392,14 +392,14 @@ sendf(rname, opts)
if (pw == NULL || pw->pw_uid != stb.st_uid)
if ((pw = getpwuid(stb.st_uid)) == NULL) {
- log(lfp, "%s: no password entry for uid %d \n",
+ log(lfp, "%s: no password entry for uid %u \n",
target, stb.st_uid);
pw = NULL;
(void) snprintf(user, sizeof(user), ":%lu", stb.st_uid);
}
if (gr == NULL || gr->gr_gid != stb.st_gid)
if ((gr = getgrgid(stb.st_gid)) == NULL) {
- log(lfp, "%s: no name for group %d\n",
+ log(lfp, "%s: no name for group %u\n",
target, stb.st_gid);
gr = NULL;
(void) snprintf(group, sizeof(group), ":%lu",
diff --git a/usr.bin/rdist/common.c b/usr.bin/rdist/common.c
index beafd3b257f..d4e72c20cb9 100644
--- a/usr.bin/rdist/common.c
+++ b/usr.bin/rdist/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.15 2002/06/12 06:07:16 mpech Exp $ */
+/* $OpenBSD: common.c,v 1.16 2002/06/23 03:07:22 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -39,7 +39,7 @@ static char RCSid[] =
"$From: common.c,v 6.82 1998/03/23 23:27:33 michaelc Exp $";
#else
static char RCSid[] =
-"$OpenBSD: common.c,v 1.15 2002/06/12 06:07:16 mpech Exp $";
+"$OpenBSD: common.c,v 1.16 2002/06/23 03:07:22 deraadt Exp $";
#endif
static char sccsid[] = "@(#)common.c";
@@ -156,7 +156,7 @@ extern int init(argc, argv, envp)
pw = getpwuid(userid = getuid());
if (pw == NULL) {
- error("Your user id (%d) is not known to this system.",
+ error("Your user id (%u) is not known to this system.",
getuid());
return(-1);
}
@@ -552,7 +552,7 @@ extern char *getusername(uid, file, opts)
* do the opts check.
*/
if (IS_ON(opts, DO_NUMCHKOWNER)) {
- (void) sprintf(buf, ":%d", uid);
+ (void) sprintf(buf, ":%u", uid);
return(buf);
}
@@ -566,8 +566,8 @@ extern char *getusername(uid, file, opts)
if ((pwd = getpwuid(uid)) == NULL) {
message(MT_WARNING,
- "%s: No password entry for uid %d", file, uid);
- (void) sprintf(buf, ":%d", uid);
+ "%s: No password entry for uid %u", file, uid);
+ (void) sprintf(buf, ":%u", uid);
} else
(void) strcpy(buf, pwd->pw_name);
@@ -591,7 +591,7 @@ extern char *getgroupname(gid, file, opts)
* do the opts check.
*/
if (IS_ON(opts, DO_NUMCHKGROUP)) {
- (void) sprintf(buf, ":%d", gid);
+ (void) sprintf(buf, ":%u", gid);
return(buf);
}
@@ -604,8 +604,8 @@ extern char *getgroupname(gid, file, opts)
lastgid = gid;
if ((grp = (struct group *)getgrgid(gid)) == NULL) {
- message(MT_WARNING, "%s: No name for group %d", file, gid);
- (void) sprintf(buf, ":%d", gid);
+ message(MT_WARNING, "%s: No name for group %u", file, gid);
+ (void) sprintf(buf, ":%u", gid);
} else
(void) strcpy(buf, grp->gr_name);
@@ -732,7 +732,7 @@ extern int becomeuser()
#endif /* HAVE_SAVED_IDS */
if (r < 0)
- error("becomeuser %d failed: %s (ruid = %d euid = %d)",
+ error("becomeuser %d failed: %s (ruid = %u euid = %u)",
userid, SYSERR, getuid(), geteuid());
return(r);
@@ -754,7 +754,7 @@ extern int becomeroot()
#endif /* HAVE_SAVED_IDS */
if (r < 0)
- error("becomeroot failed: %s (ruid = %d euid = %d)",
+ error("becomeroot failed: %s (ruid = %u euid = %u)",
SYSERR, getuid(), geteuid());
return(r);
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 00b7547c259..a85728a349d 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.39 2002/06/07 21:53:43 millert Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.40 2002/06/23 03:07:22 deraadt Exp $ */
/* OpenBSD S/Key (skeyinit.c)
*
@@ -80,7 +80,7 @@ main(int argc, char **argv)
*p = '\0';
if ((pp = getpwuid(getuid())) == NULL)
- err(1, "no user with uid %d", getuid());
+ err(1, "no user with uid %u", getuid());
(void)strcpy(me, pp->pw_name);
if ((pp = getpwnam(me)) == NULL)
diff --git a/usr.bin/sup/src/supfilesrv.c b/usr.bin/sup/src/supfilesrv.c
index a762ab594c5..e8fbbf149b4 100644
--- a/usr.bin/sup/src/supfilesrv.c
+++ b/usr.bin/sup/src/supfilesrv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supfilesrv.c,v 1.29 2002/06/12 06:07:16 mpech Exp $ */
+/* $OpenBSD: supfilesrv.c,v 1.30 2002/06/23 03:07:22 deraadt Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -1691,7 +1691,7 @@ changeuid(namep, passwordp, fileuid, filegid)
pwd = getpwuid(fileuid);
if (pwd == NULL) {
(void) snprintf(errbuf, sizeof errbuf,
- "Reason: Unknown user id %d", fileuid);
+ "Reason: Unknown user id %u", fileuid);
return (errbuf);
}
grp = getgrgid(filegid);
diff --git a/usr.bin/top/username.c b/usr.bin/top/username.c
index 4178304e733..01ecd8046ef 100644
--- a/usr.bin/top/username.c
+++ b/usr.bin/top/username.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: username.c,v 1.5 2002/02/16 21:27:55 millert Exp $ */
+/* $OpenBSD: username.c,v 1.6 2002/06/23 03:07:22 deraadt Exp $ */
/*
* Top users/processes display for Unix
@@ -117,7 +117,7 @@ int wecare; /* 1 = enter it always, 0 = nice to have */
int hashindex;
#ifdef DEBUG
- fprintf(stderr, "enter_hash(%d, %s, %d)\n", uid, name, wecare);
+ fprintf(stderr, "enter_hash(%u, %s, %d)\n", uid, name, wecare);
#endif
hashindex = hashit(uid);
diff --git a/usr.sbin/amd/amd/amd.c b/usr.sbin/amd/amd/amd.c
index b3bdfbc07cf..da1469040e2 100644
--- a/usr.sbin/amd/amd/amd.c
+++ b/usr.sbin/amd/amd/amd.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amd.c 8.1 (Berkeley) 6/6/93
- * $Id: amd.c,v 1.7 2002/06/11 05:29:54 itojun Exp $
+ * $Id: amd.c,v 1.8 2002/06/23 03:07:18 deraadt Exp $
*/
#ifndef lint
@@ -302,7 +302,7 @@ char *argv[];
* Now check we are root.
*/
if (geteuid() != 0) {
- plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %d)", geteuid());
+ plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %u)", geteuid());
going_down(1);
}
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c
index abe7f6e8234..c11b207d1c8 100644
--- a/usr.sbin/cron/do_command.c
+++ b/usr.sbin/cron/do_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: do_command.c,v 1.15 2002/06/21 21:10:32 millert Exp $ */
+/* $OpenBSD: do_command.c,v 1.16 2002/06/23 03:07:19 deraadt Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*/
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char rcsid[] = "$OpenBSD: do_command.c,v 1.15 2002/06/21 21:10:32 millert Exp $";
+static char rcsid[] = "$OpenBSD: do_command.c,v 1.16 2002/06/23 03:07:19 deraadt Exp $";
#endif
#include "cron.h"
@@ -31,9 +31,9 @@ static int safe_p(const char *, const char *);
void
do_command(entry *e, user *u) {
- Debug(DPROC, ("[%ld] do_command(%s, (%s,%ld,%ld))\n",
+ Debug(DPROC, ("[%ld] do_command(%s, (%s,%lu,%lu))\n",
(long)getpid(), e->cmd, u->name,
- (long)e->uid, (long)e->gid))
+ (u_long)e->uid, (u_long)e->gid))
/* fork to become asynchronous -- parent process is done immediately,
* and continues to run the normal cron code, which means return to
@@ -203,16 +203,16 @@ child_process(entry *e, user *u) {
/* XXX - should just pass in a login_cap_t * */
pwd = getpwuid(e->uid);
if (pwd == NULL) {
- fprintf(stderr, "getpwuid: couldn't get entry for %d\n", e->uid);
+ fprintf(stderr, "getpwuid: couldn't get entry for %u\n", e->uid);
_exit(ERROR_EXIT);
}
if (setusercontext(0, pwd, e->uid, LOGIN_SETALL) < 0) {
- fprintf(stderr, "setusercontext failed for %d\n", e->uid);
+ fprintf(stderr, "setusercontext failed for %u\n", e->uid);
_exit(ERROR_EXIT);
}
#ifdef BSD_AUTH
if (auth_approval(0, 0, pwd->pw_name, "cron") <= 0) {
- fprintf(stderr, "approval failed for %d\n", e->uid);
+ fprintf(stderr, "approval failed for %u\n", e->uid);
_exit(ERROR_EXIT);
}
#endif /* BSD_AUTH */
diff --git a/usr.sbin/cron/popen.c b/usr.sbin/cron/popen.c
index 3a5722face1..582cf709976 100644
--- a/usr.sbin/cron/popen.c
+++ b/usr.sbin/cron/popen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popen.c,v 1.13 2002/01/09 00:51:00 millert Exp $ */
+/* $OpenBSD: popen.c,v 1.14 2002/06/23 03:07:19 deraadt Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$OpenBSD: popen.c,v 1.13 2002/01/09 00:51:00 millert Exp $";
+static char rcsid[] = "$OpenBSD: popen.c,v 1.14 2002/06/23 03:07:19 deraadt Exp $";
#endif
#endif /* not lint */
@@ -133,11 +133,11 @@ cron_popen(program, type, e)
pwd = getpwuid(e->uid);
if (pwd == NULL) {
- fprintf(stderr, "getpwuid: couldn't get entry for %d\n", e->uid);
+ fprintf(stderr, "getpwuid: couldn't get entry for %u\n", e->uid);
_exit(ERROR_EXIT);
}
if (setusercontext(0, pwd, e->uid, LOGIN_SETALL) < 0) {
- fprintf(stderr, "setusercontext failed for %d\n", e->uid);
+ fprintf(stderr, "setusercontext failed for %u\n", e->uid);
_exit(ERROR_EXIT);
}
#else
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 2add61f1952..bc66f6dc2e3 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.36 2002/06/11 22:47:07 millert Exp $ */
+/* $OpenBSD: lpd.c,v 1.37 2002/06/23 03:07:19 deraadt Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -45,7 +45,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#else
-static const char rcsid[] = "$OpenBSD: lpd.c,v 1.36 2002/06/11 22:47:07 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lpd.c,v 1.37 2002/06/23 03:07:19 deraadt Exp $";
#endif
#endif /* not lint */
@@ -160,7 +160,7 @@ main(int argc, char **argv)
* We want to run with euid of daemon most of the time.
*/
if ((pw = getpwuid(DEFUID)) == NULL)
- errx(1, "daemon uid (%d) not in password file", DEFUID);
+ errx(1, "daemon uid (%u) not in password file", DEFUID);
real_uid = pw->pw_uid;
real_gid = pw->pw_gid;
effective_uid = 0;