X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fslocal.c;h=ca23fd89457900685cc25449f7f4d8a1e73c6f25;hb=d72dc17f4164fd8a3e3c56a74a66a21138d82814;hp=6bf3e15971b11edfdf444e9ef0986a0a4397d4c4;hpb=571c5da9d8529e029fb478ee1f47057e0ebb6762;p=mmh diff --git a/uip/slocal.c b/uip/slocal.c index 6bf3e15..ca23fd8 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -55,9 +55,14 @@ extern int initgroups(char*, int); #ifdef HAVE_GDBM_NDBM_H #include #else +#if defined(HAVE_DB_H) && defined(HAVE_LIBDB) +#define DB_DBM_HSEARCH 1 +#include +#else #include #endif #endif +#endif #include @@ -960,9 +965,13 @@ logged_in (void) setutent(); while ((utp = getutent()) != NULL) { - if (utp->ut_type == USER_PROCESS - && utp->ut_user[0] != 0 - && strncmp (user, utp->ut_user, sizeof(utp->ut_user)) == 0) { + if ( +#ifdef HAVE_UTMP_UT_TYPE + utp->ut_type == USER_PROCESS + && +#endif + utp->ut_name[0] != 0 + && strncmp (user, utp->ut_name, sizeof(utp->ut_name)) == 0) { if (debug) continue; endutent();