From da78d45b12aaf21bc21309fe4d36517e830360c1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 6 Apr 2005 00:13:02 +0000 Subject: [PATCH] * krlogind.c (doit): Change 0 to (char*)NULL in execl* calls. Patch provided by Michael Calmer. * krshd.c (doit): Likewise. * login.c (main): Likewise. ticket: 3000 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17165 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 7 +++++++ src/appl/bsd/krlogind.c | 6 +++--- src/appl/bsd/krshd.c | 4 ++-- src/appl/bsd/login.c | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index fcf95173b..c5e5bc879 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,10 @@ +2005-04-05 Ken Raeburn + + * krlogind.c (doit): Change 0 to (char*)NULL in execl* calls. + Patch provided by Michael Calmer. + * krshd.c (doit): Likewise. + * login.c (main): Likewise. + 2004-10-01 Ken Raeburn * kcmd.c (kcmd_connect): Set *addrfamilyp with the address family diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index d2979e141..02bed8e37 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -833,12 +833,12 @@ void doit(f, fromp) fatalperror(f, "failed make_sane_hostname"); if (passwd_req) execl(login_program, "login", "-p", "-h", rhost_sane, - lusername, 0); + lusername, (char *)NULL); else execl(login_program, "login", "-p", "-h", rhost_sane, - "-f", lusername, 0); + "-f", lusername, (char *)NULL); #else /* USE_LOGIN_F */ - execl(login_program, "login", "-r", rhost_sane, 0); + execl(login_program, "login", "-r", rhost_sane, (char *)NULL); #endif /* USE_LOGIN_F */ syslog(LOG_ERR, "failed exec of %s: %s", login_program, error_message(errno)); diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 9fde43d6e..808adf5d5 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -1521,10 +1521,10 @@ void doit(f, fromp) cp = pwd->pw_shell; if (do_encrypt && !strncmp(cmdbuf, "-x ", 3)) { - execl(pwd->pw_shell, cp, "-c", (char *)cmdbuf + 3, 0); + execl(pwd->pw_shell, cp, "-c", (char *)cmdbuf + 3, (char *)NULL); } else { - execl(pwd->pw_shell, cp, "-c", cmdbuf, 0); + execl(pwd->pw_shell, cp, "-c", cmdbuf, (char *)NULL); } perror(pwd->pw_shell); perror(cp); diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index 6282a42f0..b49bababb 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -1861,7 +1861,7 @@ int main(argc, argv) (void) strncpy(tbuf+1, p?(p+1):pwd->pw_shell, sizeof(tbuf) - 1); tbuf[sizeof(tbuf) - 1] = '\0'; - execlp(pwd->pw_shell, tbuf, 0); + execlp(pwd->pw_shell, tbuf, (char *)NULL); fprintf(stderr, "login: no shell: "); perror(pwd->pw_shell); exit(0); -- 2.26.2