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);
}
token: &UnixUserToken,
) -> Result<(), Box<NTSTATUS>> {
/* 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);
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;
match self
.client