static void check_nologin (bool login_to_root)
{
- char *fname;
+ const char *fname;
/*
* Check to see if system is turned off for non-root users.
static void init_env (void)
{
#ifndef USE_PAM
- char *cp;
+ const char *cp;
#endif
char *tmp;
int err = 0;
gid_t gid;
char *cp;
+ char *progbase;
const char *name, *prog;
char *group = NULL;
char *command = NULL;
* Now I try to find the basename of the login shell. This will
* become argv[0] of the spawned command.
*/
- cp = Basename ((char *) prog);
+ progbase = (char *) Basename ((char *) prog);
/*
* Switch back to her home directory if i am doing login
* Exec the login shell and go away. We are trying to get back to
* the previous environment which should be the user's login shell.
*/
- err = shell (prog, initflag ? (char *) 0 : cp, newenvp);
+ err = shell (prog, initflag ? (char *) 0 : progbase, newenvp);
exit ((err == ENOENT) ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
/*@notreached@*/
failure: