Align for const poisoning in -lutil.
This commit is contained in:
parent
b00ba4ccbb
commit
f2f306b622
@ -611,7 +611,7 @@ do_login(Session *s, const char *command)
|
||||
struct passwd * pw = s->pw;
|
||||
pid_t pid = getpid();
|
||||
#ifdef HAVE_LOGIN_CAP
|
||||
char *fname;
|
||||
const char *fname;
|
||||
#endif /* HAVE_LOGIN_CAP */
|
||||
#ifdef __FreeBSD__
|
||||
#define DEFAULT_WARN (2L * 7L * 86400L) /* Two weeks */
|
||||
|
@ -121,8 +121,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, int argc, const char
|
||||
struct options options;
|
||||
struct passwd *pwd;
|
||||
int retval;
|
||||
const char *pass, *user, *realpw;
|
||||
char *prompt;
|
||||
const char *pass, *user, *realpw, *prompt;
|
||||
|
||||
pam_std_option(&options, other_options, argc, argv);
|
||||
|
||||
@ -477,7 +476,8 @@ local_passwd(const char *user, const char *pass)
|
||||
login_cap_t * lc;
|
||||
struct passwd *pwd;
|
||||
int pfd, tfd;
|
||||
char *crypt_type, salt[SALTSIZE + 1];
|
||||
const char *crypt_type;
|
||||
char salt[SALTSIZE + 1];
|
||||
|
||||
pwd = getpwnam(user);
|
||||
if (pwd == NULL)
|
||||
|
@ -95,7 +95,7 @@ void badlogin __P((char *));
|
||||
void checknologin __P((void));
|
||||
void dolastlog __P((int));
|
||||
void getloginname __P((void));
|
||||
void motd __P((char *));
|
||||
void motd __P((const char *));
|
||||
int rootterm __P((char *));
|
||||
void sigint __P((int));
|
||||
void sleepexit __P((int));
|
||||
@ -144,7 +144,8 @@ jmp_buf timeout_buf;
|
||||
|
||||
struct passwd *pwd;
|
||||
int failures;
|
||||
char *term, *envinit[1], *hostname, *passwd_prompt, *prompt, *tty, *username;
|
||||
char *term, *envinit[1], *hostname, *tty, *username;
|
||||
const char *passwd_prompt, *prompt;
|
||||
char full_hostname[MAXHOSTNAMELEN];
|
||||
|
||||
int
|
||||
@ -166,7 +167,7 @@ main(argc, argv)
|
||||
char *p, *ttyn;
|
||||
char tbuf[MAXPATHLEN + 2];
|
||||
char tname[sizeof(_PATH_TTY) + 10];
|
||||
char *shell = NULL;
|
||||
const char *shell = NULL;
|
||||
login_cap_t *lc = NULL;
|
||||
#ifdef USE_PAM
|
||||
pid_t pid;
|
||||
@ -676,7 +677,7 @@ main(argc, argv)
|
||||
(void)setenv("PATH", rootlogin ? _PATH_STDPATH : _PATH_DEFPATH, 0);
|
||||
|
||||
if (!quietlog) {
|
||||
char *cw;
|
||||
const char *cw;
|
||||
|
||||
cw = login_getcapstr(lc, "copyright", NULL, NULL);
|
||||
if (cw != NULL && access(cw, F_OK) == 0)
|
||||
@ -960,7 +961,7 @@ sigint(signo)
|
||||
|
||||
void
|
||||
motd(motdfile)
|
||||
char *motdfile;
|
||||
const char *motdfile;
|
||||
{
|
||||
int fd, nchars;
|
||||
sig_t oldint;
|
||||
|
@ -144,9 +144,9 @@ static char *olduser; /* previous user name */
|
||||
* Prompts
|
||||
*/
|
||||
static char default_prompt[] = DEFAULT_PROMPT;
|
||||
static char *prompt;
|
||||
static const char *prompt;
|
||||
static char default_passwd_prompt[] = DEFAULT_PASSWD_PROMPT;
|
||||
static char *passwd_prompt;
|
||||
static const char *passwd_prompt;
|
||||
|
||||
static char *tty;
|
||||
|
||||
@ -172,7 +172,8 @@ main(int argc, char *argv[])
|
||||
char *term;
|
||||
char *p, *ttyn;
|
||||
char tname[sizeof(_PATH_TTY) + 10];
|
||||
char *arg0, *shell = NULL;
|
||||
char *arg0;
|
||||
const char *shell = NULL;
|
||||
login_cap_t *lc = NULL;
|
||||
pid_t pid;
|
||||
|
||||
@ -537,7 +538,7 @@ main(int argc, char *argv[])
|
||||
(void)setenv("PATH", rootlogin ? _PATH_STDPATH : _PATH_DEFPATH, 0);
|
||||
|
||||
if (!quietlog) {
|
||||
char *cw;
|
||||
const char *cw;
|
||||
|
||||
cw = login_getcapstr(lc, "copyright", NULL, NULL);
|
||||
if (cw == NULL || motd(cw) == -1)
|
||||
@ -555,14 +556,14 @@ main(int argc, char *argv[])
|
||||
/* $MAIL may have been set by class. */
|
||||
cw = getenv("MAIL");
|
||||
if (cw == NULL) {
|
||||
asprintf(&cw, "%s/%s",
|
||||
asprintf((char **)&cw, "%s/%s",
|
||||
_PATH_MAILDIR, pwd->pw_name);
|
||||
}
|
||||
if (cw && stat(cw, &st) == 0 && st.st_size != 0)
|
||||
(void)printf("You have %smail.\n",
|
||||
(st.st_mtime > st.st_atime) ? "new " : "");
|
||||
if (getenv("MAIL") == NULL)
|
||||
free(cw);
|
||||
free((char *)cw);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user