diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-04-07 21:55:07 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-04-07 21:55:07 +0900 |
| commit | 50127ed5f9bc89f38c7d5d1aa06b4d99229b9c64 (patch) | |
| tree | 37f235ceabaf0028a880a0618d805a2a4a72dac9 /print.go | |
| parent | b5eff27c4069cdee7733d58207a8bbef69948b26 (diff) | |
fortify: print synthesised id in ps
This is not the full synthesised id so it does not get too long.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print.go')
| -rw-r--r-- | print.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -265,9 +265,11 @@ func printPs(output io.Writer, now time.Time, s state.Store, short, flagJSON boo as := "(No configuration information)" if e.Config != nil { as = strconv.Itoa(e.Config.Confinement.AppID) - if e.Config.ID != "" { - as += " (" + e.Config.ID + ")" + id := e.Config.ID + if id == "" { + id = "uk.gensokyo.fortify." + e.s[:8] } + as += " (" + id + ")" } t.Printf("\t%s\t%d\t%s\t%s\n", e.s[:8], e.PID, as, now.Sub(e.Time).Round(time.Second).String()) |
