mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
Fetch the target join os via std::env::consts
Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
0bcc209d94
commit
d100aaf4bf
@ -1,21 +1,6 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Re-export the Target OS, so that Himmelblaud has access to this at
|
|
||||||
// runtime.
|
|
||||||
if &env::var("CARGO_CFG_TARGET_OS").unwrap() != "none" {
|
|
||||||
println!(
|
|
||||||
"cargo:rustc-env=TARGET_OS={}",
|
|
||||||
&env::var("CARGO_CFG_TARGET_OS").unwrap()
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
println!(
|
|
||||||
"cargo:rustc-env=TARGET_OS={}",
|
|
||||||
&env::var("CARGO_CFG_TARGET_FAMILY").unwrap()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
println!("cargo:rerun-if-changed-env=TARGET");
|
|
||||||
|
|
||||||
if let Some(vers) = version::samba_version_string() {
|
if let Some(vers) = version::samba_version_string() {
|
||||||
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", vers);
|
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", vers);
|
||||||
}
|
}
|
||||||
|
@ -710,16 +710,17 @@ impl Resolver {
|
|||||||
token: &UnixUserToken,
|
token: &UnixUserToken,
|
||||||
) -> Result<(), Box<NTSTATUS>> {
|
) -> Result<(), Box<NTSTATUS>> {
|
||||||
/* If not already joined, join the domain now. */
|
/* If not already joined, join the domain now. */
|
||||||
let os = env::var("TARGET_OS").map_err(|e| {
|
let attrs = EnrollAttrs::new(
|
||||||
|
self.realm.clone(),
|
||||||
|
None,
|
||||||
|
Some(env::consts::OS.to_string()),
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.map_err(|e| {
|
||||||
DBG_ERR!("{:?}", e);
|
DBG_ERR!("{:?}", e);
|
||||||
Box::new(NT_STATUS_LOGON_FAILURE)
|
Box::new(NT_STATUS_LOGON_FAILURE)
|
||||||
})?;
|
})?;
|
||||||
let attrs =
|
|
||||||
EnrollAttrs::new(self.realm.clone(), None, Some(os), None, None)
|
|
||||||
.map_err(|e| {
|
|
||||||
DBG_ERR!("{:?}", e);
|
|
||||||
Box::new(NT_STATUS_LOGON_FAILURE)
|
|
||||||
})?;
|
|
||||||
let mut tpm = self.hsm.lock().await;
|
let mut tpm = self.hsm.lock().await;
|
||||||
match self
|
match self
|
||||||
.client
|
.client
|
||||||
|
Loading…
Reference in New Issue
Block a user