Merge pull request #1206 from anderbubble/syncuser-groups

Fix parsing of /etc/group during syncuser
This commit is contained in:
Jonathon Anderson
2024-04-30 23:29:44 -06:00
committed by GitHub
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]