summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 434eb29..1b55c8f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -12,14 +12,15 @@ struct PAMUserCG;
pam::pam_hooks!(PAMUserCG);
fn create_and_open_dir<P: AsRef<Path> + Copy>(
- d: &Dir, path: P,
- ) -> std::io::Result<Dir> {
+ d: &Dir,
+ path: P,
+) -> std::io::Result<Dir> {
match d.create_dir(path) {
Ok(()) => Ok(()),
Err(e) => match e.kind() {
ErrorKind::AlreadyExists => Ok(()),
_ => Err(e),
- }
+ },
}?;
d.open_dir(path)
}
@@ -47,7 +48,7 @@ impl PamHooks for PAMUserCG {
fn sm_open_session(
h: &mut PamHandle,
_args: Vec<&CStr>,
- _flags: PamFlag
+ _flags: PamFlag,
) -> PamResultCode {
if open_session(h).is_ok() {
PamResultCode::PAM_SUCCESS