Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
This commit is contained in:
parent
ef44874abb
commit
8636b161b3
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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*/
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ const char *shell;
|
||||
if (!fork()) {
|
||||
/* revoke */
|
||||
setgid(getgid());
|
||||
execl(shell, shell, 0);
|
||||
execl(shell, shell, (char *)0);
|
||||
}
|
||||
wait(w);
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 @@ new_volume (type)
|
||||
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:
|
||||
|
@ -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 (;;) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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 */
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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]);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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);;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 (;;) {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user