remove trailing whitespace

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-09-13 09:21:03 +00:00
parent e172367898
commit 6937d41a02
940 changed files with 23827 additions and 23827 deletions

View File

@@ -1,34 +1,34 @@
/*
* Copyright (c) 1997-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.
*/
/**
@@ -37,7 +37,7 @@
* A Kerberos principal is a email address looking string that
* contains to parts separeted by a @. The later part is the kerbero
* realm the principal belongs to and the former is a list of 0 or
* more components. For example
* more components. For example
* @verbatim
lha@SU.SE
host/hummel.it.su.se@SU.SE
@@ -110,7 +110,7 @@ krb5_principal_get_realm(krb5_context context,
krb5_const_principal principal)
{
return princ_realm(principal);
}
}
const char* KRB5_LIB_FUNCTION
krb5_principal_get_comp_string(krb5_context context,
@@ -143,7 +143,7 @@ krb5_parse_name_flags(krb5_context context,
int got_realm = 0;
int first_at = 1;
int enterprise = (flags & KRB5_PRINCIPAL_PARSE_ENTERPRISE);
*principal = NULL;
#define RFLAGS (KRB5_PRINCIPAL_PARSE_NO_REALM|KRB5_PRINCIPAL_PARSE_MUST_REALM)
@@ -181,7 +181,7 @@ krb5_parse_name_flags(krb5_context context,
N_("malloc: out of memory", ""));
return ENOMEM;
}
n = 0;
p = start = q = s = strdup(name);
if (start == NULL) {
@@ -221,7 +221,7 @@ krb5_parse_name_flags(krb5_context context,
comp[n] = malloc(q - start + 1);
if (comp[n] == NULL) {
ret = ENOMEM;
krb5_set_error_message(context, ret,
krb5_set_error_message(context, ret,
N_("malloc: out of memory", ""));
goto exit;
}
@@ -245,7 +245,7 @@ krb5_parse_name_flags(krb5_context context,
if(got_realm){
if (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) {
ret = KRB5_PARSE_MALFORMED;
krb5_set_error_message(context, ret,
krb5_set_error_message(context, ret,
N_("realm found in 'short' principal "
"expected to be without one", ""));
goto exit;
@@ -374,7 +374,7 @@ unparse_name_fixed(krb5_context context,
N_("Out of space printing principal", ""));
return ERANGE;
}
}
}
/* add realm if different from default realm */
if(short_form && !no_realm) {
krb5_realm r;
@@ -414,7 +414,7 @@ krb5_unparse_name_fixed_short(krb5_context context,
char *name,
size_t len)
{
return unparse_name_fixed(context, principal, name, len,
return unparse_name_fixed(context, principal, name, len,
KRB5_PRINCIPAL_UNPARSE_SHORT);
}
@@ -558,7 +558,7 @@ krb5_build_principal(krb5_context context,
}
static krb5_error_code
append_component(krb5_context context, krb5_principal p,
append_component(krb5_context context, krb5_principal p,
const char *comp,
size_t comp_len)
{
@@ -620,7 +620,7 @@ build_principal(krb5_context context,
va_list ap)
{
krb5_principal p;
p = calloc(1, sizeof(*p));
if (p == NULL) {
krb5_set_error_message(context, ENOMEM,
@@ -636,7 +636,7 @@ build_principal(krb5_context context,
N_("malloc: out of memory", ""));
return ENOMEM;
}
(*func)(context, p, ap);
*principal = p;
return 0;
@@ -666,8 +666,8 @@ krb5_make_principal(krb5_context context,
}
krb5_error_code KRB5_LIB_FUNCTION
krb5_build_principal_va(krb5_context context,
krb5_principal *principal,
krb5_build_principal_va(krb5_context context,
krb5_principal *principal,
int rlen,
krb5_const_realm realm,
va_list ap)
@@ -676,8 +676,8 @@ krb5_build_principal_va(krb5_context context,
}
krb5_error_code KRB5_LIB_FUNCTION
krb5_build_principal_va_ext(krb5_context context,
krb5_principal *principal,
krb5_build_principal_va_ext(krb5_context context,
krb5_principal *principal,
int rlen,
krb5_const_realm realm,
va_list ap)
@@ -715,7 +715,7 @@ krb5_copy_principal(krb5_context context,
}
if(copy_Principal(inprinc, p)) {
free(p);
krb5_set_error_message(context, ENOMEM,
krb5_set_error_message(context, ENOMEM,
N_("malloc: out of memory", ""));
return ENOMEM;
}
@@ -808,7 +808,7 @@ krb5_principal_match(krb5_context context,
static struct v4_name_convert {
const char *from;
const char *to;
const char *to;
} default_v4_name_convert[] = {
{ "ftp", "ftp" },
{ "hprop", "hprop" },
@@ -834,7 +834,7 @@ get_name_conversion(krb5_context context, const char *realm, const char *name)
p = krb5_config_get_string(context, NULL, "realms", realm,
"v4_name_convert", "host", name, NULL);
if(p == NULL)
p = krb5_config_get_string(context, NULL, "libdefaults",
p = krb5_config_get_string(context, NULL, "libdefaults",
"v4_name_convert", "host", name, NULL);
if(p)
return p;
@@ -874,7 +874,7 @@ krb5_425_conv_principal_ext2(krb5_context context,
const char *name,
const char *instance,
const char *realm,
krb5_boolean (*func)(krb5_context,
krb5_boolean (*func)(krb5_context,
void *, krb5_principal),
void *funcctx,
krb5_boolean resolve,
@@ -904,7 +904,7 @@ krb5_425_conv_principal_ext2(krb5_context context,
if(p == NULL)
goto no_host;
name = p;
p = krb5_config_get_string(context, NULL, "realms", realm,
p = krb5_config_get_string(context, NULL, "realms", realm,
"v4_instance_convert", instance, NULL);
if(p){
instance = p;
@@ -961,7 +961,7 @@ krb5_425_conv_principal_ext2(krb5_context context,
#endif
if (passed) {
if (inst == NULL) {
krb5_set_error_message(context, ENOMEM,
krb5_set_error_message(context, ENOMEM,
N_("malloc: out of memory", ""));
return ENOMEM;
}
@@ -994,9 +994,9 @@ krb5_425_conv_principal_ext2(krb5_context context,
* the converted host should be the long hostname.
*/
if (func == NULL &&
if (func == NULL &&
gethostname (local_hostname, sizeof(local_hostname)) == 0 &&
strncmp(instance, local_hostname, strlen(instance)) == 0 &&
strncmp(instance, local_hostname, strlen(instance)) == 0 &&
local_hostname[strlen(instance)] == '.') {
strlcpy(host, local_hostname, sizeof(host));
goto local_host;
@@ -1019,8 +1019,8 @@ krb5_425_conv_principal_ext2(krb5_context context,
krb5_config_free_strings(domains);
}
p = krb5_config_get_string(context, NULL, "realms", realm,
p = krb5_config_get_string(context, NULL, "realms", realm,
"default_domain", NULL);
if(p == NULL){
/* this should be an error, just faking a name is not good */
@@ -1057,7 +1057,7 @@ no_host:
NULL);
if(p)
name = p;
ret = krb5_make_principal(context, &pr, realm, name, instance, NULL);
if(func == NULL || (*func)(context, funcctx, pr)){
*princ = pr;
@@ -1105,11 +1105,11 @@ krb5_425_conv_principal(krb5_context context,
{
krb5_boolean resolve = krb5_config_get_bool(context,
NULL,
"libdefaults",
"v4_instance_resolve",
"libdefaults",
"v4_instance_resolve",
NULL);
return krb5_425_conv_principal_ext(context, name, instance, realm,
return krb5_425_conv_principal_ext(context, name, instance, realm,
NULL, resolve, princ);
}
@@ -1130,7 +1130,7 @@ check_list(const krb5_config_binding *l, const char *name, const char **out)
}
static int
name_convert(krb5_context context, const char *name, const char *realm,
name_convert(krb5_context context, const char *name, const char *realm,
const char **out)
{
const krb5_config_binding *l;
@@ -1168,7 +1168,7 @@ name_convert(krb5_context context, const char *name, const char *realm,
NULL);
if(l && check_list(l, name, out))
return KRB5_NT_UNKNOWN;
/* didn't find it in config file, try built-in list */
{
struct v4_name_convert *q;
@@ -1192,7 +1192,7 @@ name_convert(krb5_context context, const char *name, const char *realm,
krb5_error_code KRB5_LIB_FUNCTION
krb5_524_conv_principal(krb5_context context,
const krb5_principal principal,
char *name,
char *name,
char *instance,
char *realm)
{
@@ -1238,7 +1238,7 @@ krb5_524_conv_principal(krb5_context context,
*p = 0;
i = tmpinst;
}
if (strlcpy (name, n, aname_sz) >= aname_sz) {
krb5_set_error_message(context, KRB5_PARSE_MALFORMED,
N_("too long name component to convert", ""));
@@ -1285,7 +1285,7 @@ krb5_sname_to_principal (krb5_context context,
krb5_set_error_message(context, ret,
N_("Failed to get local hostname", ""));
return ret;
}
}
localhost[sizeof(localhost) - 1] = '\0';
hostname = localhost;
}
@@ -1335,7 +1335,7 @@ krb5_error_code
krb5_parse_nametype(krb5_context context, const char *str, int32_t *nametype)
{
size_t i;
for(i = 0; nametypes[i].type; i++) {
if (strcasecmp(nametypes[i].type, str) == 0) {
*nametype = nametypes[i].value;