mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-23 01:53:46 +01:00
Print INIT_PROCESS and LOGIN_PROCESS entries as well.
Even though our implementation of utmpx never emits these types of records, they are part of POSIX. Do print them when they show up in the database files. While there, also print the type number of unsupported records.
This commit is contained in:
parent
0c879bd990
commit
8e2eadb208
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226841
@ -600,13 +600,24 @@ utmpxprint(const struct utmpx *ut)
|
||||
printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
|
||||
ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host);
|
||||
break;
|
||||
case INIT_PROCESS:
|
||||
printf("init process: id=\"");
|
||||
UTMPXPRINTID;
|
||||
printf("\" pid=\"%d\"\n", ut->ut_pid);
|
||||
break;
|
||||
case LOGIN_PROCESS:
|
||||
printf("login process: id=\"");
|
||||
UTMPXPRINTID;
|
||||
printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
|
||||
ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host);
|
||||
break;
|
||||
case DEAD_PROCESS:
|
||||
printf("dead process: id=\"");
|
||||
UTMPXPRINTID;
|
||||
printf("\" pid=\"%d\"\n", ut->ut_pid);
|
||||
break;
|
||||
default:
|
||||
printf("unknown record type\n");
|
||||
printf("unknown record type %hu\n", ut->ut_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user