From: Tom Yu Date: Thu, 7 Apr 2005 21:17:26 +0000 (+0000) Subject: pullup from trunk X-Git-Tag: krb5-1.4.3-beta1~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=37fc583f8eac27f09260aaa32714a0a85bf3377c;p=krb5.git pullup from trunk ticket: 3000 version_fixed: 1.4.1 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17168 dc483132-0cff-0310-8789-dd5450dbe970 --- 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); diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index e223a7750..3e090ca6e 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,8 @@ +2005-04-05 Ken Raeburn + + * commands.c (shell): Change 0 to (char*)NULL in execl calls. + Patch provided by Michael Calmer. + 2005-03-28 Tom Yu * telnet.c (slc_add_reply, slc_end_reply): Fix buffer overflow diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index a637e9e60..cb3390d38 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -1467,9 +1467,9 @@ shell(argc, argv) else shellname++; if (argc > 1) - execl(shellp, shellname, "-c", &saveline[1], 0); + execl(shellp, shellname, "-c", &saveline[1], (char *)NULL); else - execl(shellp, shellname, 0); + execl(shellp, shellname, (char *)NULL); perror("Execl"); _exit(1); }