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;
|
||||
|
||||
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() {
|
||||
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", vers);
|
||||
}
|
||||
|
@ -710,12 +710,13 @@ impl Resolver {
|
||||
token: &UnixUserToken,
|
||||
) -> Result<(), Box<NTSTATUS>> {
|
||||
/* If not already joined, join the domain now. */
|
||||
let os = env::var("TARGET_OS").map_err(|e| {
|
||||
DBG_ERR!("{:?}", e);
|
||||
Box::new(NT_STATUS_LOGON_FAILURE)
|
||||
})?;
|
||||
let attrs =
|
||||
EnrollAttrs::new(self.realm.clone(), None, Some(os), None, None)
|
||||
let attrs = EnrollAttrs::new(
|
||||
self.realm.clone(),
|
||||
None,
|
||||
Some(env::consts::OS.to_string()),
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.map_err(|e| {
|
||||
DBG_ERR!("{:?}", e);
|
||||
Box::new(NT_STATUS_LOGON_FAILURE)
|
||||
|
Loading…
Reference in New Issue
Block a user