[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] login: free fromhost upon cleaning up
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2010-10-28 3:50:14
Message-ID: 201010280550.14046.vda.linux () googlemail ! com
[Download RAW message or body]
On Wednesday 27 October 2010 18:52, Alexander Shishkin wrote:
> Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
> ---
> loginutils/login.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/loginutils/login.c b/loginutils/login.c
> index e104fbb..3065eaa 100644
> --- a/loginutils/login.c
> +++ b/loginutils/login.c
> @@ -364,6 +364,10 @@ int login_main(int argc UNUSED_PARAM, char **argv)
> if (++count == 3) {
> syslog(LOG_WARNING, "invalid password for '%s'%s",
> username, fromhost);
> +
> + if (ENABLE_FEATURE_CLEAN_UP)
> + free(fromhost);
> +
> return EXIT_FAILURE;
> }
> username[0] = '\0';
> @@ -401,6 +405,9 @@ int login_main(int argc UNUSED_PARAM, char **argv)
> if (pw->pw_uid == 0)
> 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,
> * but let's play the game for now */
> IF_SELINUX(set_current_security_context(user_sid);)
Applied, thanks!
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic