summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-01-31 21:29:13 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-01-31 22:48:45 +0100
commit5bcba3f2e9db4aff6ca5859ee0fcb670656a4983 (patch)
treeef57a619143b8e404871c6ba290dfb858b1e6f34 /src
parenta9bac17d27d2219125e0c5289ae0e1fe39d73ea7 (diff)
downloadrebel-5bcba3f2e9db4aff6ca5859ee0fcb670656a4983.tar
rebel-5bcba3f2e9db4aff6ca5859ee0fcb670656a4983.zip
unshare: fix parse_uid() name
Diffstat (limited to 'src')
-rw-r--r--src/unshare.rs6
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 })
}