summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-03 05:47:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:45 -0500
commit94fb514376e7cb1c3ba4f89e10289350052d1294 (patch)
treed4eca2537847fa1a391b0777f0d834151fbe8f81
parent2d9adf1ea5f7928c1f4f14f3f885d688ba5fa744 (diff)
downloadsamba-94fb514376e7cb1c3ba4f89e10289350052d1294.tar.gz
samba-94fb514376e7cb1c3ba4f89e10289350052d1294.tar.bz2
samba-94fb514376e7cb1c3ba4f89e10289350052d1294.zip
r1630: - fixed the replacement timegm() function to work correctly for DST changes
- got rid of global_myname(), using lp_netbios_name() instead (This used to be commit e8d4b390884e487163d81f66a5a7ac1de1305d9a)
-rw-r--r--source4/lib/replace.c11
-rw-r--r--source4/libads/ldap.c2
-rw-r--r--source4/libads/sasl.c2
-rw-r--r--source4/libcli/auth/kerberos_verify.c2
-rw-r--r--source4/libcli/auth/ntlmssp.c4
-rw-r--r--source4/utils/ntlm_auth.c2
6 files changed, 7 insertions, 16 deletions
diff --git a/source4/lib/replace.c b/source4/lib/replace.c
index c186d307e6..de32d377d5 100644
--- a/source4/lib/replace.c
+++ b/source4/lib/replace.c
@@ -437,7 +437,6 @@ char *rep_inet_ntoa(struct in_addr ip)
{
struct tm tm2, tm3;
time_t t;
- static int zone = -1;
tm2 = *tm;
@@ -446,10 +445,7 @@ char *rep_inet_ntoa(struct in_addr ip)
tm2 = *tm;
tm2.tm_isdst = tm3.tm_isdst;
t = mktime(&tm2);
- if (zone == -1) {
- zone = get_time_zone(t);
- }
- t -= zone;
+ t -= get_time_zone(t);
return t;
}
@@ -472,8 +468,3 @@ char *rep_inet_ntoa(struct in_addr ip)
return ret;
}
#endif
-
-const char *global_myname(void)
-{
- return lp_netbios_name();
-}
diff --git a/source4/libads/ldap.c b/source4/libads/ldap.c
index 2954c286ab..f038b23d23 100644
--- a/source4/libads/ldap.c
+++ b/source4/libads/ldap.c
@@ -228,7 +228,7 @@ got_connection:
if (!ads->auth.user_name) {
/* by default use the machine account */
fstring myname;
- fstrcpy(myname, global_myname());
+ fstrcpy(myname, lp_netbios_name());
strlower_m(myname);
asprintf(&ads->auth.user_name, "HOST/%s", myname);
}
diff --git a/source4/libads/sasl.c b/source4/libads/sasl.c
index ce787400f7..b79f54c86d 100644
--- a/source4/libads/sasl.c
+++ b/source4/libads/sasl.c
@@ -96,7 +96,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
nthash, 24,
lp_workgroup(),
ads->auth.user_name,
- global_myname(),
+ lp_netbios_name(),
sess_key, 16,
neg_flags);
diff --git a/source4/libcli/auth/kerberos_verify.c b/source4/libcli/auth/kerberos_verify.c
index 76e98cb39a..5cd22b3749 100644
--- a/source4/libcli/auth/kerberos_verify.c
+++ b/source4/libcli/auth/kerberos_verify.c
@@ -230,7 +230,7 @@ static BOOL ads_secrets_verify_ticket(krb5_context context, krb5_auth_context au
like. We have to go through all this to allow us to store
the secret internally, instead of using /etc/krb5.keytab */
- myname = name_to_fqdn(mem_ctx, global_myname());
+ myname = name_to_fqdn(mem_ctx, lp_netbios_name());
strlower_m(myname);
asprintf(&host_princ_s, "host/%s@%s", myname, lp_realm());
ret = krb5_parse_name(context, host_princ_s, &host_princ);
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index 75c1e30f56..9579f3612c 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -915,7 +915,7 @@ NTSTATUS ntlmssp_server_start(struct ntlmssp_state **ntlmssp_state)
(*ntlmssp_state)->set_challenge = set_challenge;
(*ntlmssp_state)->may_set_challenge = may_set_challenge;
- (*ntlmssp_state)->get_global_myname = global_myname;
+ (*ntlmssp_state)->get_global_myname = lp_netbios_name;
(*ntlmssp_state)->get_domain = lp_workgroup;
(*ntlmssp_state)->server_role = ROLE_DOMAIN_MEMBER; /* a good default */
@@ -1268,7 +1268,7 @@ NTSTATUS ntlmssp_client_start(struct ntlmssp_state **ntlmssp_state)
(*ntlmssp_state)->mem_ctx = mem_ctx;
- (*ntlmssp_state)->get_global_myname = global_myname;
+ (*ntlmssp_state)->get_global_myname = lp_netbios_name;
(*ntlmssp_state)->get_domain = lp_workgroup;
(*ntlmssp_state)->unicode = lp_parm_bool(-1, "ntlmssp_client", "unicode", True);
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index ad804eda3c..1c0b454718 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -533,7 +533,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
if (!NT_STATUS_IS_OK(
local_pw_check_specified(username,
domain,
- global_myname(),
+ lp_netbios_name(),
&challenge,
&lm_response,
&nt_response,