mirror of
https://github.com/coreos/ignition.git
synced 2026-02-06 18:47:54 +01:00
config: add warnings for unspecified file/dir modes
When the mode is unspecified on a file or directory it defaults to 0. Add warnings to inform users of this.
This commit is contained in:
@@ -26,5 +26,11 @@ func (d Directory) ValidateMode() report.Report {
|
||||
Kind: report.EntryError,
|
||||
})
|
||||
}
|
||||
if d.Mode == nil {
|
||||
r.Add(report.Entry{
|
||||
Message: "directory permissions unset, defaulting to 0000",
|
||||
Kind: report.EntryWarning,
|
||||
})
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
@@ -33,6 +33,12 @@ func (f File) ValidateMode() report.Report {
|
||||
Kind: report.EntryError,
|
||||
})
|
||||
}
|
||||
if f.Mode == nil {
|
||||
r.Add(report.Entry{
|
||||
Message: "file permissions unset, defaulting to 0000",
|
||||
Kind: report.EntryWarning,
|
||||
})
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user