# ifdef HAVE_TYPE_IN_UTMP
/* This is done here to keep utmp constants out of struct logininfo */
switch (li->type) {
+ case LTYPE_FAILED:
+ ut->ut_type = LOGIN_PROCESS;
+ break;
case LTYPE_LOGIN:
ut->ut_type = USER_PROCESS;
break;
/* Construct a logininfo and turn it into a utmp */
memset(&li, 0, sizeof(li));
- li.type = LTYPE_LOGIN;
+ li.type = LTYPE_FAILED;
li.pid = getpid();
strlcpy(li.line, "ssh:notty", sizeof(li.line));
strlcpy(li.username, username, sizeof(li.username));
*/
/* types - different to utmp.h 'type' macros */
/* (though set to the same value as linux, openbsd and others...) */
+#define LTYPE_FAILED 6
#define LTYPE_LOGIN 7
#define LTYPE_LOGOUT 8