@@ -4,7 +4,7 @@ use std::fs::File;
4
4
use std:: io:: Result ;
5
5
6
6
use libc:: { gid_t, pid_t, uid_t} ;
7
- use nom:: { IResult , line_ending, not_line_ending, space} ;
7
+ use nom:: { IResult , line_ending, multispace , not_line_ending, space} ;
8
8
9
9
use parsers:: {
10
10
map_result,
@@ -185,7 +185,7 @@ named!(parse_gid<(gid_t, gid_t, gid_t, gid_t)>, chain!(tag!("Gid:\t") ~ real: pa
185
185
|| { ( real, effective, saved, fs) } ) ) ;
186
186
187
187
named ! ( parse_fd_allocated<u32 >, delimited!( tag!( "FDSize:\t " ) , parse_u32, line_ending) ) ;
188
- named ! ( parse_groups<Vec <gid_t> >, delimited!( tag!( "Groups:\t " ) , parse_u32s, line_ending ) ) ;
188
+ named ! ( parse_groups<Vec <gid_t> >, delimited!( tag!( "Groups:\t " ) , parse_u32s, multispace ) ) ;
189
189
190
190
named ! ( parse_ns_pids<Vec <pid_t> >, delimited!( tag!( "NStgid:\t " ) , parse_i32s, line_ending) ) ;
191
191
named ! ( parse_ns_tids<Vec <pid_t> >, delimited!( tag!( "NSpid:\t " ) , parse_i32s, line_ending) ) ;
@@ -324,8 +324,6 @@ mod tests {
324
324
325
325
use std:: fs:: File ;
326
326
327
- use libc:: gid_t;
328
-
329
327
use parsers:: read_to_end;
330
328
use parsers:: tests:: unwrap;
331
329
use super :: { SeccompMode , parse_status, status, status_self} ;
@@ -350,7 +348,7 @@ mod tests {
350
348
Uid:\t 0\t 0\t 0\t 0\n \
351
349
Gid:\t 0\t 0\t 0\t 0\n \
352
350
FDSize:\t 64\n \
353
- Groups:\t \n \
351
+ Groups:\t 10 \t 1000 \n \
354
352
NStgid:\t 1\n \
355
353
NSpid:\t 1\n \
356
354
NSpgid:\t 1\n \
@@ -406,7 +404,7 @@ mod tests {
406
404
assert_eq ! ( 0 , status. gid_saved) ;
407
405
assert_eq ! ( 0 , status. gid_fs) ;
408
406
assert_eq ! ( 64 , status. fd_allocated) ;
409
- assert_eq ! ( Vec :: <gid_t> :: new ( ) , status. groups) ;
407
+ assert_eq ! ( vec! [ 10 , 1000 ] , status. groups) ;
410
408
assert_eq ! ( vec![ 1 ] , status. ns_pids) ;
411
409
assert_eq ! ( vec![ 1 ] , status. ns_tids) ;
412
410
assert_eq ! ( vec![ 1 ] , status. ns_pgids) ;
0 commit comments