feat(logins): optional keys for another platform's login accounts and sessions (NetOrk/netork#2895)
LoginAccountDict may carry sid, administrator and remote_desktop; uid stays an int and is the RID where a SID is given. LoginAccountsDict may carry groups (LoginGroupDict, LoginGroupMemberDict, LOGIN_GRANTS): the groups that grant administering the host or a remote desktop login, with every member. LoginSessionsDict may carry records_since, the oldest entry the record still holds. All optional: the Linux reading and every driver that builds one are unchanged.
This commit is contained in:
1 parent
2df46741f2
commit
a825d48c19
7 files changed
+176
-11
No files matched your search
@@ -190,7 +190,11 @@ knows, and where it came from; its lock and expiry from `passwd -S` and `chage -
|
||||
failed attempts since that login, from `lastb` (the newest 1000 per account) or else
|
||||
`pam_faillock`'s tally. Read as root first and, where root is refused, as the login user,
|
||||
when the lock, the expiry and the failures are `None`. A driver supplies
|
||||
`_run_login_accounts_command(command, privileged=)`.
|
||||
`_run_login_accounts_command(command, privileged=)`. Another platform fills the same reading
|
||||
from its own sources and may add optional keys (NetOrk/netork#2895): an account's `sid`
|
||||
(Windows; `uid` is then the RID), `administrator` and `remote_desktop`, and the reading's
|
||||
`groups` -- the host's groups that grant one of `LOGIN_GRANTS`, with every member, a
|
||||
directory's included.
|
||||
|
||||
`LoginSessionsMixin` (`get_login_sessions`) is mixed in the same way: the interactive logins
|
||||
the host recorded over the last seven days -- each with its account, terminal, the address
|
||||
@@ -204,7 +208,9 @@ connection. Which other sessions an application opened itself is the application
|
||||
A driver supplies `_run_login_sessions_command(command)`, run as the login user, never
|
||||
through `sudo`, which would drop `SSH_CONNECTION`; the records are readable to everyone. A
|
||||
host with no record the reading can read (BusyBox's `last`) raises
|
||||
`LoginSessionsUnavailable`, never "nobody logged in".
|
||||
`LoginSessionsUnavailable`, never "nobody logged in". Another platform may add
|
||||
`records_since`, the oldest entry its record still holds (Windows' Security log rotates by
|
||||
size): a login before it is unknown, not absent.
|
||||
|
||||
`ServicePackagesMixin` (`get_service_packages`) is mixed in the same way: which installed
|
||||
packages each systemd service is made of — the one shipping its unit file and the one
|
||||
|
||||
Reference in new issue
Block a user