From 3830358ad433b9d931416445a66fe32e9713e8c5 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 27 Jan 2023 16:33:41 +0000 Subject: reshuffle --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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 + 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, -- cgit v1.2.3-54-g00ecf