Add crate lk-search
- New crate for ldapsearch - Update config dir path
This commit is contained in:
parent
21f16b7dcc
commit
2e6288e835
@ -2,8 +2,8 @@
|
|||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = [
|
members = [
|
||||||
"crates/config","crates/ldap","crates/password",
|
"crates/config","crates/ldap","crates/password",
|
||||||
"tools/lk-pswdreset"
|
"tools/lk-pswdreset", "tools/lk-search"
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
//! LDAP connection configuration.
|
//! 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.
|
//! validates required fields, and applies write credential fallbacks.
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
//! Configuration file locations and default values.
|
//! Configuration file locations and default values.
|
||||||
|
|
||||||
/// Configuration directory.
|
/// Configuration directory.
|
||||||
pub const CONFIG_DIR: &str = "/etc/ldap-kit";
|
pub const CONFIG_DIR: &str = "/usr/local/etc/ldap-kit";
|
||||||
|
|
||||||
/// Shared LDAP connection configuration.
|
/// 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.
|
/// 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.
|
/// Default LDAP server URL.
|
||||||
pub const DEFAULT_LDAP_URL: &str = "ldap://localhost:389";
|
pub const DEFAULT_LDAP_URL: &str = "ldap://localhost:389";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
//! Password reset configuration.
|
//! 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 anyhow::Result;
|
||||||
use serde::Deserialize;
|
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