Skip to content

Commit 226dfab

Browse files
committed
libct/user: ParseGroupFilter: use TrimSpace
Same as in other places (other parsers here, as well as golang os/user parser and glibc parser all tolerate extra space at BOL and EOL). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 120e3a7 commit 226dfab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/user/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {
187187
)
188188

189189
for s.Scan() {
190-
text := s.Bytes()
190+
text := bytes.TrimSpace(s.Bytes())
191191
if len(text) == 0 {
192192
continue
193193
}

0 commit comments

Comments
 (0)