From 8636b161b333b18525b6f5ffc5139079c29c0d63 Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 9 Jul 2001 09:24:06 +0000 Subject: Fix the type of the NULL arg to execl() Idea from: Theo de Raadt --- libexec/pppoed/pppoed.c | 2 +- libexec/rexecd/rexecd.c | 2 +- libexec/rshd/rshd.c | 2 +- libexec/telnetd/sys_term.c | 2 +- libexec/uucpd/uucpd.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libexec') 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); } -- cgit v1.1