summaryrefslogtreecommitdiff
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-23 03:07:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-23 03:07:23 +0000
commitb2e9efd3fb05b85dc11b3ea795320abfc2e86feb (patch)
treec4b3addfcfb980cd851b897d097c156230fd7a41 /usr.sbin/cron
parent66b10192a6c1f61e3bd3d3645bf3178ae7844f41 (diff)
uid_t and gid_t are unsigned
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/do_command.c14
-rw-r--r--usr.sbin/cron/popen.c8
2 files changed, 11 insertions, 11 deletions
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