summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7190e51..6f6407a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,11 +10,6 @@ use std::io::{ErrorKind, Write};
use std::path::Path;
use std::process;
-const CG_MOUNT: &str = "/sys/fs/cgroup";
-
-struct PAMUserCG;
-pam::pam_hooks!(PAMUserCG);
-
fn create_and_open_dir<P: AsRef<Path> + Copy>(
d: &Dir,
path: P,
@@ -66,6 +61,11 @@ fn open_session(h: &mut PamHandle, mountpoint: &str) -> Result<(), SessionError>
Ok(())
}
+const CG_MOUNT: &str = "/sys/fs/cgroup";
+
+struct PAMUserCG;
+pam::pam_hooks!(PAMUserCG);
+
impl PamHooks for PAMUserCG {
fn sm_open_session(
h: &mut PamHandle,