From nobody Mon May 30 12:59:28 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BBB6C1B48560; Mon, 30 May 2022 12:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LBb8c4j2Tz3P4b; Mon, 30 May 2022 12:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653915568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mspvb+wDj5uiNOHXv+zxRmNmSSVQIMc+YvrecC5AVHY=; b=qTPk92Nc4ygq/tuaLtWek3SNyYia4JTHkKlPmRqLqwOPsG9p76pGDdUEWhcTBOYkHdhRWo /ky4mIm6NH6oaotY/2TT6OTGfHz0srgtDMW6Fq0Ig+0j8ZK3tp/srPnW6fNUqpkiQQkS/c ZwfaiPz9r6V4CbEwX9C88wcs9igk5ixuhlLpd/6MeumCvpKVTA05b2soevAl+XqUvfw3MC dI4WIgiOYNXRtmA874NbhP2C5S4tTKNqKarT7VRV3a+CTkUC/hGmMQt7u91dT6n94sw5/j yw/Vtj+Xs+E5Vqtp2gKPBAwGNbqsNzP3tJQpxtwuaEJwupD+HnETUDSn860+7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8170117C8A; Mon, 30 May 2022 12:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24UCxSFL028899; Mon, 30 May 2022 12:59:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24UCxS7Z028898; Mon, 30 May 2022 12:59:28 GMT (envelope-from git) Date: Mon, 30 May 2022 12:59:28 GMT Message-Id: <202205301259.24UCxS7Z028898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: efbe2af2ce5e - main - lib/libgssapi: Trailing whitespace cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efbe2af2ce5e444aa06d6d989c147ecea3f3120f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653915568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mspvb+wDj5uiNOHXv+zxRmNmSSVQIMc+YvrecC5AVHY=; b=bAJR77jNe7lkERLzTXY1ymyOcJ+ihwSdDhTAY49GI3U5q3wDxF92g543lKut7/K6yiQfpp oeLoSDqY6j42+OCf2iTqFQMlYinRtbmgdyDSkj4RruCfKYhtWiWiHoTZZCK2HEv46uRbw6 TqeIcwuWUYF9FBps5bMiEs/hWBynDMsVle7EQ4ZK1klpG5aRhfAkp0rsNlniLqU7mCDnXO 648iEstLoWcvzlyYKEC4uWYq4qktA7BzGQ9goZIuA4OACQKIW7ONaMl9d1cCQ2tqZnEsYa eCndJHCsg4AKINRSZYkwQE5z/XyJx/pUCnw2khlhJMGyLhG79AhHYkvcjjDRaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653915568; a=rsa-sha256; cv=none; b=JbatdsFEfJQ4jTJjm8baGZpx3WeQOMS3ZCqYGNisFbvIANrhoGhqOFg3Ctvsf/VcSi8a0l aO3Nho+hx5vCRvkGEp0z024z69HJN74o0kEw4wf/EnM1GEXTJOBc2smXBJsV60kMRqsaUn 8BkGORvu6ErSb9j+XYEPyVbsGomuSi+th0k914T2DL/gtNSUdC1Jo8m1j3HroKGCss9d65 nlcRXxdRgbnt5VE1v9uTDPWn4KFdZ0J6XC4HkPcNrlFPpJIOjSX5diJnQJfqNVsARc4+yx 0VSiSS26rgCV+XdWFzQN5heq2BtaR8rix058n9EnGx64U8FyYYDNWh8qvDru4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=efbe2af2ce5e444aa06d6d989c147ecea3f3120f commit efbe2af2ce5e444aa06d6d989c147ecea3f3120f Author: Cy Schubert AuthorDate: 2022-05-27 20:48:23 +0000 Commit: Cy Schubert CommitDate: 2022-05-30 12:58:48 +0000 lib/libgssapi: Trailing whitespace cleanup Clean up trailing whitespace (trailing spaces and trailing tabs). MFC after: 1 week --- lib/libgssapi/gss_accept_sec_context.c | 20 +++--- lib/libgssapi/gss_buffer_set.c | 2 +- lib/libgssapi/gss_display_status.c | 100 ++++++++++++++--------------- lib/libgssapi/gss_duplicate_name.c | 8 +-- lib/libgssapi/gss_export_sec_context.c | 2 +- lib/libgssapi/gss_import_sec_context.c | 2 +- lib/libgssapi/gss_indicate_mechs.c | 2 +- lib/libgssapi/gss_inquire_cred_by_oid.c | 2 +- lib/libgssapi/gss_inquire_mechs_for_name.c | 2 +- lib/libgssapi/gss_mech_switch.c | 6 +- lib/libgssapi/gss_names.c | 4 +- lib/libgssapi/gss_pname_to_uid.c | 2 +- lib/libgssapi/gss_pseudo_random.c | 50 +++++++-------- lib/libgssapi/gss_release_oid.c | 48 +++++++------- lib/libgssapi/gss_set_cred_option.c | 6 +- lib/libgssapi/name.h | 2 +- 16 files changed, 129 insertions(+), 129 deletions(-) diff --git a/lib/libgssapi/gss_accept_sec_context.c b/lib/libgssapi/gss_accept_sec_context.c index afb502d84385..74da9791d678 100644 --- a/lib/libgssapi/gss_accept_sec_context.c +++ b/lib/libgssapi/gss_accept_sec_context.c @@ -45,17 +45,17 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid) unsigned char *p = input_token->value; size_t len = input_token->length; size_t a, b; - + /* * Token must start with [APPLICATION 0] SEQUENCE. * But if it doesn't assume it is DCE-STYLE Kerberos! */ if (len == 0) return (GSS_S_DEFECTIVE_TOKEN); - + p++; len--; - + /* * Decode the length and make sure it agrees with the * token length. @@ -82,7 +82,7 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid) } if (a != len) return (GSS_S_DEFECTIVE_TOKEN); - + /* * Decode the OID for the mechanism. Simplify life by * assuming that the OID length is less than 128 bytes. @@ -95,9 +95,9 @@ parse_header(const gss_buffer_t input_token, gss_OID mech_oid) p += 2; len -= 2; mech_oid->elements = p; - + return (GSS_S_COMPLETE); -} +} static gss_OID_desc krb5_mechanism = {9, __DECONST(void *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02")}; @@ -119,12 +119,12 @@ choose_mech(const gss_buffer_t input, gss_OID mech_oid) status = parse_header(input, mech_oid); if (status == GSS_S_COMPLETE) return (GSS_S_COMPLETE); - + /* * Lets guess what mech is really is, callback function to mech ?? */ - if (input->length > 8 && + if (input->length > 8 && memcmp((const char *)input->value, "NTLMSSP\x00", 8) == 0) { *mech_oid = ntlm_mechanism; @@ -136,7 +136,7 @@ choose_mech(const gss_buffer_t input, gss_OID mech_oid) *mech_oid = krb5_mechanism; return (GSS_S_COMPLETE); } else if (input->length == 0) { - /* + /* * There is the a weird mode of SPNEGO (in CIFS and * SASL GSS-SPENGO where the first token is zero * length and the acceptor returns a mech_list, lets @@ -221,7 +221,7 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status, acceptor_mc = GSS_C_NO_CREDENTIAL; } delegated_mc = GSS_C_NO_CREDENTIAL; - + mech_ret_flags = 0; major_status = m->gm_accept_sec_context(minor_status, &ctx->gc_ctx, diff --git a/lib/libgssapi/gss_buffer_set.c b/lib/libgssapi/gss_buffer_set.c index fa084573f1b1..7105f33e9539 100644 --- a/lib/libgssapi/gss_buffer_set.c +++ b/lib/libgssapi/gss_buffer_set.c @@ -40,7 +40,7 @@ /* RCSID("$Id: gss_buffer_set.c 18885 2006-10-24 21:53:02Z lha $"); */ -OM_uint32 +OM_uint32 gss_create_empty_buffer_set(OM_uint32 * minor_status, gss_buffer_set_t *buffer_set) { diff --git a/lib/libgssapi/gss_display_status.c b/lib/libgssapi/gss_display_status.c index d0c3453a0d6b..75e3a3241655 100644 --- a/lib/libgssapi/gss_display_status.c +++ b/lib/libgssapi/gss_display_status.c @@ -29,67 +29,67 @@ */ /* * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* * Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include @@ -236,7 +236,7 @@ _gss_mg_error(struct _gss_mech_switch *m, OM_uint32 maj, OM_uint32 min) mg->min_stat = min; major_status = m->gm_display_status(&minor_status, - maj, + maj, GSS_C_GSS_CODE, &m->gm_mech_oid, &message_content, @@ -246,7 +246,7 @@ _gss_mg_error(struct _gss_mech_switch *m, OM_uint32 maj, OM_uint32 min) mg->maj_error.length = 0; } major_status = m->gm_display_status(&minor_status, - min, + min, GSS_C_MECH_CODE, &m->gm_mech_oid, &message_content, diff --git a/lib/libgssapi/gss_duplicate_name.c b/lib/libgssapi/gss_duplicate_name.c index 02aa2ccf6f8b..579d77e3bd97 100644 --- a/lib/libgssapi/gss_duplicate_name.c +++ b/lib/libgssapi/gss_duplicate_name.c @@ -62,7 +62,7 @@ OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, SLIST_FOREACH(mn, &name->gn_mn, gmn_link) { struct _gss_mechanism_name *mn2; - _gss_find_mn(minor_status, new_name, + _gss_find_mn(minor_status, new_name, mn->gmn_mech_oid, &mn2); } } else { @@ -77,7 +77,7 @@ OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, SLIST_FOREACH(mn, &name->gn_mn, gmn_link) { struct _gss_mechanism_name *new_mn; - + new_mn = malloc(sizeof(*new_mn)); if (!new_mn) { *minor_status = ENOMEM; @@ -85,8 +85,8 @@ OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, } new_mn->gmn_mech = mn->gmn_mech; new_mn->gmn_mech_oid = mn->gmn_mech_oid; - - major_status = + + major_status = mn->gmn_mech->gm_duplicate_name(minor_status, mn->gmn_name, &new_mn->gmn_name); if (major_status != GSS_S_COMPLETE) { diff --git a/lib/libgssapi/gss_export_sec_context.c b/lib/libgssapi/gss_export_sec_context.c index c94e81a9a844..d5963231dbfb 100644 --- a/lib/libgssapi/gss_export_sec_context.c +++ b/lib/libgssapi/gss_export_sec_context.c @@ -51,7 +51,7 @@ gss_export_sec_context(OM_uint32 *minor_status, major_status = m->gm_export_sec_context(minor_status, &ctx->gc_ctx, &buf); - + if (major_status == GSS_S_COMPLETE) { unsigned char *p; diff --git a/lib/libgssapi/gss_import_sec_context.c b/lib/libgssapi/gss_import_sec_context.c index f3c59b0e877b..ad11a0b4dac5 100644 --- a/lib/libgssapi/gss_import_sec_context.c +++ b/lib/libgssapi/gss_import_sec_context.c @@ -65,7 +65,7 @@ gss_import_sec_context(OM_uint32 *minor_status, mech_oid.elements = p + 2; buf.length = len - 2 - mech_oid.length; buf.value = p + 2 + mech_oid.length; - + m = _gss_find_mech_switch(&mech_oid); if (!m) return (GSS_S_DEFECTIVE_TOKEN); diff --git a/lib/libgssapi/gss_indicate_mechs.c b/lib/libgssapi/gss_indicate_mechs.c index aab3ff4e32ce..ac5b77ee3bfd 100644 --- a/lib/libgssapi/gss_indicate_mechs.c +++ b/lib/libgssapi/gss_indicate_mechs.c @@ -46,7 +46,7 @@ gss_indicate_mechs(OM_uint32 *minor_status, major_status = gss_create_empty_oid_set(minor_status, mech_set); if (major_status) return (major_status); - + SLIST_FOREACH(m, &_gss_mechs, gm_link) { if (m->gm_indicate_mechs) { major_status = m->gm_indicate_mechs(minor_status, &set); diff --git a/lib/libgssapi/gss_inquire_cred_by_oid.c b/lib/libgssapi/gss_inquire_cred_by_oid.c index f564f3636338..b3df65297446 100644 --- a/lib/libgssapi/gss_inquire_cred_by_oid.c +++ b/lib/libgssapi/gss_inquire_cred_by_oid.c @@ -78,7 +78,7 @@ gss_inquire_cred_by_oid (OM_uint32 *minor_status, if (status != GSS_S_COMPLETE) continue; - for (i = 0; i < rset->count; i++) { + for (i = 0; i < rset->count; i++) { status = gss_add_buffer_set_member(minor_status, &rset->elements[i], &set); if (status != GSS_S_COMPLETE) diff --git a/lib/libgssapi/gss_inquire_mechs_for_name.c b/lib/libgssapi/gss_inquire_mechs_for_name.c index d171ef2b5bd8..1ff1c30cf249 100644 --- a/lib/libgssapi/gss_inquire_mechs_for_name.c +++ b/lib/libgssapi/gss_inquire_mechs_for_name.c @@ -51,7 +51,7 @@ gss_inquire_mechs_for_name(OM_uint32 *minor_status, major_status = gss_create_empty_oid_set(minor_status, mech_types); if (major_status) return (major_status); - + /* * We go through all the loaded mechanisms and see if this * name's type is supported by the mechanism. If it is, add diff --git a/lib/libgssapi/gss_mech_switch.c b/lib/libgssapi/gss_mech_switch.c index 4ef6e50182ca..56a23b372759 100644 --- a/lib/libgssapi/gss_mech_switch.c +++ b/lib/libgssapi/gss_mech_switch.c @@ -72,7 +72,7 @@ _gss_string_to_oid(const char* s, gss_OID oid) if (q) q = q + 1; number_count++; } - + /* * The first two numbers are in the first byte and each * subsequent number is encoded in a variable byte sequence. @@ -136,7 +136,7 @@ _gss_string_to_oid(const char* s, gss_OID oid) while (bytes) { if (res) { int bit = 7*(bytes-1); - + *res = (number >> bit) & 0x7f; if (bytes != 1) *res |= 0x80; @@ -237,7 +237,7 @@ _gss_load_mech(void) free(m); continue; } - + prefix_fn = (const char *(*)(void)) dlsym(so, "_gss_name_prefix"); if (prefix_fn) diff --git a/lib/libgssapi/gss_names.c b/lib/libgssapi/gss_names.c index be004985af1f..075556451dc5 100644 --- a/lib/libgssapi/gss_names.c +++ b/lib/libgssapi/gss_names.c @@ -181,7 +181,7 @@ gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage; gss_OID GSS_KRB5_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage; OM_uint32 -_gss_find_mn(OM_uint32 *minor_status, struct _gss_name *name, gss_OID mech, +_gss_find_mn(OM_uint32 *minor_status, struct _gss_name *name, gss_OID mech, struct _gss_mechanism_name **output_mn) { OM_uint32 major_status; @@ -210,7 +210,7 @@ _gss_find_mn(OM_uint32 *minor_status, struct _gss_name *name, gss_OID mech, mn = malloc(sizeof(struct _gss_mechanism_name)); if (!mn) return (GSS_S_FAILURE); - + major_status = m->gm_import_name(minor_status, &name->gn_value, (name->gn_type.elements diff --git a/lib/libgssapi/gss_pname_to_uid.c b/lib/libgssapi/gss_pname_to_uid.c index 9ee23a17c345..ec2a3bd91e54 100644 --- a/lib/libgssapi/gss_pname_to_uid.c +++ b/lib/libgssapi/gss_pname_to_uid.c @@ -55,7 +55,7 @@ gss_pname_to_uid(OM_uint32 *minor_status, const gss_name_t pname, if (m->gm_pname_to_uid == NULL) return (GSS_S_UNAVAILABLE); - + major_status = _gss_find_mn(minor_status, name, mech, &mn); if (major_status != GSS_S_COMPLETE) { _gss_mg_error(m, major_status, *minor_status); diff --git a/lib/libgssapi/gss_pseudo_random.c b/lib/libgssapi/gss_pseudo_random.c index 423da4f57e08..55c7d4905012 100644 --- a/lib/libgssapi/gss_pseudo_random.c +++ b/lib/libgssapi/gss_pseudo_random.c @@ -2,35 +2,35 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* $FreeBSD$ */ /* $Id: gss_pseudo_random.c 20053 2007-01-24 01:31:35Z lha $ */ @@ -64,7 +64,7 @@ gss_pseudo_random(OM_uint32 *minor_status, if (m->gm_pseudo_random == NULL) return GSS_S_UNAVAILABLE; - + major_status = (*m->gm_pseudo_random)(minor_status, ctx->gc_ctx, prf_key, prf_in, desired_output_len, prf_out); diff --git a/lib/libgssapi/gss_release_oid.c b/lib/libgssapi/gss_release_oid.c index 19e3b262456c..41b44d2e6f4f 100644 --- a/lib/libgssapi/gss_release_oid.c +++ b/lib/libgssapi/gss_release_oid.c @@ -2,35 +2,35 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2006 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* $FreeBSD$ */ diff --git a/lib/libgssapi/gss_set_cred_option.c b/lib/libgssapi/gss_set_cred_option.c index e645e7799d1e..afb160c92c86 100644 --- a/lib/libgssapi/gss_set_cred_option.c +++ b/lib/libgssapi/gss_set_cred_option.c @@ -102,13 +102,13 @@ gss_set_cred_option (OM_uint32 *minor_status, SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) { m = mc->gmc_mech; - + if (m == NULL) return GSS_S_BAD_MECH; - + if (m->gm_set_cred_option == NULL) continue; - + major_status = m->gm_set_cred_option(minor_status, &mc->gmc_cred, object, value); if (major_status == GSS_S_COMPLETE) diff --git a/lib/libgssapi/name.h b/lib/libgssapi/name.h index 8702fd88df67..803d915a521e 100644 --- a/lib/libgssapi/name.h +++ b/lib/libgssapi/name.h @@ -45,7 +45,7 @@ struct _gss_name { }; extern OM_uint32 - _gss_find_mn(OM_uint32 *, struct _gss_name *, gss_OID, + _gss_find_mn(OM_uint32 *, struct _gss_name *, gss_OID, struct _gss_mechanism_name **); extern struct _gss_name * _gss_make_name(struct _gss_mech_switch *m, gss_name_t new_mn);