mirror of
https://github.com/sheumann/hush.git
synced 2025-01-11 23:29:51 +00:00
login: free fromhost upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
16cc80e989
commit
78b286fea5
@ -364,6 +364,10 @@ int login_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
if (++count == 3) {
|
if (++count == 3) {
|
||||||
syslog(LOG_WARNING, "invalid password for '%s'%s",
|
syslog(LOG_WARNING, "invalid password for '%s'%s",
|
||||||
username, fromhost);
|
username, fromhost);
|
||||||
|
|
||||||
|
if (ENABLE_FEATURE_CLEAN_UP)
|
||||||
|
free(fromhost);
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
username[0] = '\0';
|
username[0] = '\0';
|
||||||
@ -401,6 +405,9 @@ int login_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
if (pw->pw_uid == 0)
|
if (pw->pw_uid == 0)
|
||||||
syslog(LOG_INFO, "root login%s", fromhost);
|
syslog(LOG_INFO, "root login%s", fromhost);
|
||||||
|
|
||||||
|
if (ENABLE_FEATURE_CLEAN_UP)
|
||||||
|
free(fromhost);
|
||||||
|
|
||||||
/* well, a simple setexeccon() here would do the job as well,
|
/* well, a simple setexeccon() here would do the job as well,
|
||||||
* but let's play the game for now */
|
* but let's play the game for now */
|
||||||
IF_SELINUX(set_current_security_context(user_sid);)
|
IF_SELINUX(set_current_security_context(user_sid);)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user