diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-01-27 16:33:41 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-01-27 17:08:58 +0000 |
commit | 3830358ad433b9d931416445a66fe32e9713e8c5 (patch) | |
tree | b8914c101233d4251384490caa8205334aec65a0 /src/lib.rs | |
parent | 18dba05104304778ed1939b23a1f6c078e683e51 (diff) | |
download | pam_usercg_rust-3830358ad433b9d931416445a66fe32e9713e8c5.tar.gz pam_usercg_rust-3830358ad433b9d931416445a66fe32e9713e8c5.tar.xz pam_usercg_rust-3830358ad433b9d931416445a66fe32e9713e8c5.zip |
reshuffle
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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, |