mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2024-10-01 01:05:39 -04:00
Log SetDateTime messages from dom0
This commit is contained in:
parent
ea7c10ce58
commit
d4775a1fcd
@ -10,6 +10,11 @@ module Flow = Qubes.RExec.Flow
|
||||
let src = Logs.Src.create "command" ~doc:"qrexec command handler"
|
||||
module Log = (val Logs.src_log src : Logs.LOG)
|
||||
|
||||
let set_date_time flow =
|
||||
Flow.read_line flow >|= function
|
||||
| `Eof -> Log.warn "EOF reading time from dom0" Logs.unit; 1
|
||||
| `Ok line -> Log.info "TODO: set time to %S" (fun f -> f line); 0
|
||||
|
||||
let handler ~user:_ cmd flow =
|
||||
(* Write a message to the client and return an exit status of 1. *)
|
||||
let error fmt =
|
||||
@ -17,4 +22,5 @@ let handler ~user:_ cmd flow =
|
||||
Log.warn "<< %s" (fun f -> f s);
|
||||
Flow.ewritef flow "%s [while processing %S]" s cmd >|= fun () -> 1 in
|
||||
match cmd with
|
||||
| "QUBESRPC qubes.SetDateTime dom0" -> set_date_time flow
|
||||
| cmd -> error "Unknown command %S" cmd
|
||||
|
Loading…
Reference in New Issue
Block a user