fortify: print permissive defaults warning early
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
20a3d4c458
commit
fa0616b274
7
print.go
7
print.go
@ -53,6 +53,10 @@ func printShowInstance(instance *state.State, config *fst.Config, short bool) {
|
|||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
w := tabwriter.NewWriter(direct.Stdout, 0, 1, 4, ' ', 0)
|
w := tabwriter.NewWriter(direct.Stdout, 0, 1, 4, ' ', 0)
|
||||||
|
|
||||||
|
if config.Confinement.Sandbox == nil {
|
||||||
|
fmt.Print("Warning: this configuration uses permissive defaults!\n\n")
|
||||||
|
}
|
||||||
|
|
||||||
if instance != nil {
|
if instance != nil {
|
||||||
fmt.Fprintf(w, "State\n")
|
fmt.Fprintf(w, "State\n")
|
||||||
fmt.Fprintf(w, " Instance:\t%s (%d)\n", instance.ID.String(), instance.PID)
|
fmt.Fprintf(w, " Instance:\t%s (%d)\n", instance.ID.String(), instance.PID)
|
||||||
@ -106,9 +110,6 @@ func printShowInstance(instance *state.State, config *fst.Config, short bool) {
|
|||||||
|
|
||||||
// Env map[string]string `json:"env"`
|
// Env map[string]string `json:"env"`
|
||||||
// Link [][2]string `json:"symlink"`
|
// Link [][2]string `json:"symlink"`
|
||||||
} else {
|
|
||||||
// this gets printed before everything else
|
|
||||||
fmt.Println("WARNING: current configuration uses permissive defaults!")
|
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, " Command:\t%s\n", strings.Join(config.Command, " "))
|
fmt.Fprintf(w, " Command:\t%s\n", strings.Join(config.Command, " "))
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user