fix for go1.16 and possible sigsev

This commit is contained in:
Christian Goll
2022-09-19 17:10:06 +02:00
parent 8e0fd64c7e
commit c3416de3cb
2 changed files with 2 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ func ConfirmationPrompt(label string) (yes bool) {
Simple check if the config can be written in case wwctl isn't run as root
*/
func CanWriteConfig() (canwrite *wwapiv1.CanWriteConfig) {
canwrite = new(wwapiv1.CanWriteConfig)
err := syscall.Access(node.ConfigFile, syscall.O_RDWR)
if err != nil {
wwlog.Warn("Couldn't open %s:%s", node.ConfigFile, err)