remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2000 - 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 "kadmin_locl.h"
|
||||
@@ -50,11 +50,11 @@ add_kadm_port(krb5_context context, const char *service, unsigned int port)
|
||||
struct kadm_port *p;
|
||||
p = malloc(sizeof(*p));
|
||||
if(p == NULL) {
|
||||
krb5_warnx(context, "failed to allocate %lu bytes\n",
|
||||
krb5_warnx(context, "failed to allocate %lu bytes\n",
|
||||
(unsigned long)sizeof(*p));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
p->port = strdup(service);
|
||||
p->def_port = port;
|
||||
|
||||
@@ -117,7 +117,7 @@ terminate(int sig)
|
||||
}
|
||||
|
||||
static int
|
||||
spawn_child(krb5_context context, int *socks,
|
||||
spawn_child(krb5_context context, int *socks,
|
||||
unsigned int num_socks, int this_sock)
|
||||
{
|
||||
int e, i;
|
||||
@@ -139,15 +139,15 @@ spawn_child(krb5_context context, int *socks,
|
||||
if(e)
|
||||
krb5_warn(context, e, "krb5_sockaddr2address");
|
||||
else {
|
||||
e = krb5_print_address (&addr, buf, sizeof(buf),
|
||||
e = krb5_print_address (&addr, buf, sizeof(buf),
|
||||
&buf_len);
|
||||
if(e)
|
||||
if(e)
|
||||
krb5_warn(context, e, "krb5_print_address");
|
||||
else
|
||||
krb5_warnx(context, "connection from %s", buf);
|
||||
krb5_free_address(context, &addr);
|
||||
}
|
||||
|
||||
|
||||
pid = fork();
|
||||
if(pid == 0) {
|
||||
for(i = 0; i < num_socks; i++)
|
||||
@@ -171,16 +171,16 @@ wait_for_connection(krb5_context context,
|
||||
int e;
|
||||
fd_set orig_read_set, read_set;
|
||||
int max_fd = -1;
|
||||
|
||||
|
||||
FD_ZERO(&orig_read_set);
|
||||
|
||||
|
||||
for(i = 0; i < num_socks; i++) {
|
||||
if (socks[i] >= FD_SETSIZE)
|
||||
errx (1, "fd too large");
|
||||
FD_SET(socks[i], &orig_read_set);
|
||||
max_fd = max(max_fd, socks[i]);
|
||||
}
|
||||
|
||||
|
||||
pgrp = getpid();
|
||||
|
||||
if(setpgid(0, pgrp) < 0)
|
||||
@@ -247,11 +247,11 @@ start_server(krb5_context context)
|
||||
continue;
|
||||
}
|
||||
i = 0;
|
||||
for(ap = ai; ap; ap = ap->ai_next)
|
||||
for(ap = ai; ap; ap = ap->ai_next)
|
||||
i++;
|
||||
tmp = realloc(socks, (num_socks + i) * sizeof(*socks));
|
||||
if(tmp == NULL) {
|
||||
krb5_warnx(context, "failed to reallocate %lu bytes",
|
||||
krb5_warnx(context, "failed to reallocate %lu bytes",
|
||||
(unsigned long)(num_socks + i) * sizeof(*socks));
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user