From 9f0b8ec3de3e6e02e3ae1c19f243f22a36582cc8 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 4 Aug 1999 17:03:15 +0000 Subject: [PATCH] (utmpx_login): fix for Solaris. From Miroslav Ruda git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6712 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/login/utmpx_login.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appl/login/utmpx_login.c b/appl/login/utmpx_login.c index cfb2f17fd..97d57690e 100644 --- a/appl/login/utmpx_login.c +++ b/appl/login/utmpx_login.c @@ -51,7 +51,7 @@ utmpx_update(struct utmpx *ut, char *line, const char *user, const char *host) int utmpx_login(char *line, const char *user, const char *host) { - struct utmpx *ut; + struct utmpx *ut, save_ut; pid_t mypid = getpid(); int ret = (-1); @@ -69,7 +69,8 @@ utmpx_login(char *line, const char *user, const char *host) && ( ut->ut_type == INIT_PROCESS || ut->ut_type == LOGIN_PROCESS || ut->ut_type == USER_PROCESS)) { - utmpx_update(ut, line, user, host); + save_ut = *ut; + utmpx_update(&save_ut, line, user, host); ret = 0; break; }