[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-1386-g0cfc2f1
Volker Lendecke
vlendec at samba.org
Sat Sep 5 09:22:11 MDT 2009
The branch, master has been updated
via 0cfc2f19eff04f4d48ba065563238ae18f2e3f5b (commit)
via c52fa95b95b9cba472c7a4887e5134bcff802899 (commit)
via 1abf69231218446635cfc94041e7b0e61d73aeb1 (commit)
via 4b49a8debce4c8f8b807b09f1800539028075c6f (commit)
from a32f4dd3cfd43022ab3224366e026664b238429e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0cfc2f19eff04f4d48ba065563238ae18f2e3f5b
Author: Volker Lendecke <vl at samba.org>
Date: Sat Sep 5 17:14:45 2009 +0200
s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf->fstrcpy
commit c52fa95b95b9cba472c7a4887e5134bcff802899
Author: Volker Lendecke <vl at samba.org>
Date: Sat Sep 5 17:05:30 2009 +0200
s3:winbind: Remove pointless <cond> ? true : false;
commit 1abf69231218446635cfc94041e7b0e61d73aeb1
Author: Volker Lendecke <vl at samba.org>
Date: Sat Sep 5 17:00:21 2009 +0200
s3:winbind: Make the pam_auth subfunctions static
commit 4b49a8debce4c8f8b807b09f1800539028075c6f
Author: Volker Lendecke <vl at samba.org>
Date: Thu Sep 3 08:02:21 2009 +0200
s3:libsmb: Convert (state->received) to (state->received != 0)
This confused me for a second, this should not happen a second time :-)
-----------------------------------------------------------------------
Summary of changes:
source3/libsmb/clireadwrite.c | 2 +-
source3/winbindd/winbindd_pam.c | 39 +++++++++++++++++-------------------
source3/winbindd/winbindd_proto.h | 9 --------
3 files changed, 19 insertions(+), 31 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 0d1f9e5..27f9e4f 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -200,7 +200,7 @@ static void cli_read_andx_done(struct tevent_req *subreq)
state->buf = (uint8_t *)smb_base(inbuf) + SVAL(vwv+6, 0);
if (trans_oob(smb_len(inbuf), SVAL(vwv+6, 0), state->received)
- || (state->received && (state->buf < bytes))) {
+ || ((state->received != 0) && (state->buf < bytes))) {
DEBUG(5, ("server returned invalid read&x data offset\n"));
tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 5665792..b87d2a8 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -854,9 +854,9 @@ void winbindd_pam_auth(struct winbindd_cli_state *state)
request_error(state);
}
-NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3)
+static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
+ struct winbindd_cli_state *state,
+ struct netr_SamInfo3 **info3)
{
NTSTATUS result = NT_STATUS_LOGON_FAILURE;
uint16 max_allowed_bad_attempts;
@@ -925,12 +925,12 @@ NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
uchar salted_hash[NT_HASH_LEN];
E_md5hash(cached_salt, new_nt_pass, salted_hash);
- password_good = (memcmp(cached_nt_pass, salted_hash, NT_HASH_LEN) == 0) ?
- true : false;
+ password_good = (memcmp(cached_nt_pass, salted_hash,
+ NT_HASH_LEN) == 0);
} else {
/* Old cached cred - direct store of nt_hash (bad bad bad !). */
- password_good = (memcmp(cached_nt_pass, new_nt_pass, NT_HASH_LEN) == 0) ?
- true : false;
+ password_good = (memcmp(cached_nt_pass, new_nt_pass,
+ NT_HASH_LEN) == 0);
}
if (password_good) {
@@ -1110,9 +1110,9 @@ failed:
return NT_STATUS_LOGON_FAILURE;
}
-NTSTATUS winbindd_dual_pam_auth_kerberos(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3)
+static NTSTATUS winbindd_dual_pam_auth_kerberos(struct winbindd_domain *domain,
+ struct winbindd_cli_state *state,
+ struct netr_SamInfo3 **info3)
{
struct winbindd_domain *contact_domain;
fstring name_domain, name_user;
@@ -1181,9 +1181,9 @@ typedef NTSTATUS (*netlogon_fn_t)(struct rpc_pipe_client *cli,
DATA_BLOB nt_response,
struct netr_SamInfo3 **info3);
-NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3)
+static NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
+ struct winbindd_cli_state *state,
+ struct netr_SamInfo3 **info3)
{
struct rpc_pipe_client *netlogon_pipe;
@@ -1730,20 +1730,17 @@ void winbindd_pam_auth_crap(struct winbindd_cli_state *state)
}
if (!state->privileged) {
- char *error_string = NULL;
DEBUG(2, ("winbindd_pam_auth_crap: non-privileged access "
"denied. !\n"));
DEBUGADD(2, ("winbindd_pam_auth_crap: Ensure permissions "
"on %s are set correctly.\n",
get_winbind_priv_pipe_dir()));
/* send a better message than ACCESS_DENIED */
- error_string = talloc_asprintf(state->mem_ctx,
- "winbind client not authorized "
- "to use winbindd_pam_auth_crap."
- " Ensure permissions on %s "
- "are set correctly.",
- get_winbind_priv_pipe_dir());
- fstrcpy(state->response->data.auth.error_string, error_string);
+ fstr_sprintf(state->response->data.auth.error_string,
+ "winbind client not authorized to use "
+ "winbindd_pam_auth_crap. Ensure permissions on "
+ "%s are set correctly.",
+ get_winbind_priv_pipe_dir());
result = NT_STATUS_ACCESS_DENIED;
goto done;
}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index fba6bd2..086fa52 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -478,15 +478,6 @@ void ndr_print_winbindd_domain(struct ndr_print *ndr,
struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
const char *domain_name);
void winbindd_pam_auth(struct winbindd_cli_state *state);
-NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3);
-NTSTATUS winbindd_dual_pam_auth_kerberos(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3);
-NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
- struct winbindd_cli_state *state,
- struct netr_SamInfo3 **info3);
enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
struct winbindd_cli_state *state) ;
void winbindd_pam_auth_crap(struct winbindd_cli_state *state);
--
Samba Shared Repository
More information about the samba-cvs
mailing list