summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-09 07:05:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-09 07:05:10 +0000
commite794dc8249450a31cf35cb2aa88a33779325b689 (patch)
tree7fe943aa48c43bd24ed6b9267ab44c0191c44d4a /usr.sbin
parent5b1ba3114a10793470c731e714160f24131b690d (diff)
correct type on last arg to execl(); nordin@cse.ogi.edu
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/afs/src/appl/afsutils/klog.c4
-rw-r--r--usr.sbin/afs/src/lwp/testlwp.c6
-rw-r--r--usr.sbin/apmd/apmd.c4
-rw-r--r--usr.sbin/cron/crontab.c6
-rw-r--r--usr.sbin/httpd/src/main/http_log.c6
-rw-r--r--usr.sbin/httpd/src/main/util_script.c8
-rw-r--r--usr.sbin/httpd/src/modules/ssl/ssl_util.c2
-rw-r--r--usr.sbin/httpd/src/modules/standard/mod_rewrite.c4
-rw-r--r--usr.sbin/lpr/lpd/printjob.c8
-rw-r--r--usr.sbin/pkg_install/lib/file.c8
-rw-r--r--usr.sbin/ppp/ppp/command.c4
-rw-r--r--usr.sbin/pppoe/common.c4
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_proc.c12
13 files changed, 38 insertions, 38 deletions
diff --git a/usr.sbin/afs/src/appl/afsutils/klog.c b/usr.sbin/afs/src/appl/afsutils/klog.c
index 9bf800b8d15..16ab67b2db5 100644
--- a/usr.sbin/afs/src/appl/afsutils/klog.c
+++ b/usr.sbin/afs/src/appl/afsutils/klog.c
@@ -56,7 +56,7 @@
#include <config.h>
#endif
-RCSID("$Id: klog.c,v 1.1 2000/09/11 14:40:33 art Exp $");
+RCSID("$Id: klog.c,v 1.2 2001/07/09 07:04:59 deraadt Exp $");
#include "appl_locl.h"
#include "klog.h"
@@ -787,7 +787,7 @@ main(int argc, char **argv)
shell = pwd->pw_shell;
}
- execl(shell, shell, NULL);
+ execl(shell, shell, (char *)NULL);
/* the AFS token is useless if the shell exec fails, because it
is in a PAG that will soon go away. */
diff --git a/usr.sbin/afs/src/lwp/testlwp.c b/usr.sbin/afs/src/lwp/testlwp.c
index 7fbeb1b7bd2..14cf825165b 100644
--- a/usr.sbin/afs/src/lwp/testlwp.c
+++ b/usr.sbin/afs/src/lwp/testlwp.c
@@ -43,7 +43,7 @@
* multiple commands on the command line to run several tests at the
* same time.
*
- * $Id: testlwp.c,v 1.3 2000/09/11 14:41:10 art Exp $
+ * $Id: testlwp.c,v 1.4 2001/07/09 07:04:59 deraadt Exp $
*
*/
@@ -198,7 +198,7 @@ startSelectPC (char *progname)
if (dup2(pipa[1], 0) == -1)
err(1, "dup2");
close(pipa[1]);
- execl(progname, "testlwp", "selectproducer", NULL);
+ execl(progname, "testlwp", "selectproducer", (char *)NULL);
err(1, "execl");
default:
break;
@@ -299,7 +299,7 @@ int main(int argc, char **argv)
yaEndlessLoop();
} else if (strcasecmp("version", argv[1]) == 0) {
printf("Version: "
- "$Id: testlwp.c,v 1.3 2000/09/11 14:41:10 art Exp $\n");
+ "$Id: testlwp.c,v 1.4 2001/07/09 07:04:59 deraadt Exp $\n");
exit (0);
} else {
printf("unknown command %s\n", argv[1]);
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 44e98dd103d..a7b2ab84229 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.15 2001/07/07 01:10:42 mickey Exp $ */
+/* $OpenBSD: apmd.c,v 1.16 2001/07/09 07:05:00 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -522,7 +522,7 @@ do_etc_file(const char *file)
return;
case 0:
/* We are the child. */
- execl(file, prog, NULL);
+ execl(file, prog, (char *)NULL);
_exit(1);
/* NOTREACHED */
default:
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index 2846971c657..e36ee83826a 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.19 2001/02/18 19:48:32 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.20 2001/07/09 07:05:00 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: crontab.c,v 1.19 2001/02/18 19:48:32 millert Exp $";
+static char rcsid[] = "$OpenBSD: crontab.c,v 1.20 2001/07/09 07:05:00 deraadt Exp $";
#endif
/* crontab - install and manage per-user crontab files
@@ -419,7 +419,7 @@ edit_cmd(void) {
ProgramName);
exit(ERROR_EXIT);
}
- execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", q, NULL);
+ execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", q, (char *)NULL);
perror(editor);
exit(ERROR_EXIT);
/*NOTREACHED*/
diff --git a/usr.sbin/httpd/src/main/http_log.c b/usr.sbin/httpd/src/main/http_log.c
index 409ede21ee4..def2f335036 100644
--- a/usr.sbin/httpd/src/main/http_log.c
+++ b/usr.sbin/httpd/src/main/http_log.c
@@ -187,7 +187,7 @@ static int error_log_child(void *cmd, child_info *pinfo)
child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
return(child_pid);
#else
- execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
+ execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, (char *)NULL);
#endif
exit(1);
/* NOT REACHED */
@@ -623,7 +623,7 @@ static int piped_log_spawn(piped_log *pl)
ap_cleanup_for_exec();
signal(SIGCHLD, SIG_DFL); /* for HPUX */
signal(SIGHUP, SIG_IGN);
- execl(SHELL_PATH, SHELL_PATH, "-c", pl->program, NULL);
+ execl(SHELL_PATH, SHELL_PATH, "-c", pl->program, (char *)NULL);
fprintf(stderr,
"piped_log_spawn: unable to exec %s -c '%s': %s\n",
SHELL_PATH, pl->program, strerror (errno));
@@ -772,7 +772,7 @@ static int piped_log_child(void *cmd, child_info *pinfo)
child_pid = spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
return(child_pid);
#else
- execl (SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
+ execl (SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, (char *)NULL);
#endif
perror("exec");
fprintf(stderr, "Exec of shell for logging failed!!!\n");
diff --git a/usr.sbin/httpd/src/main/util_script.c b/usr.sbin/httpd/src/main/util_script.c
index 6474a501b8b..ce214a05fe7 100644
--- a/usr.sbin/httpd/src/main/util_script.c
+++ b/usr.sbin/httpd/src/main/util_script.c
@@ -1252,12 +1252,12 @@ API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0,
if (shellcmd) {
execle(SUEXEC_BIN, SUEXEC_BIN, execuser, grpname, argv0,
- NULL, env);
+ (char *)NULL, env);
}
else if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) {
execle(SUEXEC_BIN, SUEXEC_BIN, execuser, grpname, argv0,
- NULL, env);
+ (char *)NULL, env);
}
else {
@@ -1269,11 +1269,11 @@ API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0,
}
else {
if (shellcmd) {
- execle(SHELL_PATH, SHELL_PATH, "-c", argv0, NULL, env);
+ execle(SHELL_PATH, SHELL_PATH, "-c", argv0, (char *)NULL, env);
}
else if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) {
- execle(r->filename, argv0, NULL, env);
+ execle(r->filename, argv0, (char *)NULL, env);
}
else {
diff --git a/usr.sbin/httpd/src/modules/ssl/ssl_util.c b/usr.sbin/httpd/src/modules/ssl/ssl_util.c
index af4a9672f25..2fefbb45037 100644
--- a/usr.sbin/httpd/src/modules/ssl/ssl_util.c
+++ b/usr.sbin/httpd/src/modules/ssl/ssl_util.c
@@ -258,7 +258,7 @@ int ssl_util_ppopen_child(void *cmd, child_info *pinfo)
spawnl(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
#else
/* Standard Unix */
- execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
+ execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, (char *)NULL);
#endif
return (child_pid);
}
diff --git a/usr.sbin/httpd/src/modules/standard/mod_rewrite.c b/usr.sbin/httpd/src/modules/standard/mod_rewrite.c
index 229771bb801..993b7b64960 100644
--- a/usr.sbin/httpd/src/modules/standard/mod_rewrite.c
+++ b/usr.sbin/httpd/src/modules/standard/mod_rewrite.c
@@ -3377,10 +3377,10 @@ static int rewritemap_program_child(void *cmd, child_info *pinfo)
// Need something here!!! Spawn????
#elif defined(OS2)
/* IBM OS/2 */
- execl(SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
+ execl(SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, (char *)NULL);
#else
/* Standard Unix */
- execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
+ execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, (char *)NULL);
#endif
return(child_pid);
}
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 6b1b63d4d15..046e08d5b43 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printjob.c,v 1.22 2001/06/22 15:27:20 lebel Exp $ */
+/* $OpenBSD: printjob.c,v 1.23 2001/07/09 07:05:02 deraadt Exp $ */
/* $NetBSD: printjob.c,v 1.9.4.3 1996/07/12 22:31:39 jtc Exp $ */
/*
@@ -569,7 +569,7 @@ print(format, file)
for (n = 3, nofile = sysconf(_SC_OPEN_MAX); n < nofile; n++)
(void) close(n);
execl(_PATH_PR, "pr", width, length,
- "-h", *title ? title : " ", 0);
+ "-h", *title ? title : " ", (char *)NULL);
syslog(LOG_ERR, "cannot execl %s", _PATH_PR);
exit(2);
}
@@ -1052,7 +1052,7 @@ sendmail(user, bombed)
cp++;
else
cp = _PATH_SENDMAIL;
- execl(_PATH_SENDMAIL, cp, "-t", 0);
+ execl(_PATH_SENDMAIL, cp, "-t", (char *)NULL);
exit(0);
} else if (s > 0) { /* parent */
dup2(p[1], 1);
@@ -1288,7 +1288,7 @@ openpr()
cp = OF;
else
cp++;
- execl(OF, cp, width, length, 0);
+ execl(OF, cp, width, length, (char *)NULL);
syslog(LOG_ERR, "%s: %s: %m", printer, OF);
exit(1);
}
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index cf4f754236a..21848a7a64e 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: file.c,v 1.14 2001/04/08 16:45:47 espie Exp $ */
+/* $OpenBSD: file.c,v 1.15 2001/07/09 07:05:03 deraadt Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: file.c,v 1.14 2001/04/08 16:45:47 espie Exp $";
+static const char *rcsid = "$OpenBSD: file.c,v 1.15 2001/07/09 07:05:03 deraadt Exp $";
#endif
/*
@@ -87,7 +87,7 @@ ftpGetURL(char *url, int *retcode)
close(p[1]);
fprintf(stderr, ">>> ftp -o - %s\n",url);
- execl("/usr/bin/ftp","ftp","-V","-o","-",url,NULL);
+ execl("/usr/bin/ftp","ftp","-V","-o","-",url,(char *)NULL);
exit(1);
} else {
/* parent */
@@ -342,7 +342,7 @@ fileGetURL(char *base, char *spec)
tpid = fork();
if (!tpid) {
dup2(fileno(ftp), 0);
- i = execl("/bin/tar", "tar", Verbose ? "-xpzvf" : "-xpzf", "-", 0);
+ i = execl("/bin/tar", "tar", Verbose ? "-xpzvf" : "-xpzf", "-", (char *)NULL);
exit(i);
}
else {
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c
index 50a5da493b4..dafdd2c8628 100644
--- a/usr.sbin/ppp/ppp/command.c
+++ b/usr.sbin/ppp/ppp/command.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: command.c,v 1.63 2001/07/09 00:08:54 brian Exp $
+ * $OpenBSD: command.c,v 1.64 2001/07/09 07:05:03 deraadt Exp $
*/
#include <sys/param.h>
@@ -558,7 +558,7 @@ ShellCommand(struct cmdargs const *arg, int bg)
if (arg->prompt)
printf("ppp: Pausing until %s finishes\n", shell);
prompt_TtyOldMode(arg->prompt);
- execl(shell, shell, NULL);
+ execl(shell, shell, (char *)NULL);
}
log_Printf(LogWARN, "exec() of %s failed: %s\n",
diff --git a/usr.sbin/pppoe/common.c b/usr.sbin/pppoe/common.c
index d49ab6ef516..0de402e942f 100644
--- a/usr.sbin/pppoe/common.c
+++ b/usr.sbin/pppoe/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.4 2001/04/24 05:04:51 jason Exp $ */
+/* $OpenBSD: common.c,v 1.5 2001/07/09 07:05:04 deraadt Exp $ */
/*
* Copyright (c) 2000 Network Security Technologies, Inc. http://www.netsec.net
@@ -116,7 +116,7 @@ runppp(bpffd, sysname)
if (closeit)
close(fds);
- execlp(PPP_PROG, "ppp", "-direct", sysname, NULL);
+ execlp(PPP_PROG, "ppp", "-direct", sysname, (char *)NULL);
perror("execlp");
syslog(LOG_INFO, "%s exec failed: %m", PPP_PROG);
_exit(1);
diff --git a/usr.sbin/ypserv/ypserv/ypserv_proc.c b/usr.sbin/ypserv/ypserv/ypserv_proc.c
index b72f44ce0d0..806c538d431 100644
--- a/usr.sbin/ypserv/ypserv/ypserv_proc.c
+++ b/usr.sbin/ypserv/ypserv/ypserv_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypserv_proc.c,v 1.15 1998/01/08 22:36:48 maja Exp $ */
+/* $OpenBSD: ypserv_proc.c,v 1.16 2001/07/09 07:05:06 deraadt Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_proc.c,v 1.15 1998/01/08 22:36:48 maja Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_proc.c,v 1.16 2001/07/09 07:05:06 deraadt Exp $";
#endif
#include <rpc/rpc.h>
@@ -311,7 +311,7 @@ ypproc_xfr_2_svc(argp, rqstp)
}
if (pid == 0) {
execl(ypxfr_proc, "ypxfr", "-d", argp->map_parms.domain,
- "-C",tid, prog, ipadd, port, argp->map_parms.map, NULL);
+ "-C",tid, prog, ipadd, port, argp->map_parms.map, (char *)NULL);
_exit(1);
}
@@ -932,7 +932,7 @@ bail:
}
if (pid == 0) {
execl(yppush_proc, "yppush", "-d", argp->yppush_req_domain,
- argp->yppush_req_map, NULL);
+ argp->yppush_req_map, (char *)NULL);
_exit(1);
}
@@ -980,7 +980,7 @@ bail:
}
if (pid == 0) {
execl(ypxfr_proc, "ypxfr", "-d", argp->yppull_req_domain,
- argp->yppull_req_map, NULL);
+ argp->yppull_req_map, (char *)NULL);
_exit(1);
}
@@ -1030,7 +1030,7 @@ bail:
}
if (pid == 0) {
execl(ypxfr_proc, "ypxfr", "-d", argp->ypget_req_domain, "-h",
- argp->ypget_req_owner, argp->yppush_req_map, NULL);
+ argp->ypget_req_owner, argp->yppush_req_map, (char *)NULL);
_exit(1);
}