mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-01 22:55:06 +02:00
Less footguns (#3552)
This commit is contained in:
parent
94b6287e27
commit
5458b13398
|
@ -21,6 +21,8 @@ ${SUDOCMD} apt-get update &&
|
||||||
cmake \
|
cmake \
|
||||||
build-essential \
|
build-essential \
|
||||||
jq \
|
jq \
|
||||||
|
lld \
|
||||||
|
clang \
|
||||||
tpm-udev
|
tpm-udev
|
||||||
|
|
||||||
if [ -z "${PACKAGING}" ]; then
|
if [ -z "${PACKAGING}" ]; then
|
||||||
|
@ -73,10 +75,6 @@ if [ -z "$(which cargo)" ]; then
|
||||||
ERROR=1
|
ERROR=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ERROR -eq 0 ] && [ -z "$(which cross)" ]; then
|
|
||||||
echo "You don't have cross installed! Installing it now..."
|
|
||||||
cargo install -f cross
|
|
||||||
fi
|
|
||||||
if [ $ERROR -eq 0 ] && [ -z "$(which cargo-deb)" ]; then
|
if [ $ERROR -eq 0 ] && [ -z "$(which cargo-deb)" ]; then
|
||||||
echo "You don't have cargo-deb installed! Installing it now..."
|
echo "You don't have cargo-deb installed! Installing it now..."
|
||||||
cargo install -f cargo-deb
|
cargo install -f cargo-deb
|
||||||
|
|
|
@ -458,6 +458,16 @@ impl UnixdConfig {
|
||||||
|
|
||||||
fn apply_from_config_v2(self, config: ConfigV2) -> Result<Self, UnixIntegrationError> {
|
fn apply_from_config_v2(self, config: ConfigV2) -> Result<Self, UnixIntegrationError> {
|
||||||
let kanidm_config = if let Some(kconfig) = config.kanidm {
|
let kanidm_config = if let Some(kconfig) = config.kanidm {
|
||||||
|
match &kconfig.pam_allowed_login_groups {
|
||||||
|
None => {
|
||||||
|
error!("You have a 'kanidm' section in the config but an empty pam_allowed_login_groups set. USERS CANNOT AUTH.")
|
||||||
|
}
|
||||||
|
Some(groups) => {
|
||||||
|
if groups.is_empty() {
|
||||||
|
error!("You have a 'kanidm' section in the config but an empty pam_allowed_login_groups set. USERS CANNOT AUTH.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some(KanidmConfig {
|
Some(KanidmConfig {
|
||||||
conn_timeout: kconfig.conn_timeout.unwrap_or(DEFAULT_CONN_TIMEOUT),
|
conn_timeout: kconfig.conn_timeout.unwrap_or(DEFAULT_CONN_TIMEOUT),
|
||||||
request_timeout: kconfig.request_timeout.unwrap_or(DEFAULT_CONN_TIMEOUT * 2),
|
request_timeout: kconfig.request_timeout.unwrap_or(DEFAULT_CONN_TIMEOUT * 2),
|
||||||
|
@ -465,6 +475,9 @@ impl UnixdConfig {
|
||||||
map_group: kconfig.map_group,
|
map_group: kconfig.map_group,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
error!(
|
||||||
|
"You are using a version 2 config without a 'kanidm' section. USERS CANNOT AUTH."
|
||||||
|
);
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue