SD Core for Windows WC2.0-0

The Audit Trail

What SD writes to its audit trail, who writes it, where it is kept, how it is rotated, and the full-screen page that reads it.

SD writes one line to the audit trail for every act that changes who may do what, or that crosses a boundary: a sign-on, a refused request, an account created or changed, a gate turned on, a backup, a command run from a toolkit page. The trail is a text file of the SDSYS system directory. This page says what a line looks like, who is able to write one, how the file is kept, and how to read it.

This document is separate so that it can be withheld. It links to nothing outside the administrator set. Where a user-set page is worth naming, it is named in words.

A line#

2026-11-13 14:03:11 user=OFFICE\fred uid=1001 pid=48213 modify.account net-on account=fred
2026-11-13 14:03:40 user=OFFICE\SDSYS uid=1002 pid=48990 tool start app=tool.sessions

A line is the time, then user= (the Windows user that made the entry, as DOMAIN\name), uid= (the session's SD user number) and pid= (its Windows process id), then the event words, then any number of key=value pairs. The event words come first and are all lower case (login, modify.account, api refused, tool start); a pair's key is lower case too; a value is whatever a person typed or the system knows (an account name, a reason) and keeps its case. A value may hold spaces: a word that holds no = after a pair belongs to that pair's value.

Every line written by a run of a scheduled administrator job ends job=name, starting with elevation granted reason=scheduled job; see Scheduled Jobs, in this set.

The lists of Windows users who may reach SDSYS from this computer write these lines (see Reaching SDSYS from Your Own Login, in this set): a change by the administrator, local.sdsys ssh add user=fred status=ok (or status=refused; remove and clear the same, clear with no user=); a grant over ssh, elevation granted reason=sdsys local ssh user=fred; a refusal after the password was asked, elevation refused reason=sdsys local ssh wrong password user=fred or ... no credential user=fred; a grant through the API, elevation granted reason=sdsys api from=this machine user=fred; and, while the ssh list has names, the existing refusal of an SDSYS session that is not elevated at a desktop with a why= word added (why=not-listed, why=no-terminal and so on). A sd-sdsys that the SD service refuses before SDSYS is started is not in the trail: SD never ran; the service writes it to C:\ProgramData\SD\sdsvc.log.

Who writes it#

The user and the process on a line are not the session's word. Every session hands its record to the SD service (sdsvc.exe, which runs as LocalSystem), through the named pipe \\.\pipe\sd-audit. The service writes user= from the Windows token of the session at the other end of the pipe and pid= from Windows, so a line cannot name someone else. uid=, the SD user number, is the session's own.

A session checks that the pipe belongs to LocalSystem before it sends anything, and the service refuses a pipe name someone else made first and refuses connections from other computers.

If the SD service is not running, a session appends its line itself, as SD did before the service wrote the trail; such a line's user= is the name the session gives, without a domain. A run of such lines therefore marks a time when the service was down.

Every record also goes to the Windows Application event log, whether the service or the session wrote the trail: the source is sd-audit, the level Information and the event id 1, and the event is stamped with the Windows user of the session that made the record. The copy never stops the trail's own write: a machine whose event log cannot be reached still writes the trail, and the copy is skipped without a message. The installer registers the source on a first install and on an upgrade. The copy is a convenience, not a protected record: any program on the machine can write events under the source name sd-audit, so a line there proves nothing by itself. The trail file, with its permissions, is the record; the event log lets you read it with the tools you already use for Windows.

The service takes at most 600 records from one Windows user in any 60 seconds and drops the rest; when that user's minute is over it writes one line saying how many were dropped. The limit is compiled in and is not a setting.

Where it is kept#

File audit in the system directory (C:\ProgramData\SD\sdsys\audit)
Who may do what the installer gives the SD users group the right to add to the end of the file and nothing else: an ordinary user cannot read it, empty it, overwrite a line, rename it or delete it. SYSTEM and the Administrators group keep full control
Rotation at one megabyte the service (and sd -start) renames it to audit.yyyymmdd-hhmmss and starts a new file with the same permissions; it refuses to rotate when it cannot read those permissions. A rotated file is not pruned by SD: that is the site's decision

SDSYS reads it, being an administrator; no ordinary account can.

Reading it: tool.audit#

tool.audit is a page in SDSYS's VOC only. It needs a window of at least 140 columns by 43 lines, like the other toolkit pages, and it asks the kernel for the administrator before it reads anything.

The top box names the file shown, its size, the lines loaded, whether older lines remain, the filters in force and whether the page is following the file. The list under it is the trail, the oldest loaded line at the top and the newest at the bottom, one row to a line: time, user, event words, then the pairs. The box at the foot shows the whole line under the cursor, wrapped, and the same line cut into its parts.

The page reads from the end of the file, in blocks, and never reads a large trail whole. It opens on the newest 200 lines that pass the filter; when the cursor goes above the first line it loads 200 more. It keeps at most 3000 lines; beyond that it drops the newest while you go back and the oldest while you follow. A last line that has no line end yet (the service is writing it) is left until it is whole.

Key What it does
Up, Down, PgUp, PgDn move; above the first loaded line, older lines are loaded when the file has them
Home, End the first loaded line; the newest line (End reads the file again)
F asks, one after another: from, to, event words, account, user, text. from and to are the start of a time stamp (2026-10-25, or 2026-10-25 14:30; to with only a date includes the whole day). Event, account, user and text are matched without regard to case; account is the line's account= value, user its user=. Esc leaves every filter as it was
/ the same as F: on every page / is the key that finds by typing
C clears the filters
D goes to the first line at or after a time; no filter changes
O shows the next audit file: the current one, then the rotated ones, newest first
L follows the file: new lines are read every three seconds, and the cursor stays on the newest line if it was there
X saves the lines loaded to a record of the $HOLD file of your account, named audit.yyyymmdd.hhmmss, and writes the audit line tool export app=tool.audit lines=n record=id. ED $HOLD id reads it
F5 reads again
F1, ? explain the page
Ctrl-Q leave

The page changes nothing. It runs no command and writes no account or system record. Opening it writes tool start app=tool.audit, and X writes the one export line; both are on the trail.

The file can also be read outside SD: open C:\ProgramData\SD\sdsys\audit (or a rotated audit.yyyymmdd-hhmmss beside it) in an editor started as administrator.

File transfer lines#

A file transfer writes lines that begin xfer (Accounts and Security: File transfer). The person's session writes the opening and the closing; the connection of their sftp client, a process of its own, writes the rest:

xfer open dir=in overwrite=no account=fred
xfer connect dir=in holder=14 from=192.0.2.7 account=fred
xfer file dir=in bytes=1840 sha256=3cba0fa3...46b44 name=orders.csv
xfer refused reason=not plain text bytes=0 name=logo.png
xfer disconnect dir=in why=eof files=1 bytes=1840 refusals=1
xfer close dir=in why=done files=1 bytes=1840 account=fred

dir is in for receive and out for send; holder is the user number of the session that opened the transfer; name is last because a name may hold spaces. A connection that is turned away before any transfer is xfer refused reason=... from=... user=..., the reason being one of: xfer is off, xfer-on is not set, not a user account, the account is suspended, no slot is open, the slot ran out of time, no transfer directory, and the reasons a sign-on is refused. A refused file names its reason: not plain text, name is there, not a name sd takes, not a kind of file taken, file over xferfile, slot over xferslot, not sent whole, receive slot gives nothing out, send slot takes nothing in, not a file this connection sent. why on a disconnect is eof (the client left), closed (the session closed the transfer or ended), idle, max or logout; on a close it is done (Enter), wait (no connection came), idle, max or input ended. There are also xfer rename to=... from=... and xfer remove name=....

A logto that is refused writes logto refused account=namereason=why. For an account that is suspended the reason is suspended; for one the person may not enter it is not granted; for a name the register does not hold it is not in the register (the person is told the same as for an account they may not enter, so the register cannot be probed); and for logto sdsys from a session that did not start in SDSYS it is logto refused account=sdsys reason=sdsys is entered by its own session only. Add and delete are modify.account add account=nameto=user and modify.account delete account=namefrom=user.

A person's own password changed outside an elevated session is written by the SD service, which made the change: cred-own set account=name, or cred-own refused account=namemode=mreason=why (a wrong current password, a suspended account, an account that is not a person's own), where why is one word made of the refusal, such as the-current-password-is-not-correct, as SD Core for Linux writes it. These lines carry uid=-: the service has no SD user number.

A restart of SD asked for from a page writes sd restart app=pagestatus=asked (tool.config, after a change to a parameter SD reads only when it starts), before the restart is started, because the restart stops the SD service that writes the trail; a restart that then could not be started adds a second line, status=refused. The sessions the restart ends write nothing of their own.

What the trail does not do#

It does not show an account holder's own lines: the trail names every account, user and address on the machine, and a view limited to one account would need the kernel to filter, which has not been built. Nothing in SD edits, deletes or prunes a line.