diff options
54 files changed, 95 insertions, 83 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index fe1d10d..3c4695e 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -331,7 +331,8 @@ copy(from, to) int pid, status; if ((pid = fork()) == 0) { - execl(_PATH_CP, "mv", vflg ? "-PRpv" : "-PRp", from, to, NULL); + execl(_PATH_CP, "mv", vflg ? "-PRpv" : "-PRp", from, to, + (char *)NULL); warn("%s", _PATH_CP); _exit(1); } @@ -349,7 +350,7 @@ copy(from, to) return (1); } if (!(pid = vfork())) { - execl(_PATH_RM, "mv", "-rf", from, NULL); + execl(_PATH_RM, "mv", "-rf", from, (char *)NULL); warn("%s", _PATH_RM); _exit(1); } diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index 12fe522..3651ca0 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -1345,7 +1345,8 @@ ar_start_gzip(int fd, const char *gzip_program, int wr) } close(fds[0]); close(fds[1]); - if (execlp(gzip_program, gzip_program, gzip_flags, NULL) < 0) + if (execlp(gzip_program, gzip_program, gzip_flags, + (char *)NULL) < 0) err(1, "could not exec"); /* NOTREACHED */ } diff --git a/bin/rcp/util.c b/bin/rcp/util.c index 55c474f..8f6f123 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -123,7 +123,7 @@ susystem(s, userid) case 0: (void)setuid(userid); - execl(_PATH_BSHELL, "sh", "-c", s, NULL); + execl(_PATH_BSHELL, "sh", "-c", s, (char *)NULL); _exit(127); } istat = signal(SIGINT, SIG_IGN); diff --git a/games/atc/input.c b/games/atc/input.c index 88eb603..1b42ac5 100644 --- a/games/atc/input.c +++ b/games/atc/input.c @@ -339,10 +339,10 @@ gettoken() base = shell; else base++; - execl(shell, base, 0); + execl(shell, base, (char *)0); } else - execl(_PATH_BSHELL, "sh", 0); + execl(_PATH_BSHELL, "sh", (char *)0); exit(0); /* oops */ } diff --git a/games/larn/tok.c b/games/larn/tok.c index 449c7d2..9406dc0 100644 --- a/games/larn/tok.c +++ b/games/larn/tok.c @@ -74,7 +74,7 @@ yylex() { /* revoke */ setgid(getgid()); - execl("/bin/csh",0); exit(1); + execl("/bin/csh",(char *)0); exit(1); } wait(0); if (ic<0) /* error */ diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c index d0fbecc..f920832 100644 --- a/games/phantasia/misc.c +++ b/games/phantasia/misc.c @@ -962,7 +962,7 @@ static char *deathmesg[] = { cleanup(FALSE); execl(_PATH_GAMEPROG, "phantasia", "-s", - (Wizard ? "-S": (char *) NULL), 0); + (Wizard ? "-S": (char *) NULL), (char *)0); exit(0); /*NOTREACHED*/ } diff --git a/games/rogue/machdep.c b/games/rogue/machdep.c index 14316bc..055056a 100644 --- a/games/rogue/machdep.c +++ b/games/rogue/machdep.c @@ -547,7 +547,7 @@ const char *shell; if (!fork()) { /* revoke */ setgid(getgid()); - execl(shell, shell, 0); + execl(shell, shell, (char *)0); } wait(w); } diff --git a/games/wump/wump.c b/games/wump/wump.c index e8cc264..e670533 100644 --- a/games/wump/wump.c +++ b/games/wump/wump.c @@ -762,7 +762,7 @@ puff of greasy black smoke! (poof)\n"); err(1, "open %s", _PATH_WUMPINFO); if (dup2(fd, 0) == -1) err(1, "dup2"); - (void)execl("/bin/sh", "sh", "-c", pager, NULL); + (void)execl("/bin/sh", "sh", "-c", pager, (char *)NULL); err(1, "exec sh -c %s", pager); case -1: err(1, "fork"); diff --git a/gnu/lib/libdialog/raw_popen.c b/gnu/lib/libdialog/raw_popen.c index fabf91e..add71f1 100644 --- a/gnu/lib/libdialog/raw_popen.c +++ b/gnu/lib/libdialog/raw_popen.c @@ -32,6 +32,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -95,7 +97,7 @@ raw_popen(const char *program, char * const *argv, const char *type) (void)close(pdes[1]); } if (argv == NULL) - execl(_PATH_BSHELL, "sh", "-c", program, NULL); + execl(_PATH_BSHELL, "sh", "-c", program, (char *)NULL); else execvp(program, argv); _exit(127); diff --git a/gnu/usr.bin/as/input-file.c b/gnu/usr.bin/as/input-file.c index b9bb4be..23e6a32 100644 --- a/gnu/usr.bin/as/input-file.c +++ b/gnu/usr.bin/as/input-file.c @@ -173,8 +173,8 @@ int debugging; /* TRUE if we are debugging assembler. */ (void)dup2 (fd, fileno(stdout)); /* JF for testing #define PREPROCESSOR "/lib/app" */ #define PREPROCESSOR "./app" - execl (PREPROCESSOR, PREPROCESSOR, 0); - execl ("app","app",0); + execl (PREPROCESSOR, PREPROCESSOR, (char *)0); + execl ("app","app",(char *)0); (void)write(2,"Exec of app failed. Get help.\n",31); (void)unlink(temporary_file_name); _exit (11); diff --git a/gnu/usr.bin/tar/buffer.c b/gnu/usr.bin/tar/buffer.c index eb7e3ef..a49f59b 100644 --- a/gnu/usr.bin/tar/buffer.c +++ b/gnu/usr.bin/tar/buffer.c @@ -21,6 +21,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ * Buffer management for tar. * * Written by John Gilmore, ihnp4!hoptoad!gnu, on 25 August 1985. + * + * $FreeBSD$ */ #include <stdio.h> @@ -1505,7 +1507,7 @@ tryagain: p = getenv ("SHELL"); if (p == 0) p = "/bin/sh"; - execlp (p, "-sh", "-i", 0); + execlp (p, "-sh", "-i", (char *)0); msg_perror ("can't exec a shell %s", p); _exit (55); default: diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c index c6c70ffb..ce9eba2 100644 --- a/lib/libutil/pw_util.c +++ b/lib/libutil/pw_util.c @@ -174,11 +174,11 @@ char *username; if(!username) { warnx("rebuilding the database..."); execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath, - tempname, NULL); + tempname, (char *)NULL); } else { warnx("updating the database..."); execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath, - "-u", username, tempname, NULL); + "-u", username, tempname, (char *)NULL); } pw_error(_PATH_PWD_MKDB, 1, 1); } @@ -209,7 +209,7 @@ pw_edit(notsetuid) (void)setuid(getuid()); } errno = 0; - execlp(editor, p, tempname, NULL); + execlp(editor, p, tempname, (char *)NULL); _exit(errno); } for (;;) { diff --git a/libexec/pppoed/pppoed.c b/libexec/pppoed/pppoed.c index fa55252..bb46984 100644 --- a/libexec/pppoed/pppoed.c +++ b/libexec/pppoed/pppoed.c @@ -410,7 +410,7 @@ Spawn(const char *prog, const char *acname, const char *provider, setsid(); syslog(LOG_INFO, "Executing: %s", exec); - execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", exec, NULL); + execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", exec, (char *)NULL); syslog(LOG_ERR, "execlp failed: %m"); _exit(EX_OSFILE); diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 00b51fd..a12072c 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -297,7 +297,7 @@ doit(f, fromp) error("No remote directory.\n"); exit(1); } - execl(pwd->pw_shell, cp, "-c", cmdbuf, 0); + execl(pwd->pw_shell, cp, "-c", cmdbuf, (char *)0); err(1, "%s", pwd->pw_shell); } diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 6353d35..5cef085 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -707,7 +707,7 @@ doit(fromp) syslog(LOG_INFO|LOG_AUTH, "%s@%s as %s: cmd='%.80s'", remuser, fromhost, locuser, cmdbuf); } - execl(pwd->pw_shell, cp, "-c", cmdbuf, 0); + execl(pwd->pw_shell, cp, "-c", cmdbuf, (char *)0); perror(pwd->pw_shell); exit(1); } diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index f5163cb..3102e0f 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -2080,7 +2080,7 @@ cleantmpdir(jid, tpath, user) tpath); break; case 0: - execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, 0); + execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, (char *)0); syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m", tpath, CLEANTMPCMD); exit(1); diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index e914189..7ca2b67 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -191,7 +191,7 @@ void doit(struct sockaddr *sinp) initgroups(pw->pw_name, pw->pw_gid); chdir(pw->pw_dir); setuid(pw->pw_uid); - execl(pw->pw_shell, "uucico", NULL); + execl(pw->pw_shell, "uucico", (char *)NULL); syslog(LOG_ERR, "execl: %m"); _exit(1); } diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c index 71ee339..8c8a20c 100644 --- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c +++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c @@ -258,7 +258,7 @@ http_request() /* Plug in environment variable, others in log_line */ putenv("SERVER_SOFTWARE=FreeBSD/PicoBSD"); - execlp (filename,filename,par,0); + execlp (filename,filename,par,(char *)0); } wait(&i); return(0); diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index cf3638f..7de7a36 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -909,7 +909,7 @@ editit() setuid(getuid()); if ((ed = getenv("EDITOR")) == (char *)0) ed = DEFEDITOR; - execlp(ed, ed, tmpfil, 0); + execlp(ed, ed, tmpfil, (char *)0); err(1, "%s", ed); } while ((xpid = wait(&stat)) >= 0) diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index cf3638f..7de7a36 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -909,7 +909,7 @@ editit() setuid(getuid()); if ((ed = getenv("EDITOR")) == (char *)0) ed = DEFEDITOR; - execlp(ed, ed, tmpfil, 0); + execlp(ed, ed, tmpfil, (char *)0); err(1, "%s", ed); } while ((xpid = wait(&stat)) >= 0) diff --git a/share/examples/isdn/v21/v21modem.c b/share/examples/isdn/v21/v21modem.c index 0906f35..f49eb06 100644 --- a/share/examples/isdn/v21/v21modem.c +++ b/share/examples/isdn/v21/v21modem.c @@ -241,7 +241,8 @@ create_session(void) i = forkpty(&ptyfd, buf, 0, 0); if (i == 0) { - execl("/usr/libexec/getty", "getty", "std.300", "-", NULL); + execl("/usr/libexec/getty", "getty", "std.300", "-", + (char *)NULL); syslog(LOG_ERR, "exec getty %d", errno); exit(2); } else if (i < 0) { diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index 0894957..1fc4796 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -244,7 +244,7 @@ exec_shell(const char *command, char *use_shell, char *use_name) err(1, "vfork"); case 0: /* child */ (void)sigsetmask(omask); - execl(use_shell, use_name, "-c", command, NULL); + execl(use_shell, use_name, "-c", command, (char *)NULL); warn("%s", use_shell); _exit(1); } diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 51ab84b..91e3f51 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -281,7 +281,7 @@ opencal() } execl(_PATH_CPP, "cpp", "-P", "-traditional", "-nostdinc", /* GCC specific opts */ - "-I.", "-I", _PATH_INCLUDE, NULL); + "-I.", "-I", _PATH_INCLUDE, (char *)NULL); warn(_PATH_CPP); _exit(1); } @@ -344,7 +344,7 @@ closecal(fp) _exit(1); } execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", - "\"Reminder Service\"", NULL); + "\"Reminder Service\"", (char *)NULL); warn(_PATH_SENDMAIL); _exit(1); } diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 3c624a2..475e9e8 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -3148,7 +3148,7 @@ char *string; /* string containing user command */ } for (value = 1; value < 24; value++) signal(value, SIG_DFL); - execl(path, last_slash, "-c", string, NULL); + execl(path, last_slash, "-c", string, (char *)NULL); errx(1, exec_err_msg, path); } else /* if the parent */ diff --git a/usr.bin/enigma/enigma.c b/usr.bin/enigma/enigma.c index 546b144..e1c2f94 100644 --- a/usr.bin/enigma/enigma.c +++ b/usr.bin/enigma/enigma.c @@ -56,11 +56,11 @@ setup(pw) close(1); dup(pf[0]); dup(pf[1]); - execlp("makekey", "-", 0); - execl("/usr/libexec/makekey", "-", 0); /* BSDI */ - execl("/usr/lib/makekey", "-", 0); - execl("/usr/bin/makekey", "-", 0); /* IBM */ - execl("/lib/makekey", "-", 0); + execlp("makekey", "-", (char *)0); + execl("/usr/libexec/makekey", "-", (char *)0); /* BSDI */ + execl("/usr/lib/makekey", "-", (char *)0); + execl("/usr/bin/makekey", "-", (char *)0); /* IBM */ + execl("/lib/makekey", "-", (char *)0); perror("makekey"); fprintf(stderr, "enigma: cannot execute 'makekey', aborting\n"); exit(1); diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 0f82b89..b618f45 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -204,7 +204,7 @@ char *argv[]; } break; case 0: - rval |= execl(*argv, *argv, NULL) != 0; + rval |= execl(*argv, *argv, (char *)NULL) != 0; warn("%s", *argv); _exit(1); } diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index c1f2baa..7d0f24a 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -704,7 +704,7 @@ main(argc, argv) (void)strcpy(tbuf + 1, (p = strrchr(pwd->pw_shell, '/')) ? p + 1 : pwd->pw_shell); - execlp(shell, tbuf, 0); + execlp(shell, tbuf, (char *)0); err(1, "%s", shell); } diff --git a/usr.bin/newkey/update.c b/usr.bin/newkey/update.c index 2f1c53f..23248ef 100644 --- a/usr.bin/newkey/update.c +++ b/usr.bin/newkey/update.c @@ -188,7 +188,7 @@ _openchild(command, fto, ffrom) _exit(~0); } (void)sprintf(com, "exec %s", command); - execl(SHELL, basename(SHELL), "-c", com, NULL); + execl(SHELL, basename(SHELL), "-c", com, (char *)NULL); _exit(~0); default: diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 5a19095f..b6a59c8 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -245,7 +245,7 @@ doshell(av) execvp(av[0], av); warn("%s", av[0]); } else { - execl(shell, shell, "-i", NULL); + execl(shell, shell, "-i", (char *)NULL); warn("%s", shell); } fail(); diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index d8160cc..fb3139c 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -1420,9 +1420,9 @@ shell(argc, argv) else shellname++; if (argc > 1) - execl(shellp, shellname, "-c", &saveline[1], 0); + execl(shellp, shellname, "-c", &saveline[1], (char *)0); else - execl(shellp, shellname, 0); + execl(shellp, shellname, (char *)0); perror("Execl"); _exit(1); } diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c index 10198ba..28b03ef 100644 --- a/usr.bin/tip/tip/cmds.c +++ b/usr.bin/tip/tip/cmds.c @@ -765,7 +765,7 @@ shell() else cp++; shell_uid(); - execl(value(SHELL), cp, 0); + execl(value(SHELL), cp, (char *)0); printf("\r\ncan't execl!\r\n"); exit(1); } @@ -865,7 +865,7 @@ execute(s) else cp++; shell_uid(); - execl(value(SHELL), cp, "-c", s, 0); + execl(value(SHELL), cp, "-c", s, (char *)0); } static int @@ -1051,7 +1051,7 @@ expand(name) close(pivec[1]); close(2); shell_uid(); - execl(Shell, Shell, "-c", cmdbuf, 0); + execl(Shell, Shell, "-c", cmdbuf, (char *)0); _exit(1); } if (pid == -1) { diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 55d59cc..9abe6a3 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -708,7 +708,7 @@ strip(to_name) errno = serrno; err(EX_TEMPFAIL, "fork"); case 0: - execlp("strip", "strip", to_name, NULL); + execlp("strip", "strip", to_name, (char *)NULL); err(EX_OSERR, "exec(strip)"); default: if (wait(&status) == -1 || status) { diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index ccd9c49..72f10d5 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -86,7 +86,7 @@ main(argc, argv) if (!(shell = getenv("SHELL"))) shell = _PATH_BSHELL; - execlp(shell, shell, "-i", NULL); + execlp(shell, shell, "-i", (char *)NULL); err(1, "%s", shell); /* NOTREACHED */ } diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index 3ff3e7d..d070cd7 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -408,7 +408,7 @@ edit_cmd() { err(ERROR_EXIT, "chdir(/tmp)"); if (strlen(editor) + strlen(Filename) + 2 >= MAX_TEMPSTR) errx(ERROR_EXIT, "editor or filename too long"); - execlp(editor, editor, Filename, NULL); + execlp(editor, editor, Filename, (char *)NULL); err(ERROR_EXIT, "%s", editor); /*NOTREACHED*/ default: diff --git a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c index 932cd43..b5a1411 100644 --- a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c +++ b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c @@ -185,7 +185,7 @@ run_sendmail(int ifd) case 0: /* Child */ dup2(ifd, 0); - execl(_PATH_SENDMAIL, _PATH_SENDMAIL, "-odq", "-t", NULL); + execl(_PATH_SENDMAIL, _PATH_SENDMAIL, "-odq", "-t", (char *)NULL); err("*exec: %s", _PATH_SENDMAIL); _exit(1); diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index 874325f..71dcd1b 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -385,7 +385,7 @@ editit(tmpfile) setuid(getuid()); if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; - execlp(ed, ed, tmpfile, 0); + execlp(ed, ed, tmpfile, (char *)0); err(1, "%s", ed); } waitpid(pid, &stat, 0); diff --git a/usr.sbin/kgzip/kgzcmp.c b/usr.sbin/kgzip/kgzcmp.c index b692315..5def730 100644 --- a/usr.sbin/kgzip/kgzcmp.c +++ b/usr.sbin/kgzip/kgzcmp.c @@ -136,7 +136,7 @@ mk_data(const struct iodesc * idi, const struct iodesc * ido, close(idi->fd); dup2(ido->fd, STDOUT_FILENO); close(ido->fd); - execlp("gzip", "gzip", "-9", NULL); + execlp("gzip", "gzip", "-9", (char *)NULL); warn(NULL); _exit(1); default: diff --git a/usr.sbin/kgzip/kgzld.c b/usr.sbin/kgzip/kgzld.c index 3e1d2d1..4f6acc8 100644 --- a/usr.sbin/kgzip/kgzld.c +++ b/usr.sbin/kgzip/kgzld.c @@ -85,10 +85,10 @@ kgzld(struct kgz_hdr * kh, const char *f1, const char *f2) case 0: if (format == F_AOUT) execlp("ld", "ld", "-aout", "-Z", "-T", addr, "-o", f2, - loader, f1, NULL); + loader, f1, (char *)NULL); else execlp("ld", "ld", "-Ttext", addr, "-o", f2, loader, f1, - NULL); + (char *)NULL); warn(NULL); _exit(1); default: diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index b46d278..66565f6 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -650,7 +650,7 @@ print(struct printer *pp, int format, char *file) execl(_PATH_PR, "pr", width, length, "-h", *title ? title : " ", "-L", *locale ? locale : "C", - "-F", 0); + "-F", (char *)0); syslog(LOG_ERR, "cannot execl %s", _PATH_PR); exit(2); } @@ -1315,7 +1315,7 @@ sendmail(struct printer *pp, char *user, int bombed) cp++; else cp = _PATH_SENDMAIL; - execl(_PATH_SENDMAIL, cp, "-t", 0); + execl(_PATH_SENDMAIL, cp, "-t", (char *)0); _exit(0); } else if (s > 0) { /* parent */ dup2(p[1], 1); @@ -1512,7 +1512,8 @@ openpr(const struct printer *pp) cp = pp->filters[LPF_OUTPUT]; else cp++; - execl(pp->filters[LPF_OUTPUT], cp, width, length, 0); + execl(pp->filters[LPF_OUTPUT], cp, width, length, + (char *)0); syslog(LOG_ERR, "%s: %s: %m", pp->printer, pp->filters[LPF_OUTPUT]); exit(1); diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index f2a4e4d..6c06d77 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -672,7 +672,7 @@ compress_log(char *log) if (pid < 0) err(1, "fork"); else if (!pid) { - (void) execl(_PATH_GZIP, _PATH_GZIP, "-f", tmp, 0); + (void) execl(_PATH_GZIP, _PATH_GZIP, "-f", tmp, (char *)0); err(1, _PATH_GZIP); } } diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index d1e4100..216d10f 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -225,7 +225,8 @@ fileGetURL(char *base, char *spec) dup2(pfd[0], 0); for (fd = getdtablesize() - 1; fd >= 3; --fd) close(fd); - execl("/usr/bin/tar", "tar", Verbose ? "-xzvf" : "-xzf", "-", 0); + execl("/usr/bin/tar", "tar", Verbose ? "-xzvf" : "-xzf", "-", + (char *)0); _exit(2); } close(pfd[0]); diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index b59b9f9..01ba43a 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -248,7 +248,7 @@ main(int argc, char *argv[]) warn("fork()"); else if (pid == 0) { /* Is make anywhere else? */ - execlp("/usr/bin/make", "make", NULL); + execlp("/usr/bin/make", "make", (char *)NULL); _exit(1); } else { int i; diff --git a/usr.sbin/rpc.yppasswdd/pw_util.c b/usr.sbin/rpc.yppasswdd/pw_util.c index 3f783c1..a93a630 100644 --- a/usr.sbin/rpc.yppasswdd/pw_util.c +++ b/usr.sbin/rpc.yppasswdd/pw_util.c @@ -152,10 +152,11 @@ char *username; install_reaper(0); if (!(pid = vfork())) { if(!username) { - execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL); + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, + (char *)NULL); } else { execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-u", username, - tempname, NULL); + tempname, (char *)NULL); } pw_error(_PATH_PWD_MKDB, 1, 1); return(-1); diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c index d9cac7d..2e0b092 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c @@ -651,10 +651,10 @@ cleaning up and bailing out"); case 0: if (inplace && !rval) { execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile, - yppasswd_domain, "pushpw", NULL); + yppasswd_domain, "pushpw", (char *)NULL); } else { execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile, - yppasswd_domain, NULL); + yppasswd_domain, (char *)NULL); } yp_error("couldn't exec map update process: %s", strerror(errno)); @@ -841,10 +841,10 @@ cleaning up and bailing out"); case 0: if (inplace && !rval) { execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile, - argp->domain, "pushpw", NULL); + argp->domain, "pushpw", (char *)NULL); } else { execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile, - argp->domain, NULL); + argp->domain, (char *)NULL); } yp_error("couldn't exec map update process: %s", strerror(errno)); diff --git a/usr.sbin/rpc.ypupdated/update.c b/usr.sbin/rpc.ypupdated/update.c index 996347b..376743b 100644 --- a/usr.sbin/rpc.ypupdated/update.c +++ b/usr.sbin/rpc.ypupdated/update.c @@ -193,7 +193,7 @@ _openchild(command, fto, ffrom) _exit(~0); } (void)sprintf(com, "exec %s", command); - execl(SHELL, basename(SHELL), "-c", com, NULL); + execl(SHELL, basename(SHELL), "-c", com, (char *)NULL); _exit(~0); default: diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c index c906dec..8fb1eba 100644 --- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c +++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c @@ -57,7 +57,7 @@ static int yp_domake(map, domain) switch((pid = fork())) { case 0: - execlp(MAP_UPDATE_PATH, MAP_UPDATE, map, domain, NULL); + execlp(MAP_UPDATE_PATH, MAP_UPDATE, map, domain, (char *)NULL); yp_error("couldn't exec map update process: %s", strerror(errno)); exit(1); diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 43dd702..ae3b7bb 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -446,7 +446,7 @@ fixit_common(void) /* use the .profile from the fixit medium */ setenv("HOME", "/mnt2", 1); chdir("/mnt2"); - execlp("sh", "-sh", 0); + execlp("sh", "-sh", (char *)0); msgDebug("fixit shell: Failed to execute shell!\n"); _exit(1);; } diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index b222d70..dbf0dc5 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -56,7 +56,7 @@ intr_reboot(dialogMenuItem *self) static int intr_restart(dialogMenuItem *self) { - execl(StartName, StartName, NULL); + execl(StartName, StartName, (char *)NULL); /* NOTREACHED */ return -1; } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 43dd702..ae3b7bb 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -446,7 +446,7 @@ fixit_common(void) /* use the .profile from the fixit medium */ setenv("HOME", "/mnt2", 1); chdir("/mnt2"); - execlp("sh", "-sh", 0); + execlp("sh", "-sh", (char *)0); msgDebug("fixit shell: Failed to execute shell!\n"); _exit(1);; } diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c index b2eb519..789d0a6 100644 --- a/usr.sbin/sysinstall/media.c +++ b/usr.sbin/sysinstall/media.c @@ -617,7 +617,7 @@ mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpid) } close(qfd[1]); close(pfd[0]); - i = execl(gunzip, gunzip, 0); + i = execl(gunzip, gunzip, (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", gunzip, i); exit(i); @@ -640,9 +640,9 @@ mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpid) dup2(1, 2); } if (strlen(cpioVerbosity())) - i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0); + i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), (char *)0); else - i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), 0); + i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", cpio, i); exit(i); @@ -705,7 +705,7 @@ mediaExtractDist(char *dir, char *dist, FILE *fp) close(2); open("/dev/null", O_WRONLY); } - i = execl(gunzip, gunzip, 0); + i = execl(gunzip, gunzip, (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", gunzip, i); exit(i); @@ -727,9 +727,9 @@ mediaExtractDist(char *dir, char *dist, FILE *fp) dup2(1, 2); } if (strlen(cpioVerbosity())) - i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0); + i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), (char *)0); else - i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), 0); + i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", cpio, i); exit(i); diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c index 73600bf..e7e6c2f 100644 --- a/usr.sbin/sysinstall/package.c +++ b/usr.sbin/sysinstall/package.c @@ -182,9 +182,11 @@ package_extract(Device *dev, char *name, Boolean depended) setenv("BATCH", "t", 1); if (isDebug()) - i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-v", "-", 0); + i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-v", "-", + (char *)0); else - i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-", 0); + i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-", + (char *)0); } else { char buf[BUFSIZ]; diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index b222d70..dbf0dc5 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -56,7 +56,7 @@ intr_reboot(dialogMenuItem *self) static int intr_restart(dialogMenuItem *self) { - execl(StartName, StartName, NULL); + execl(StartName, StartName, (char *)NULL); /* NOTREACHED */ return -1; } diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c index c6c70ffb..ce9eba2 100644 --- a/usr.sbin/vipw/pw_util.c +++ b/usr.sbin/vipw/pw_util.c @@ -174,11 +174,11 @@ char *username; if(!username) { warnx("rebuilding the database..."); execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath, - tempname, NULL); + tempname, (char *)NULL); } else { warnx("updating the database..."); execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", mppath, - "-u", username, tempname, NULL); + "-u", username, tempname, (char *)NULL); } pw_error(_PATH_PWD_MKDB, 1, 1); } @@ -209,7 +209,7 @@ pw_edit(notsetuid) (void)setuid(getuid()); } errno = 0; - execlp(editor, p, tempname, NULL); + execlp(editor, p, tempname, (char *)NULL); _exit(errno); } for (;;) { diff --git a/usr.sbin/ypserv/yp_server.c b/usr.sbin/ypserv/yp_server.c index aa95bba..774e1ad 100644 --- a/usr.sbin/ypserv/yp_server.c +++ b/usr.sbin/ypserv/yp_server.c @@ -380,7 +380,7 @@ ypproc_xfr_2_svc(ypreq_xfr *argp, struct svc_req *rqstp) "-p", yp_dir, "-C", t, g, inet_ntoa(rqhost->sin_addr), p, argp->map_parms.map, - NULL); + (char *)NULL); } else { execl(ypxfr_command, "ypxfr", "-d", argp->map_parms.domain, @@ -388,7 +388,7 @@ ypproc_xfr_2_svc(ypreq_xfr *argp, struct svc_req *rqstp) "-C", t, g, inet_ntoa(rqhost->sin_addr), p, argp->map_parms.map, - NULL); + (char *)NULL); } yp_error("ypxfr execl(%s): %s", ypxfr_command, strerror(errno)); YPXFR_RETURN(YPXFR_XFRERR) |