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 - 2004 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 "rsh_locl.h"
@@ -95,7 +95,7 @@ rsh_loop (int s, int errsock)
if (s >= FD_SETSIZE || (errsock != -1 && errsock >= FD_SETSIZE))
errx (1, "fd too large");
FD_ZERO(&real_readset);
FD_SET(s, &real_readset);
if (errsock != -1) {
@@ -236,7 +236,7 @@ krb5_forward_cred (krb5_auth_context auth_context,
}
creds.client = principal;
ret = krb5_build_principal (context,
&creds.server,
strlen(principal->realm),
@@ -313,10 +313,10 @@ send_krb5_auth(int s,
}
if(do_encrypt == -1) {
krb5_appdefault_boolean(context, NULL,
krb5_principal_get_realm(context, server),
"encrypt",
FALSE,
krb5_appdefault_boolean(context, NULL,
krb5_principal_get_realm(context, server),
"encrypt",
FALSE,
&do_encrypt);
}
@@ -369,19 +369,19 @@ send_krb5_auth(int s,
krb5_const_realm realm = krb5_principal_get_realm(context, server);
if (do_forwardable == -1)
krb5_appdefault_boolean(context, NULL, realm,
"forwardable", FALSE,
"forwardable", FALSE,
&do_forwardable);
if (do_forward == -1)
krb5_appdefault_boolean(context, NULL, realm,
"forward", FALSE,
"forward", FALSE,
&do_forward);
}
krb5_free_principal(context, server);
krb5_data_free(&cksum_data);
if (status) {
if(status == KRB5_SENDAUTH_REJECTED &&
if(status == KRB5_SENDAUTH_REJECTED &&
protocol_version == 2 && protocol_version_str == NULL)
sendauth_version_error = 1;
else
@@ -593,7 +593,7 @@ proto (int s, int errsock,
cmd_len, cmd)) {
close (errsock2);
return 1;
}
}
ret = net_read (s, &reply, 1);
if (ret < 0) {
@@ -625,7 +625,7 @@ proto (int s, int errsock,
(void *)&one, sizeof(one)) < 0)
warn("setsockopt stderr");
}
return rsh_loop (s, errsock2);
}
@@ -666,11 +666,11 @@ print_addr (const struct sockaddr *sa)
const char *as = NULL;
if(sa->sa_family == AF_INET)
as = inet_ntop (sa->sa_family, &((struct sockaddr_in*)sa)->sin_addr,
as = inet_ntop (sa->sa_family, &((struct sockaddr_in*)sa)->sin_addr,
addr_str, sizeof(addr_str));
#ifdef HAVE_INET6
else if(sa->sa_family == AF_INET6)
as = inet_ntop (sa->sa_family, &((struct sockaddr_in6*)sa)->sin6_addr,
as = inet_ntop (sa->sa_family, &((struct sockaddr_in6*)sa)->sin6_addr,
addr_str, sizeof(addr_str));
#endif
if(as == NULL)
@@ -778,12 +778,12 @@ doit (const char *hostname,
int errsock;
s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
if (s < 0)
if (s < 0)
continue;
socketfailed = 0;
if (connect (s, a->ai_addr, a->ai_addrlen) < 0) {
char addr[128];
if(getnameinfo(a->ai_addr, a->ai_addrlen,
if(getnameinfo(a->ai_addr, a->ai_addrlen,
addr, sizeof(addr), NULL, 0, NI_NUMERICHOST) == 0)
warn ("connect(%s [%s])", hostname, addr);
else
@@ -820,7 +820,7 @@ doit (const char *hostname,
freeaddrinfo (eai);
} else
errsock = -1;
ret = proto (s, errsock,
hostname,
local_user, remote_user,
@@ -848,7 +848,7 @@ struct getargs args[] = {
"Use unique remote credentials cache [krb5]" },
{ "tkfile", 'U', arg_string, &unique_tkfile,
"Specifies remote credentials cache [krb5]" },
{ "protocol", 'P', arg_string, &protocol_version_str,
{ "protocol", 'P', arg_string, &protocol_version_str,
"Protocol version [krb5]", "protocol" },
#endif
{ "broken", 'K', arg_flag, &use_only_broken, "Use only priv port" },
@@ -909,14 +909,14 @@ main(int argc, char **argv)
uid = getuid ();
if (setuid (uid) || (uid != 0 && setuid(0) == 0))
err (1, "setuid");
setprogname (argv[0]);
if (argc >= 2 && argv[1][0] != '-') {
host = argv[host_index = 1];
argindex = 1;
}
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
&argindex))
usage (1);
@@ -940,7 +940,7 @@ main(int argc, char **argv)
int v;
v = strtol(protocol_version_str, &end, 0);
if(*end != '\0' || (v != 1 && v != 2)) {
errx(1, "unknown protocol version \"%s\"",
errx(1, "unknown protocol version \"%s\"",
protocol_version_str);
}
protocol_version = v;
@@ -967,7 +967,7 @@ main(int argc, char **argv)
use_v4 = 0;
if(use_v5 == -1 && use_v4 == 1)
use_v5 = 0;
#endif
#endif
if (use_only_broken) {
#ifdef KRB4
@@ -1013,7 +1013,7 @@ main(int argc, char **argv)
else
host = argv[host_index = argindex++];
}
if((tmp = strchr(host, '@')) != NULL) {
*tmp++ = '\0';
user = host;
@@ -1036,7 +1036,7 @@ main(int argc, char **argv)
user = local_user;
cmd_len = construct_command(&cmd, argc - argindex, argv + argindex);
/*
* Try all different authentication methods
*/
@@ -1061,7 +1061,7 @@ main(int argc, char **argv)
again:
ret = doit (host, ai, user, local_user, cmd, cmd_len,
send_krb5_auth);
if(ret != 0 && sendauth_version_error &&
if(ret != 0 && sendauth_version_error &&
protocol_version == 2) {
protocol_version = 1;
goto again;