diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-01-31 21:29:13 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-01-31 22:48:45 +0100 |
commit | 5bcba3f2e9db4aff6ca5859ee0fcb670656a4983 (patch) | |
tree | ef57a619143b8e404871c6ba290dfb858b1e6f34 /src | |
parent | a9bac17d27d2219125e0c5289ae0e1fe39d73ea7 (diff) | |
download | rebel-5bcba3f2e9db4aff6ca5859ee0fcb670656a4983.tar rebel-5bcba3f2e9db4aff6ca5859ee0fcb670656a4983.zip |
unshare: fix parse_uid() name
Diffstat (limited to 'src')
-rw-r--r-- | src/unshare.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unshare.rs b/src/unshare.rs index bb72db9..a8ec1c1 100644 --- a/src/unshare.rs +++ b/src/unshare.rs @@ -20,7 +20,7 @@ struct SubIDRange { count: libc::uid_t, } -fn parse_pid(s: &OsStr) -> Option<libc::uid_t> { +fn parse_uid(s: &OsStr) -> Option<libc::uid_t> { s.to_str().and_then(|s| s.parse().ok()) } @@ -33,8 +33,8 @@ fn parse_id_range(line: Vec<u8>, uid: &OsStr, username: Option<&OsStr>) -> Optio return None; } - let start = parse_pid(parts[1])?; - let count = parse_pid(parts[2])?; + let start = parse_uid(parts[1])?; + let count = parse_uid(parts[2])?; Some(SubIDRange { start, count }) } |