Expand description
Files and folders only their own user may open: the place AgentMux Headless keeps its data and the key file that signs a browser in. On Linux and macOS that is a file mode (0700, 0600). Windows has access lists instead, and a profile folder can have been changed so that others are in them; this module reads a folder’s list, says who besides the user, the system and the administrators is given access, and sets a list that gives it to the user and the system only.
The reading of the list is plain text (its SDDL form), so it is the same code, and the same tests, on every platform.
Structs§
- Other
- Someone a list lets in besides the user: what a person reads for them, and their SID, which is what removes them.
Constants§
- KEY_
READERS_ ENV - The accounts, besides the server’s own, that may read its key file: the Windows service’s installing person
(
agentmux service installnames them,service runpasses them on in this variable), who opens the browser withagentmux openfrom their own terminal.
Functions§
- is_
account_ sid - Is this the SID of one person’s own account, as text:
S-1-5-21-<a>-<b>-<c>-<rid>(a local or a domain account) orS-1-12-1-<a>-<b>-<c>-<d>(an account of an organisation’s directory), every part digits only? A group, a well-known SID (Everyone, Authenticated Users, Users, Anonymous, the system, the administrators) and a built-in account that nobody signs in with (Guest and the like, relative ids 501 to 999) are not. - is_
key_ reader - Is
trustee, as an access list names it (a SID, or an SDDL alias such asLA), one of the keyreaders(SIDs)? SDDL writes the built-in administrator account (the SID ending in -500) asLA, so that alias is the reader whose SID ends that way. - key_
readers KEY_READERS_ENV, as SIDs.- others_
with_ access - Who besides
user_sid(and the system, the administrators and the owner) the list insddlallows to do anything to the object, each named once, in the order the list gives them. A denial is not an allowance, and an entry that gives no rights gives none. An empty answer is a list only the user (and those) can use. - private_
sddl - The access list as SDDL text, which the user is
user_sid: only the user and the system, nothing inherited.folderadds the rights to everything made inside it. - private_
sddl_ with_ readers private_sddlfor a file that also namesreaders(SIDs) with read rights: the one file a service writes and a person who is not its account must read (the keyagentmux openproves itself to the server with).- program_
folder_ sddl - The list of a program folder the person’s own login task runs from: the user, the system and the administrators, with nothing inherited from above (a profile can carry an entry for an account that no longer exists).
- refusal
- The words to a person whose folder lets others in: which folder, who, and the one command that fixes it: it stops what is inherited from above, takes away each of those named, and gives the folder to the person and the system.
- refusal_
because refusalfor a place kept for another reason, which is said inwhy(a sentence without its closing full stop).- say_who
- What a person reads for the principals a list can name by alias, and the SID of each; any other is its own SID.
- unnamed_
account - What a person reads for an account Windows has no name for (one that was deleted, say), with the id that removes it.