1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Ensure clients can write to the himmelblau pipe

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
David Mulder 2024-08-23 14:29:49 -06:00
parent cb23d6a15e
commit 6907508cdb

View File

@ -30,6 +30,7 @@ use himmelblau::BrokerClientApplication;
use idmap::Idmap;
use kanidm_hsm_crypto::soft::SoftTpm;
use kanidm_hsm_crypto::{BoxedDynTpm, Tpm};
use libc::umask;
use param::LoadParm;
use std::path::{Path, PathBuf};
use std::process::ExitCode;
@ -375,6 +376,8 @@ async fn main() -> ExitCode {
client,
)));
// Set the umask while we open the path for most clients.
let before = unsafe { umask(0) };
// Listen for incoming requests from PAM and NSS
let listener = match UnixListener::bind(sock_path) {
Ok(listener) => listener,
@ -384,6 +387,8 @@ async fn main() -> ExitCode {
return ExitCode::FAILURE;
}
};
// Undo umask changes.
let _ = unsafe { umask(before) };
let server = tokio::spawn(async move {
while !stop_now.load(Ordering::Relaxed) {