From 03aae1a1d9fa34c94d1052fe10bfdadb7adfd392 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 25 Apr 2024 14:32:00 -0600 Subject: [PATCH] Fix parsing of /etc/group during syncuser - Closes #1202 Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 1 + internal/pkg/container/syncuids.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c354c02f..ba1f4242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix a locking issue with concurrent read/writes for node status. #1174 - Fix shim and grub detection for aarch64. #1145 - wwctl [profile|node] list -a handles now slices correclty. #1113 +- Fix parsing of /etc/group during syncuser. #1202 ## 4.5.0, 2024-02-08 diff --git a/internal/pkg/container/syncuids.go b/internal/pkg/container/syncuids.go index 89291c79..c9e9d701 100644 --- a/internal/pkg/container/syncuids.go +++ b/internal/pkg/container/syncuids.go @@ -166,8 +166,8 @@ func (db syncDB) read(fileName string, fromContainer bool) error { for fileScanner.Scan() { line := fileScanner.Text() fields := strings.Split(line, ":") - if len(fields) != 7 { - wwlog.Debug("malformed line in passwd: %s", line) + if len(fields) != 7 && len(fields) != 4 { + wwlog.Debug("malformed line in passwd/group: %s", line) continue } name := fields[0]