diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-09 20:26:46 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-10 20:56:16 +0100 |
commit | fd1b6bdef9b68b9fc8c7915350c48eeaba9d7c04 (patch) | |
tree | 655d6e53da57d6583b874c9a74165bf0b8243bc6 /source3 | |
parent | 86a73e6eba35973b0de63e3e048da99c7472582a (diff) | |
download | samba-fd1b6bdef9b68b9fc8c7915350c48eeaba9d7c04.tar.gz samba-fd1b6bdef9b68b9fc8c7915350c48eeaba9d7c04.tar.bz2 samba-fd1b6bdef9b68b9fc8c7915350c48eeaba9d7c04.zip |
s3: Fix some nonempty blank lines
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/ntlm_auth.c | 72 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cred_cache.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_creds.c | 6 |
3 files changed, 42 insertions, 42 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 57e4251543..e018c28c30 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -223,7 +223,7 @@ DATA_BLOB get_challenge(void) static DATA_BLOB chal; if (opt_challenge.length) return opt_challenge; - + chal = data_blob(NULL, 8); generate_random_buffer(chal.data, chal.length); @@ -242,7 +242,7 @@ static bool parse_ntlm_auth_domain_user(const char *domuser, fstring domain, if (!p) { return False; } - + fstrcpy(user, p+1); fstrcpy(domain, domuser); domain[PTR_DIFF(p, domuser)] = 0; @@ -300,23 +300,23 @@ int get_pam_winbind_config() { int ctrl = 0; dictionary *d = NULL; - + if (!opt_pam_winbind_conf || !*opt_pam_winbind_conf) { opt_pam_winbind_conf = PAM_WINBIND_CONFIG_FILE; } d = iniparser_load(CONST_DISCARD(char *, opt_pam_winbind_conf)); - + if (!d) { return 0; } - + if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:krb5_auth"), false)) { ctrl |= WINBIND_KRB5_AUTH; } iniparser_freedict(d); - + return ctrl; } @@ -438,7 +438,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username, } request.data.auth_crap.nt_resp_len = nt_response->length; } - + result = winbindd_request_response(WINBINDD_PAM_AUTH_CRAP, &request, &response); SAFE_FREE(request.extra_data.data); @@ -451,7 +451,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username, winbindd_free_response(&response); return nt_status; } - + nt_status = (NT_STATUS(response.data.auth.nt_status)); if (!NT_STATUS_IS_OK(nt_status)) { if (error_string) @@ -533,7 +533,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username, memcpy(request.data.chng_pswd_auth_crap.old_lm_hash_enc, old_lm_hash_enc.data, sizeof(request.data.chng_pswd_auth_crap.old_lm_hash_enc)); request.data.chng_pswd_auth_crap.old_lm_hash_enc_len = old_lm_hash_enc.length; } - + result = winbindd_request_response(WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP, &request, &response); /* Display response */ @@ -546,7 +546,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username, winbindd_free_response(&response); return nt_status; } - + nt_status = (NT_STATUS(response.data.auth.nt_status)); if (!NT_STATUS_IS_OK(nt_status)) { @@ -557,7 +557,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username, } winbindd_free_response(&response); - + return nt_status; } @@ -585,7 +585,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB memcpy(lm_session_key->data, lm_key, 8); memset(lm_session_key->data+8, '\0', 8); } - + if (memcmp(user_sess_key, zeros, 16) != 0) { *user_session_key = data_blob_talloc(ntlmssp_state, user_sess_key, 16); } @@ -611,7 +611,7 @@ static NTSTATUS local_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *u struct samr_Password lm_pw, nt_pw; nt_lm_owf_gen (opt_password, nt_pw.hash, lm_pw.hash); - + nt_status = ntlm_password_check(ntlmssp_state, true, true, 0, &ntlmssp_state->chal, @@ -621,7 +621,7 @@ static NTSTATUS local_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *u ntlmssp_state->user, ntlmssp_state->domain, &lm_pw, &nt_pw, user_session_key, lm_session_key); - + if (NT_STATUS_IS_OK(nt_status)) { ntlmssp_state->auth_context = talloc_asprintf(ntlmssp_state, "%s%c%s", ntlmssp_state->domain, @@ -674,7 +674,7 @@ static NTSTATUS ntlm_auth_start_ntlmssp_client(struct ntlmssp_state **client_ntl if (opt_password) { status = ntlmssp_set_password(*client_ntlmssp_state, opt_password); - + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Could not set password: %s\n", nt_errstr(status))); @@ -689,7 +689,7 @@ static NTSTATUS ntlm_auth_start_ntlmssp_client(struct ntlmssp_state **client_ntl static NTSTATUS ntlm_auth_start_ntlmssp_server(struct ntlmssp_state **ntlmssp_state) { NTSTATUS status = ntlmssp_server_start(ntlmssp_state); - + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Could not start NTLMSSP server: %s\n", nt_errstr(status))); @@ -1091,7 +1091,7 @@ static void manage_squid_basic_request(struct ntlm_auth_state *state, { char *user, *pass; user=buf; - + pass=(char *)memchr(buf,' ',length); if (!pass) { DEBUG(2, ("Password not found. Denying access\n")); @@ -1100,12 +1100,12 @@ static void manage_squid_basic_request(struct ntlm_auth_state *state, } *pass='\0'; pass++; - + if (state->helper_mode == SQUID_2_5_BASIC) { rfc1738_unescape(user); rfc1738_unescape(pass); } - + if (check_plaintext_auth(user, pass, False)) { x_fprintf(x_stdout, "OK\n"); } else { @@ -1513,7 +1513,7 @@ static void manage_client_ntlmssp_targ(struct spnego_data spnego) status = ntlmssp_update(client_ntlmssp_state, spnego.negTokenTarg.responseToken, &request); - + if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { DEBUG(1, ("Expected MORE_PROCESSING_REQUIRED from " "ntlmssp_client_update, got: %s\n", @@ -1530,7 +1530,7 @@ static void manage_client_ntlmssp_targ(struct spnego_data spnego) spnego.negTokenTarg.supportedMech = (char *)OID_NTLMSSP; spnego.negTokenTarg.responseToken = request; spnego.negTokenTarg.mechListMIC = null_blob; - + spnego_write_data(ctx, &to_server, &spnego); data_blob_free(&request); @@ -1684,7 +1684,7 @@ static void manage_gss_spnego_client_request(struct ntlm_auth_state *state, /* We asked for a password and obviously got it :-) */ opt_password = SMB_STRNDUP((const char *)request.data, request.length); - + if (opt_password == NULL) { DEBUG(1, ("Out of memory\n")); x_fprintf(x_stdout, "BH Out of memory\n"); @@ -1812,7 +1812,7 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state, static char *plaintext_password; static bool ntlm_server_1_user_session_key; static bool ntlm_server_1_lm_session_key; - + if (strequal(buf, ".")) { if (!full_username && !username) { x_fprintf(x_stdout, "Error: No username supplied!\n"); @@ -1842,7 +1842,7 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state, if (full_username && !username) { fstring fstr_user; fstring fstr_domain; - + if (!parse_ntlm_auth_domain_user(full_username, fstr_user, fstr_domain)) { /* username might be 'tainted', don't print into our new-line deleimianted stream */ x_fprintf(x_stdout, "Error: Could not parse into domain and username\n"); @@ -1859,7 +1859,7 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state, if (ntlm_server_1_lm_session_key) flags |= WBFLAG_PAM_LMKEY; - + if (ntlm_server_1_user_session_key) flags |= WBFLAG_PAM_USER_SESSION_KEY; @@ -1928,13 +1928,13 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state, parameter = strstr_m(request, ":: "); if (!parameter) { parameter = strstr_m(request, ": "); - + if (!parameter) { DEBUG(0, ("Parameter not found!\n")); x_fprintf(x_stdout, "Error: Parameter not found!\n.\n"); return; } - + parameter[0] ='\0'; parameter++; parameter[0] ='\0'; @@ -2015,7 +2015,7 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, new_nt_pswd = data_blob(NULL, 516); old_nt_hash_enc = data_blob(NULL, 16); - + /* Calculate the MD4 hash (NT compatible) of the * password */ E_md4hash(oldpswd, old_nt_hash); @@ -2023,7 +2023,7 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, /* E_deshash returns false for 'long' passwords (> 14 DOS chars). - + Therefore, don't send a buffer encrypted with the truncated hash (it could allow an even easier @@ -2052,12 +2052,12 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, encode_pw_buffer(new_nt_pswd.data, newpswd, STR_UNICODE); - + arcfour_crypt(new_nt_pswd.data, old_nt_hash, 516); E_old_pw_hash(new_nt_hash, old_nt_hash, old_nt_hash_enc.data); } - + if (!full_username && !username) { x_fprintf(x_stdout, "Error: No username supplied!\n"); } else if ((!new_nt_pswd.data || !old_nt_hash_enc.data) && @@ -2066,11 +2066,11 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, "blobs supplied!\n"); } else { char *error_string = NULL; - + if (full_username && !username) { fstring fstr_user; fstring fstr_domain; - + if (!parse_ntlm_auth_domain_user(full_username, fstr_user, fstr_domain)) { @@ -2088,7 +2088,7 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, username = smb_xstrdup(fstr_user); domain = smb_xstrdup(fstr_domain); } - + } if(!NT_STATUS_IS_OK(contact_winbind_change_pswd_auth_crap( @@ -2128,13 +2128,13 @@ static void manage_ntlm_change_password_1_request(struct ntlm_auth_state *state, parameter = strstr_m(request, ":: "); if (!parameter) { parameter = strstr_m(request, ": "); - + if (!parameter) { DEBUG(0, ("Parameter not found!\n")); x_fprintf(x_stdout, "Error: Parameter not found!\n.\n"); return; } - + parameter[0] ='\0'; parameter++; parameter[0] ='\0'; diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index 01b77f0a83..df09bbe1bd 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -544,11 +544,11 @@ NTSTATUS add_ccache_to_list(const char *princ_name, /* FIXME: in this case we still might want to have a krb5 cred * event handler created - gd * Add ticket refresh handler here */ - + if (!lp_winbind_refresh_tickets() || renew_until <= 0) { return NT_STATUS_OK; } - + if (!entry->event) { if (postponed_request) { t = timeval_current_ofs(MAX(30, lp_winbind_cache_time()), 0); @@ -585,7 +585,7 @@ NTSTATUS add_ccache_to_list(const char *princ_name, DEBUG(10,("add_ccache_to_list: added krb5_ticket handler\n")); } - + return NT_STATUS_OK; } diff --git a/source3/winbindd/winbindd_creds.c b/source3/winbindd/winbindd_creds.c index 3874b6e5bd..46c7a06f7c 100644 --- a/source3/winbindd/winbindd_creds.c +++ b/source3/winbindd/winbindd_creds.c @@ -4,17 +4,17 @@ Winbind daemon - cached credentials funcions Copyright (C) Guenther Deschner 2005 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ |