From 83b2aff7d4bb1b12c088925368b49b290012235e Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Mon, 22 Aug 2022 11:10:56 +0200 Subject: [PATCH] B #5946: Fix parsing `*` in the group list (#2261) Regression introduced by68ce7dc0 With the addition to skipws, peek() will read the next whitespace in the buffer. The logic has been changed to use the extraction operator so ws are consumed. The peek - get is now changed by >> - unget calls (cherry picked from commit 479bfd0807fc1eaf895e694ee215e723ac07505f) --- src/um/UserPool.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/um/UserPool.cc b/src/um/UserPool.cc index 8b48c108b5..b8e5ca33e2 100644 --- a/src/um/UserPool.cc +++ b/src/um/UserPool.cc @@ -596,13 +596,18 @@ static int parse_auth_msg( int tmp_gid; bool gr_admin = false; - char c = is.peek(); + char c; + + is >> c; if ( c == '*' ) { - is.get(c); gr_admin = true; } + else + { + is.unget(); + } is >> tmp_gid;