* src/login.c: Re-indent.
This commit is contained in:
parent
1e3f19ad89
commit
54a0762bbb
@ -2,6 +2,7 @@
|
||||
|
||||
* src/login.c: Add missing closing }. This was probably never
|
||||
noticed because UT_ADDR is never defined.
|
||||
* src/login.c: Re-indent.
|
||||
|
||||
2008-09-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
|
22
src/login.c
22
src/login.c
@ -487,12 +487,10 @@ int main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
#ifdef UT_HOST
|
||||
strncpy (utent.ut_host, hostname,
|
||||
sizeof (utent.ut_host));
|
||||
strncpy (utent.ut_host, hostname, sizeof (utent.ut_host));
|
||||
#endif
|
||||
#if HAVE_UTMPX_H
|
||||
strncpy (utxent.ut_host, hostname,
|
||||
sizeof (utxent.ut_host));
|
||||
strncpy (utxent.ut_host, hostname, sizeof (utxent.ut_host));
|
||||
#endif
|
||||
/*
|
||||
* Add remote hostname to the environment. I think
|
||||
@ -666,14 +664,12 @@ int main (int argc, char **argv)
|
||||
sizeof (loginprompt), _("login: "));
|
||||
}
|
||||
|
||||
retcode =
|
||||
pam_set_item (pamh, PAM_USER_PROMPT, loginprompt);
|
||||
retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt);
|
||||
PAM_FAIL_CHECK;
|
||||
|
||||
/* if we didn't get a user on the command line,
|
||||
set it to NULL */
|
||||
pam_get_item (pamh, PAM_USER,
|
||||
(const void **)ptr_pam_user);
|
||||
pam_get_item (pamh, PAM_USER, (const void **)ptr_pam_user);
|
||||
if (pam_user[0] == '\0') {
|
||||
pam_set_item (pamh, PAM_USER, NULL);
|
||||
}
|
||||
@ -773,9 +769,7 @@ int main (int argc, char **argv)
|
||||
retcode = pam_acct_mgmt (pamh, 0);
|
||||
|
||||
if (retcode == PAM_NEW_AUTHTOK_REQD) {
|
||||
retcode =
|
||||
pam_chauthtok (pamh,
|
||||
PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||
retcode = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||
}
|
||||
|
||||
PAM_FAIL_CHECK;
|
||||
@ -784,8 +778,7 @@ int main (int argc, char **argv)
|
||||
/* Grab the user information out of the password file for future usage
|
||||
First get the username that we are actually using, though.
|
||||
*/
|
||||
retcode =
|
||||
pam_get_item (pamh, PAM_USER, (const void **)ptr_pam_user);
|
||||
retcode = pam_get_item (pamh, PAM_USER, (const void **)ptr_pam_user);
|
||||
pwd = xgetpwnam (pam_user);
|
||||
if (NULL == pwd) {
|
||||
SYSLOG ((LOG_ERR, "xgetpwnam(%s) failed",
|
||||
@ -808,8 +801,7 @@ int main (int argc, char **argv)
|
||||
retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
|
||||
PAM_FAIL_CHECK;
|
||||
|
||||
retcode = pam_open_session (pamh,
|
||||
hushed (&pwent) ? PAM_SILENT : 0);
|
||||
retcode = pam_open_session (pamh, hushed (&pwent) ? PAM_SILENT : 0);
|
||||
PAM_FAIL_CHECK;
|
||||
|
||||
pwd = xgetpwnam (pam_user);
|
||||
|
Loading…
x
Reference in New Issue
Block a user