Start authorized W32Time once after confirmed console boot and preserve evidence
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fresh, once-only W32Time start after the user-confirmed console boot.
|
||||
|
||||
Reuse the previously reviewed preservation checks, with a separate admission
|
||||
record. Historical start intents and reports are never reset or overwritten.
|
||||
"""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import uuid
|
||||
|
||||
import time_service_start as original
|
||||
import auto_transport_acceptance as auto
|
||||
|
||||
cb = original.cb
|
||||
require = original.require
|
||||
BOOT = '2026-11-14T12:26:50.5000000Z'
|
||||
ORIGINAL_SHA = 'ef5d4ce8ec2e8f3486da8540b3f47230406c6604157b7920e1e5202c88b97e6e'
|
||||
require(original.digest(original.__file__) == ORIGINAL_SHA, 'frozen original time bootstrap')
|
||||
STATE = cb.EVIDENCE / 'time-service-after-console-boot'
|
||||
SCRIPT = original.SCRIPT
|
||||
|
||||
|
||||
def substitute(old, new):
|
||||
global SCRIPT
|
||||
require(SCRIPT.count(old) == 1, 'exact reviewed source derivation')
|
||||
SCRIPT = SCRIPT.replace(old, new)
|
||||
|
||||
|
||||
substitute("$active=Join-Path $boot 'w32time-start-once.json'",
|
||||
"$active=Join-Path $boot 'w32time-start-after-console-20261114T122650.json'")
|
||||
substitute('function Snapshot{', r'''function Snapshot{
|
||||
$actualBoot=(Get-CimInstance Win32_OperatingSystem -Property LastBootUpTime).LastBootUpTime.ToUniversalTime().ToString('o')
|
||||
if($actualBoot-cne'2026-11-14T12:26:50.5000000Z'){throw 'Exact user-confirmed console boot required'}''')
|
||||
substitute("$service=ServiceState $pair[0];if($service.state-cne'Running'-or$service.pid-le0){throw 'Retain both running RMM components'}",
|
||||
"""$service=ServiceState $pair[0]
|
||||
$stoppedHelper=($pair[0]-ceq'RmmDiscoverySystemHelper'-and$service.state-ceq'Stopped'-and$service.pid-eq0-and$service.definition.start_mode-ceq'Manual'-and$service.definition.account-ceq'LocalSystem')
|
||||
if(!$stoppedHelper-and($service.state-cne'Running'-or$service.pid-le0)){throw 'Exact running agent or stopped manual helper required'}
|
||||
if($stoppedHelper){$birth=$null;$image=$pair[1]}else{""")
|
||||
substitute("finally{$proc.Dispose()}\n if(![string]", "finally{$proc.Dispose()}}\n if(![string]")
|
||||
PREPARE = original.PREPARE.replace('TimeServiceStart.ps1', 'TimeServiceAfterBoot.ps1')
|
||||
LAUNCH = original.LAUNCH.replace('TimeServiceStart.ps1', 'TimeServiceAfterBoot.ps1')
|
||||
|
||||
|
||||
def remote(folder, payload):
|
||||
try:
|
||||
return cb.powershell(LAUNCH, {'sha256': hashlib.sha256(SCRIPT.encode()).hexdigest(),
|
||||
'payload': payload}, timeout=100, remote_signed=True)
|
||||
finally:
|
||||
original.preserve_failure(folder)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('action', choices=('prepare', 'start', 'readback'))
|
||||
parser.add_argument('--id')
|
||||
args = parser.parse_args()
|
||||
os.umask(0o077)
|
||||
if args.action == 'prepare':
|
||||
require(args.id is None, 'fresh separate case')
|
||||
original.helper.private_dir(STATE)
|
||||
folder = STATE / str(uuid.uuid4()); folder.mkdir(mode=0o700)
|
||||
counts, flags = auto.scopes(), auto.status()
|
||||
require(auto.flags_disabled(flags), 'closed test hooks')
|
||||
pins = dict(agent_sha256='89004ad3475af3fb8a03bdb1e63c3ef1f2a08d31d0d97193e02fe770a1d7f676',
|
||||
helper_sha256='e6aacbdd691c8c56612a2ba205c48396defe70e7d527e031aa3a76a8ae5a3662',
|
||||
config_sha256='7c9f6f3642ef84337c3cd761d8a4788c4babe81522fdd987a3eb9b819bc8d851',
|
||||
policy_sha256='007adf5f4932dcf68fa4c0c3ba601ec1996b350e7e3e1d14e89a31dd712e5703',
|
||||
pin_sha256='126670bc6ed71aad76438ec588b739d3bc02d36ae305ce8f8b5613e4a9e11a15')
|
||||
payload = dict(id=folder.name, **pins)
|
||||
original.save(folder, 'intent.json', dict(payload=payload, boot=BOOT,
|
||||
source_sha256=original.digest(__file__), script_sha256=hashlib.sha256(SCRIPT.encode()).hexdigest(),
|
||||
server_before=dict(counts=counts, flags=flags)))
|
||||
source = folder / 'TimeServiceAfterBoot.ps1'
|
||||
with source.open('xb') as out:
|
||||
out.write(SCRIPT.encode()); out.flush(); os.fsync(out.fileno())
|
||||
original.helper.transfer(source, source.name, hashlib.sha256(SCRIPT.encode()).hexdigest(), PREPARE)
|
||||
before = remote(folder, dict(payload, action='state'))
|
||||
original.save(folder, 'before.json', before)
|
||||
require(before['read_only'] is True and before['snapshot']['time_service']['state'] == 'Stopped', 'fresh stopped time-service baseline')
|
||||
print(json.dumps(dict(case_id=folder.name, prepared=True, start_executed=False)))
|
||||
return
|
||||
require(args.id and str(uuid.UUID(args.id)) == args.id, 'original canonical case')
|
||||
folder = STATE / args.id
|
||||
intent = cb.contract.protected_json(folder / 'intent.json')
|
||||
before = cb.contract.protected_json(folder / 'before.json')
|
||||
require(intent['source_sha256'] == original.digest(__file__) and intent['boot'] == BOOT
|
||||
and intent['script_sha256'] == hashlib.sha256(SCRIPT.encode()).hexdigest(), 'same source and user-confirmed boot')
|
||||
if args.action == 'start':
|
||||
require(dict(counts=auto.scopes(), flags=auto.status()) == intent['server_before'], 'same closed central context')
|
||||
original.save(folder, 'start-attempt.json', dict(once=True, lost_reply_readback_only=True))
|
||||
payload = intent['payload']
|
||||
result = remote(folder, dict(payload, action=args.action, baseline_sha256=before['baseline_sha256'],
|
||||
expected_sha256=hashlib.sha256(json.dumps(payload, sort_keys=True, separators=(',', ':')).encode()).hexdigest()))
|
||||
original.save(folder, 'result.json' if args.action == 'start' else 'readback-' + str(uuid.uuid4()) + '.json', result)
|
||||
require(dict(counts=auto.scopes(), flags=auto.status()) == intent['server_before'], 'central context preserved')
|
||||
require(result.get('preserved') is True, 'original components and time configuration preserved')
|
||||
current = result.get('current') or result.get('after')
|
||||
require(current and current['time_service']['state'] == 'Running', 'actual running readback')
|
||||
print(json.dumps(dict(case_id=args.id, running=True, preserved=True,
|
||||
readback_only=args.action == 'readback', clock_qualified=False)))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
+10
-5
@@ -56,13 +56,14 @@ Zugänge und private Rohbelege bleiben gitignoriert.
|
||||
Neue isolierte Quellenstände (jeweils nach Gitea gepusht, **keine neue
|
||||
Windows-Runtime oder Cloudserverbereitstellung daraus ableiten**):
|
||||
|
||||
- `codex/windows-msi-integration`/`4a2fbef`: Spec1.19, striktes MSI-Manifest,
|
||||
- `codex/windows-msi-integration`/`ae82b27`: Spec1.19, striktes MSI-Manifest,
|
||||
Tenantkatalog/Migration0014, exakte automatische Artefakt-/Rezeptmengen und
|
||||
separate SYSTEM-Paketerlaubnis; unabhängig geprüft. Lokal118Rust/PG1 und
|
||||
UI42/Typecheck/Build bestanden. Echte synthetische Rust-Planbytes1.0/1.1
|
||||
prüfen die UI; der zuerst gespiegelte None-/Null-Fehler ist korrigiert.
|
||||
Anschließend **Cloud-Linux101 nativ bestanden**, Fall `d015f861…`, Manifest
|
||||
`2d96a07b…`, Proof `09fa24e3…`. Windows79 weiterhin nicht nativ ausgeführt.
|
||||
`2d96a07b…`, Proof `09fa24e3…`. Danach **Windows79 nativ bestanden**, Fall `1b1aeff3…`,
|
||||
Proof `666ed196…`, gleicher Manifest-/Linuxproofbezug.
|
||||
Cache-/Helper-/Runtimeintegration im separaten `codex/windows-msi-runtime`
|
||||
noch in Arbeit, keine Paketwirkung oder Capability veröffentlicht.
|
||||
- `codex/windows-clock-diagnostic`/`a99823b`: Trace nativ im Fall `2996df8c…`
|
||||
@@ -73,7 +74,8 @@ Windows-Runtime oder Cloudserverbereitstellung daraus ableiten**):
|
||||
manueller Stubbytepatch. Kandidat noch nicht nativ ausgeführt; Clockfalse.
|
||||
- `codex/windows-pipe-drain`/`3d152ae`: eigener V2-Endpunkt und begrenzter
|
||||
Transport-Drain-ACK implementiert/lokal geprüft. Neuer Pack `59623db2…`,
|
||||
Manifest `b2f77713…`, erwartete23+7Windowsunits, noch keine native Ausführung.
|
||||
Manifest `b2f77713…`, **23+7Windowsunits nativ bestanden**, Fall
|
||||
`db25cd4a…`; keine RMM-Jobs, Produktdateien oder Dienste geändert.
|
||||
Der Paarupgrader ist separat vorbereitet und wird nach konkreten
|
||||
Quellenreviewbefunden korrigiert; keine erneute Root-Zielaktion daraus.
|
||||
|
||||
@@ -81,11 +83,14 @@ Manueller Windows-Konsolenneustart nach konkreter Zeitabstimmung vom Benutzer
|
||||
als abgeschlossen bestätigt und nativ nur lesend nachgewiesen: Boot
|
||||
2026-11-14T12:26:50.5000000Z, Fall `d888645b…`, Bericht `ab4a99b7…`.
|
||||
Agent89004ad3 läuft als LocalService/Auto mit neuem PID3172; Helpere6aacbdd
|
||||
und W32Time sind entsprechend ihrer unveränderten Manual-Startart gestoppt.
|
||||
und W32Time waren entsprechend ihrer unveränderten Manual-Startart gestoppt.
|
||||
Danach W32Time gezielt mit bestehender Userfreigabe im separaten bootgebundenen
|
||||
Fall203ce31a… einmal gestartet und identisch lesend bestätigt (badcc320…);
|
||||
Helper weiterhinStopped, keine Startart-/NTP-/ACLänderung oder RMM-Jobs.
|
||||
WU-Neustartmarkerfalse, CBS-Neustartmarker weiterhintrue. Kein Remote-Reboot,
|
||||
keine Startartänderung, kein Installer; MSVC bleibt deshalb gesperrt. Die alten
|
||||
PIDs8108/2620 unten sind historische Wartungsbelege, keine aktuelle Baseline.
|
||||
Windows79-Vertragstests werden jetzt separat nach dem Linux101-Beleg ausgeführt.
|
||||
Windows79-Vertragstests anschließend nativ nach dem Linux101-Beleg bestanden.
|
||||
Der bisherige Dev-Reversetunnel ist bis2026-11-14T12:55:31UTC befristet; keine
|
||||
neue Schlüssel-/Port-/Expiryfreigabe oder Verlängerung vorgenommen.
|
||||
|
||||
|
||||
@@ -20,3 +20,28 @@ Das beweist den erfolgten Boot und die beobachteten Dienst-/Markerzustände,
|
||||
keine vollständige PKI-/Datenbankerhaltung oder neue Runtimeabnahme. Die
|
||||
MSVC-Installation bleibt bei vorhandenem CBS-Marker gesperrt; keine Marker
|
||||
entfernen oder Installation erzwingen. Die genaue Ursache bleibt offen.
|
||||
|
||||
|
||||
## Bereits autorisierter Zeitdienst nach diesem Boot
|
||||
|
||||
Eigener neuer Fall `203ce31a-e81e-4a38-af34-a9f1f08e5dc0`: W32Time einmal
|
||||
gezielt gestartet und getrennt nur lesend Running nachgewiesen. Der erste
|
||||
historische Startfall und dessen globaler Einmalmarker bleiben unverändert.
|
||||
Die neue Admission ist fest an den tatsächlich bestätigten Boot gebunden;
|
||||
kein allgemeiner Autostart oder Retry. AgentPID3172 Running und HelperStopped
|
||||
bleiben erhalten; ursprüngliche Image-/Konfigurations-/PKI-Metadaten und
|
||||
Dienstdefinitionen einschließlich Startarten/ACLs/SIDtyp sowie ausgewählte
|
||||
stabile NTP-/GPO-Werte unverändert. Schlüsselinhalt wurde nicht gelesen.
|
||||
Zentralzähler und geschlossene Testflags vor/nach Start und Readback identisch.
|
||||
Normale Zeitsynchronisierung war durch die bestehende Userfreigabe erlaubt.
|
||||
|
||||
Neue Quelle `deploy/windows/time_service_after_boot.py`, SHA256
|
||||
`7e533bc8624ac7c779812a3f0dde0a25d619bc7553681c1639c48b34cb2c842c`,
|
||||
abgeleitet aus unveränderter ursprünglicher Quelleef5d4ce8…; enge vier
|
||||
Substitutionen, Python-/PowerShell-AST und unabhängiger Quellreview bestanden.
|
||||
Neuer Einmalmarker statt Reset des alten. Verlust einer Startantwort erlaubt
|
||||
ausschließlich Readback desselben Falls. ErgebnisSHA256
|
||||
`badcc32035686f63b1aacf4183b53a802ee93a0a613f7ac89e40dee2de13d3ae`;
|
||||
separater Readback bestätigt exakt den Originalbericht und denselben Nachzustand.
|
||||
Dies qualifiziert keine vertrauenswürdige Uhr: Clockgate unverändertfalse,
|
||||
keine RMM-Jobs, kein Helper-/Fixturestart, keine Änderung an NTP oder Startarten.
|
||||
|
||||
Reference in New Issue
Block a user