summaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-03-19 21:04:10 +0000
committerJakub Jelinek <jakub@redhat.com>2005-03-19 21:04:10 +0000
commit8f8ebbc438fcb4b22fba8beb3ef3d1aa59d9d7bf (patch)
treeb7091affa76bbaf47e78a59dfc72b2102554eaf9 /sunrpc
parentf5c3480e830e94e0e51a0bdb1053944daed8bc58 (diff)
Updated to fedora-glibc-20050319T1907cvs/fedora-glibc-2_3_4-15
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/Makefile5
-rw-r--r--sunrpc/des_impl.c6
-rw-r--r--sunrpc/key_call.c83
3 files changed, 4 insertions, 90 deletions
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index 2a3a22496e..4a2c60eab4 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1994-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1994-2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -126,9 +126,6 @@ CFLAGS-pmap_rmt.c = -fexceptions
CFLAGS-clnt_perr.c = -fexceptions
CFLAGS-openchild.c = -fexceptions
-ifeq (yes,$(have_doors))
-CPPFLAGS-key_call.c += -DHAVE_DOORS=1
-endif
CPPFLAGS += -D_RPC_THREAD_SAFE_
include ../Rules
diff --git a/sunrpc/des_impl.c b/sunrpc/des_impl.c
index 702bd02c77..d0004b97f1 100644
--- a/sunrpc/des_impl.c
+++ b/sunrpc/des_impl.c
@@ -391,14 +391,14 @@ static const unsigned long des_skb[8][64] =
static const char shifts2[16] =
{0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0};
-static void des_set_key (char *, unsigned long *) internal_function;
+static void des_set_key (unsigned char *, unsigned long *) internal_function;
static void des_encrypt (unsigned long *, unsigned long *, int)
internal_function;
int _des_crypt (char *, unsigned, struct desparams *);
static void
internal_function
-des_set_key (char *key, unsigned long *schedule)
+des_set_key (unsigned char *key, unsigned long *schedule)
{
register unsigned long c, d, t, s;
register unsigned char *in;
@@ -406,7 +406,7 @@ des_set_key (char *key, unsigned long *schedule)
register int i;
k = (unsigned long *) schedule;
- in = (unsigned char *) key;
+ in = key;
c2l (in, c);
c2l (in, d);
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 506a99767c..77c0ce18b9 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -51,10 +51,6 @@
#include <rpc/key_prot.h>
#include <bits/libc-lock.h>
-#ifdef HAVE_DOORS
-# include "door/door.h"
-#endif
-
#define KEY_TIMEOUT 5 /* per-try timeout in seconds */
#define KEY_NRETRY 12 /* number of retries */
@@ -503,73 +499,6 @@ key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg,
return result;
}
-#ifdef HAVE_DOORS
-/* returns 0 on failure, 1 on success */
-static int
-internal_function
-key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg,
- xdrproc_t xdr_rslt, char *rslt)
-{
- XDR xdrs;
- int fd, ret;
- door_arg_t args;
- char *data_ptr;
- u_long data_len = 0;
- char res[255];
-
- if ((fd = open("/var/run/keyservdoor", O_RDONLY)) < 0)
- return 0;
- res[0] = 0;
-
- data_len = xdr_sizeof (xdr_arg, arg);
- data_ptr = calloc (1, data_len + 2 * sizeof (u_long));
- if (data_ptr == NULL)
- return 0;
-
- INTUSE(xdrmem_create) (&xdrs, &data_ptr[2 * sizeof (u_long)], data_len,
- XDR_ENCODE);
- if (!xdr_arg (&xdrs, arg))
- {
- xdr_destroy (&xdrs);
- free (data_ptr);
- return 0;
- }
- xdr_destroy (&xdrs);
-
- memcpy (data_ptr, &proc, sizeof (u_long));
- memcpy (&data_ptr[sizeof (proc)], &data_len, sizeof (u_long));
-
- args.data_ptr = data_ptr;
- args.data_size = data_len + 2 * sizeof (u_long);
- args.desc_ptr = NULL;
- args.desc_num = 0;
- args.rbuf = res;
- args.rsize = sizeof (res);
-
- ret = __door_call (fd, &args);
- free (data_ptr);
- close (fd);
-
- if (ret < 0)
- return 0;
-
- memcpy (&data_len, args.data_ptr, sizeof (u_long));
- if (data_len != 0)
- return 0;
-
- memcpy (&data_len, &args.data_ptr[sizeof (u_long)], sizeof (u_long));
- INTUSE(xdrmem_create) (&xdrs, &args.data_ptr[2 * sizeof (u_long)],
- data_len, XDR_DECODE);
- if (!xdr_rslt (&xdrs, rslt))
- {
- xdr_destroy (&xdrs);
- return 0;
- }
- xdr_destroy (&xdrs);
-
- return 1;
-}
-#endif
/* returns 0 on failure, 1 on success */
static int
@@ -580,9 +509,6 @@ key_call (u_long proc, xdrproc_t xdr_arg, char *arg,
#ifndef SO_PASSCRED
static int use_keyenvoy;
#endif
-#ifdef HAVE_DOORS
- static int not_use_doors;
-#endif
if (proc == KEY_ENCRYPT_PK && __key_encryptsession_pk_LOCAL)
{
@@ -606,15 +532,6 @@ key_call (u_long proc, xdrproc_t xdr_arg, char *arg,
return 1;
}
-#ifdef HAVE_DOORS
- if (!not_use_doors)
- {
- if (key_call_door (proc, xdr_arg, arg, xdr_rslt, rslt))
- return 1;
- not_use_doors = 1;
- }
-#endif
-
#ifdef SO_PASSCRED
return key_call_socket (proc, xdr_arg, arg, xdr_rslt, rslt);
#else