Refactor: Extract utmpx crate from lemurs

This commit is contained in:
Gijs Burghoorn 2023-04-01 19:42:13 +02:00
parent ddb3cb5468
commit c6a59edcb1
6 changed files with 12 additions and 5 deletions

View file

@ -3,6 +3,7 @@ members = [
"chvt",
"lemurs-tui",
"env_container",
"utmpx",
]
[workspace.dependencies]

View file

@ -18,6 +18,7 @@ license = "MIT or APACHE"
[dependencies]
chvt.path = "../chvt"
env_container.path = "../env_container"
utmpx.path = "../utmpx"
# UI and TUI interface
tui = { version = "0.16.0", features = [ "crossterm" ] }

View file

@ -1,5 +1,4 @@
mod pam;
pub mod utmpx;
use ::pam::{Authenticator, PasswordConv};
use log::info;

View file

@ -23,12 +23,10 @@ use auth::try_auth;
use config::Config;
use post_login::{EnvironmentStartError, PostLoginEnvironment};
use crate::{
auth::utmpx::add_utmpx_entry,
cli::{Cli, Commands},
};
use crate::cli::{Cli, Commands};
use env_container::EnvironmentContainer;
use utmpx::add_utmpx_entry;
use self::{
auth::AuthenticationError,

8
utmpx/Cargo.toml Normal file
View file

@ -0,0 +1,8 @@
[package]
name = "utmpx"
version = "0.1.0"
edition = "2021"
[dependencies]
libc.workspace = true
log.workspace = true