Add crate lk-search
- New crate for ldapsearch - Update config dir path
This commit is contained in:
parent
21f16b7dcc
commit
2e6288e835
@ -1,9 +1,9 @@
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"crates/config","crates/ldap","crates/password",
|
||||
"tools/lk-pswdreset"
|
||||
]
|
||||
"crates/config","crates/ldap","crates/password",
|
||||
"tools/lk-pswdreset", "tools/lk-search"
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
edition = "2024"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
//! LDAP connection configuration.
|
||||
//!
|
||||
//! Loads `/etc/ldap-kit/connection.toml`, applies default values,
|
||||
//! Loads `/usr/local/etc/ldap-kit/connection.toml`, applies default values,
|
||||
//! validates required fields, and applies write credential fallbacks.
|
||||
|
||||
use anyhow::{Result, bail};
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
//! Configuration file locations and default values.
|
||||
|
||||
/// Configuration directory.
|
||||
pub const CONFIG_DIR: &str = "/etc/ldap-kit";
|
||||
pub const CONFIG_DIR: &str = "/usr/local/etc/ldap-kit";
|
||||
|
||||
/// Shared LDAP connection configuration.
|
||||
pub const CONNECTION_CONFIG: &str = "/etc/ldap-kit/connection.toml";
|
||||
pub const CONNECTION_CONFIG: &str = "/usr/local/etc/ldap-kit/connection.toml";
|
||||
|
||||
/// Password reset configuration.
|
||||
pub const PSWDRESET_CONFIG: &str = "/etc/ldap-kit/pswdreset.toml";
|
||||
pub const PSWDRESET_CONFIG: &str = "/usr/local/etc/ldap-kit/pswdreset.toml";
|
||||
|
||||
/// Default LDAP server URL.
|
||||
pub const DEFAULT_LDAP_URL: &str = "ldap://localhost:389";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
//! Password reset configuration.
|
||||
//!
|
||||
//! Loads `/etc/ldap-kit/pswdreset.toml` and applies default values.
|
||||
//! Loads `/usr/local/etc/ldap-kit/pswdreset.toml` and applies default values.
|
||||
|
||||
use anyhow::Result;
|
||||
use serde::Deserialize;
|
||||
|
||||
12
tools/lk-search/Cargo.toml
Normal file
12
tools/lk-search/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "lk-search"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
clap.workspace = true
|
||||
ldap3.workspace = true
|
||||
config = { path = "../../crates/config" }
|
||||
3
tools/lk-search/src/main.rs
Normal file
3
tools/lk-search/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user