Fix parsing of /etc/group during syncuser

- Closes #1202

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-04-25 14:32:00 -06:00
parent c62e190229
commit 03aae1a1d9
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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]