Add ifdef for ut_host
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@676 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -58,7 +58,11 @@ struct utmpx wtmp;
|
|||||||
struct utmp wtmp;
|
struct utmp wtmp;
|
||||||
# endif /* HAVE_UTMPX */
|
# endif /* HAVE_UTMPX */
|
||||||
|
|
||||||
|
#ifdef HAVE_UT_HOST
|
||||||
int utmp_len = sizeof(wtmp.ut_host);
|
int utmp_len = sizeof(wtmp.ut_host);
|
||||||
|
#else
|
||||||
|
int utmp_len = MaxHostNameLen;
|
||||||
|
#endif
|
||||||
# ifndef PARENT_DOES_UTMP
|
# ifndef PARENT_DOES_UTMP
|
||||||
char wtmpf[] = "/usr/adm/wtmp";
|
char wtmpf[] = "/usr/adm/wtmp";
|
||||||
char utmpf[] = "/etc/utmp";
|
char utmpf[] = "/etc/utmp";
|
||||||
@@ -906,6 +910,7 @@ extern void utmp_sig_notify P((int));
|
|||||||
/* I_FIND seems to live a life of its own */
|
/* I_FIND seems to live a life of its own */
|
||||||
static int my_find(int fd, char *module)
|
static int my_find(int fd, char *module)
|
||||||
{
|
{
|
||||||
|
#if defined(I_FIND) && defined(I_LIST)
|
||||||
static int flag;
|
static int flag;
|
||||||
static struct str_list sl;
|
static struct str_list sl;
|
||||||
int n;
|
int n;
|
||||||
@@ -930,6 +935,7 @@ static int my_find(int fd, char *module)
|
|||||||
for(i=0; i<sl.sl_nmods; i++)
|
for(i=0; i<sl.sl_nmods; i++)
|
||||||
if(!strcmp(sl.sl_modlist[i].l_name, module))
|
if(!strcmp(sl.sl_modlist[i].l_name, module))
|
||||||
return 1;
|
return 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1823,7 +1829,9 @@ rmut(void)
|
|||||||
continue;
|
continue;
|
||||||
(void) lseek(f, ((long)u)-((long)utmp), L_SET);
|
(void) lseek(f, ((long)u)-((long)utmp), L_SET);
|
||||||
SCPYN(u->ut_name, "");
|
SCPYN(u->ut_name, "");
|
||||||
|
#ifdef HAVE_UT_HOST
|
||||||
SCPYN(u->ut_host, "");
|
SCPYN(u->ut_host, "");
|
||||||
|
#endif
|
||||||
(void) time(&u->ut_time);
|
(void) time(&u->ut_time);
|
||||||
(void) write(f, (char *)u, sizeof(wtmp));
|
(void) write(f, (char *)u, sizeof(wtmp));
|
||||||
found++;
|
found++;
|
||||||
@@ -1836,7 +1844,9 @@ rmut(void)
|
|||||||
if (f >= 0) {
|
if (f >= 0) {
|
||||||
SCPYN(wtmp.ut_line, line+5);
|
SCPYN(wtmp.ut_line, line+5);
|
||||||
SCPYN(wtmp.ut_name, "");
|
SCPYN(wtmp.ut_name, "");
|
||||||
|
#ifdef HAVE_UT_HOST
|
||||||
SCPYN(wtmp.ut_host, "");
|
SCPYN(wtmp.ut_host, "");
|
||||||
|
#endif
|
||||||
(void) time(&wtmp.ut_time);
|
(void) time(&wtmp.ut_time);
|
||||||
(void) write(f, (char *)&wtmp, sizeof(wtmp));
|
(void) write(f, (char *)&wtmp, sizeof(wtmp));
|
||||||
(void) close(f);
|
(void) close(f);
|
||||||
|
Reference in New Issue
Block a user