aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shishkin <virtuoso@slind.org>2010-10-27 19:52:40 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-28 05:49:55 +0200
commit78b286fea51ef137d660b91037c89376115a1994 (patch)
tree93a7d1485202cb80e226cebde00a9288be2651ce
parent16cc80e9890c0409921b0463e5678649a893ae7f (diff)
downloadbusybox-w32-78b286fea51ef137d660b91037c89376115a1994.tar.gz
busybox-w32-78b286fea51ef137d660b91037c89376115a1994.tar.bz2
busybox-w32-78b286fea51ef137d660b91037c89376115a1994.zip
login: free fromhost upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--loginutils/login.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index e104fbb93..3065eaa5b 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -364,6 +364,10 @@ int login_main(int argc UNUSED_PARAM, char **argv)
364 if (++count == 3) { 364 if (++count == 3) {
365 syslog(LOG_WARNING, "invalid password for '%s'%s", 365 syslog(LOG_WARNING, "invalid password for '%s'%s",
366 username, fromhost); 366 username, fromhost);
367
368 if (ENABLE_FEATURE_CLEAN_UP)
369 free(fromhost);
370
367 return EXIT_FAILURE; 371 return EXIT_FAILURE;
368 } 372 }
369 username[0] = '\0'; 373 username[0] = '\0';
@@ -401,6 +405,9 @@ int login_main(int argc UNUSED_PARAM, char **argv)
401 if (pw->pw_uid == 0) 405 if (pw->pw_uid == 0)
402 syslog(LOG_INFO, "root login%s", fromhost); 406 syslog(LOG_INFO, "root login%s", fromhost);
403 407
408 if (ENABLE_FEATURE_CLEAN_UP)
409 free(fromhost);
410
404 /* well, a simple setexeccon() here would do the job as well, 411 /* well, a simple setexeccon() here would do the job as well,
405 * but let's play the game for now */ 412 * but let's play the game for now */
406 IF_SELINUX(set_current_security_context(user_sid);) 413 IF_SELINUX(set_current_security_context(user_sid);)