summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-08-06 20:41:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-08-06 20:41:09 +0000
commitabdab9264887b198168dac150a9bbff44a774868 (patch)
tree26c311697fe239df4698e550f705fd8ef5a9a932 /libexec
parentcde63a0b937f284da8b2903ae196fc5bfb998ea8 (diff)
uid_t and gid_t, and use %u
Diffstat (limited to 'libexec')
-rw-r--r--libexec/atrun/atrun.c6
-rw-r--r--libexec/rpc.yppasswdd/yppasswdd_mkpw.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c
index e0c7ad4bf50..02baf1d1364 100644
--- a/libexec/atrun/atrun.c
+++ b/libexec/atrun/atrun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $ */
+/* $OpenBSD: atrun.c,v 1.8 1999/08/06 20:41:05 deraadt Exp $ */
/*
* atrun.c - run jobs queued by at; run with root privileges.
@@ -67,7 +67,7 @@
/* File scope variables */
static char *namep;
-static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $";
+static char rcsid[] = "$OpenBSD: atrun.c,v 1.8 1999/08/06 20:41:05 deraadt Exp $";
static int debug = 0;
/* Local functions */
@@ -205,7 +205,7 @@ run_file(filename, uid, gid)
(void)fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
(void)snprintf(fmt, sizeof(fmt),
- "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d",
+ "#!/bin/sh\n# atrun uid=%%u gid=%%u\n# mail %%%ds %%d",
LOGNAMESIZE);
if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) {
syslog(LOG_ERR, "File %s is in wrong format - aborting",
diff --git a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
index 621e2a1e33f..cd313e6e31d 100644
--- a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
+++ b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yppasswdd_mkpw.c,v 1.17 1998/01/28 21:20:37 maja Exp $ */
+/* $OpenBSD: yppasswdd_mkpw.c,v 1.18 1999/08/06 20:41:05 deraadt Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: yppasswdd_mkpw.c,v 1.17 1998/01/28 21:20:37 maja Exp $";
+static char rcsid[] = "$OpenBSD: yppasswdd_mkpw.c,v 1.18 1999/08/06 20:41:05 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -207,8 +207,8 @@ make_passwd(argp)
if (*p == '&')
n = n + strlen(pw.pw_name) - 1;
if (strlen(pw.pw_name) + 1 + strlen(pw.pw_passwd) + 1 +
- strlen((sprintf(buf, "%d", pw.pw_uid), buf)) + 1 +
- strlen((sprintf(buf, "%d", pw.pw_gid), buf)) + 1 +
+ strlen((sprintf(buf, "%u", pw.pw_uid), buf)) + 1 +
+ strlen((sprintf(buf, "%u", pw.pw_gid), buf)) + 1 +
strlen(pw.pw_gecos) + n + 1 + strlen(pw.pw_dir) + 1 +
strlen(pw.pw_shell) >= 1023)
goto fail;