feat(windows): clean_system_identity for values read without the DMI files, UserDict.sid
clean_system_identity applies parse_system_identity's placeholder rules to values a host reads through an interface of its own (Windows' CIM classes, NetOrk/netork#2888); parse_system_identity now uses it. UserDict gains an optional sid beside the int uid (NetOrk/netork#2889).
This commit is contained in:
1 parent
2df46741f2
commit
5c2bfb7dfa
7 files changed
+146
-11
No files matched your search
@@ -366,6 +366,9 @@ driver supplies `_run_system_identity_command(command, privileged=)`.
|
||||
The same round trip reads the host's system firmware (BIOS or UEFI): `bios_vendor`,
|
||||
`bios_version` and `bios_date` (`YYYY-MM-DD`, from sysfs's `MM/DD/YYYY`). Only the vendors'
|
||||
text defaults read as empty there; a short version such as `1` is a version.
|
||||
A host that reads the same tables through an interface of its own (Windows' CIM classes)
|
||||
implements `get_system_identity` itself and hands the values to `clean_system_identity`,
|
||||
which applies the same rules.
|
||||
|
||||
`OpenSshServerMixin` (`harden_ssh_server`, `get_ssh_server_algorithms`) takes algorithms
|
||||
out of what an OpenSSH server offers -- the ones ssh-audit flags. It reads the lists sshd
|
||||
@@ -815,7 +818,8 @@ class LinuxDriver(OSDriver):
|
||||
...
|
||||
|
||||
def get_os_users(self):
|
||||
# return List[UserDict] -- not NAPALM's get_users, whose shape differs
|
||||
# return List[UserDict] -- not NAPALM's get_users, whose shape differs;
|
||||
# a host that names accounts by a SID (Windows) adds "sid", with the RID as uid
|
||||
...
|
||||
|
||||
def get_processes(self):
|
||||
|
||||
Reference in new issue
Block a user