Minur changes for HP-UX 10.1.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@889 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -30,13 +30,17 @@ utmpx_login(char *line, char *user, char *host)
|
|||||||
strncpy(ut->ut_line, line, sizeof(ut->ut_line));
|
strncpy(ut->ut_line, line, sizeof(ut->ut_line));
|
||||||
strncpy(ut->ut_user, user, sizeof(ut->ut_user));
|
strncpy(ut->ut_user, user, sizeof(ut->ut_user));
|
||||||
strncpy(ut->ut_host, host, sizeof(ut->ut_host));
|
strncpy(ut->ut_host, host, sizeof(ut->ut_host));
|
||||||
|
#ifdef HAVE_UT_SYSLEN
|
||||||
ut->ut_syslen = strlen(host) + 1;
|
ut->ut_syslen = strlen(host) + 1;
|
||||||
if (ut->ut_syslen > sizeof(ut->ut_host))
|
if (ut->ut_syslen > sizeof(ut->ut_host))
|
||||||
ut->ut_syslen = sizeof(ut->ut_host);
|
ut->ut_syslen = sizeof(ut->ut_host);
|
||||||
|
#endif
|
||||||
ut->ut_type = USER_PROCESS;
|
ut->ut_type = USER_PROCESS;
|
||||||
gettimeofday(&(ut->ut_tv), 0);
|
gettimeofday(&(ut->ut_tv), 0);
|
||||||
pututxline(ut);
|
pututxline(ut);
|
||||||
|
#ifdef WTMPX_FILE
|
||||||
updwtmpx(WTMPX_FILE, ut);
|
updwtmpx(WTMPX_FILE, ut);
|
||||||
|
#endif
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ RCSID("$Id$");
|
|||||||
#include <libtelnet/auth.h>
|
#include <libtelnet/auth.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CRAY) || defined(__hpux)
|
#if defined(CRAY) || (defined(__hpux) && !defined(HAVE_UTMPX_H))
|
||||||
# define PARENT_DOES_UTMP
|
# define PARENT_DOES_UTMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ RCSID("$Id$");
|
|||||||
#error NEWINIT not supported
|
#error NEWINIT not supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UTMPX
|
#ifdef HAVE_UTMPX
|
||||||
#include <utmpx.h>
|
#include <utmpx.h>
|
||||||
struct utmpx wtmp;
|
struct utmpx wtmp;
|
||||||
#else
|
#else
|
||||||
@@ -1634,11 +1634,18 @@ rmut(void)
|
|||||||
if (utxp) {
|
if (utxp) {
|
||||||
strcpy(utxp->ut_user, "");
|
strcpy(utxp->ut_user, "");
|
||||||
utxp->ut_type = DEAD_PROCESS;
|
utxp->ut_type = DEAD_PROCESS;
|
||||||
|
#ifdef _STRUCT___EXIT_STATUS
|
||||||
|
utxp->ut_exit.__e_termination = 0;
|
||||||
|
utxp->ut_exit.__e_exit = 0;
|
||||||
|
#else
|
||||||
utxp->ut_exit.e_termination = 0;
|
utxp->ut_exit.e_termination = 0;
|
||||||
utxp->ut_exit.e_exit = 0;
|
utxp->ut_exit.e_exit = 0;
|
||||||
|
#endif
|
||||||
gettimeofday(&utxp->ut_tv, NULL);
|
gettimeofday(&utxp->ut_tv, NULL);
|
||||||
pututxline(utxp);
|
pututxline(utxp);
|
||||||
|
#ifdef WTMPX_FILE
|
||||||
updwtmpx(WTMPX_FILE, utxp);
|
updwtmpx(WTMPX_FILE, utxp);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
endutxent();
|
endutxent();
|
||||||
} /* end of rmut */
|
} /* end of rmut */
|
||||||
@@ -1702,7 +1709,7 @@ rmut(void)
|
|||||||
} /* end of rmut */
|
} /* end of rmut */
|
||||||
#endif /* CRAY */
|
#endif /* CRAY */
|
||||||
|
|
||||||
#ifdef __hpux
|
#if defined(__hpux) && !defined(HAVE_UTMPX)
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
rmut (char *line)
|
rmut (char *line)
|
||||||
@@ -1803,8 +1810,6 @@ cleanup(int sig)
|
|||||||
|
|
||||||
#else /* PARENT_DOES_UTMP */
|
#else /* PARENT_DOES_UTMP */
|
||||||
|
|
||||||
extern void rmut(void);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cleanup(int sig)
|
cleanup(int sig)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user