diff options
author | Neil Brown <neilb@suse.de> | 2006-07-05 10:41:03 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-07-05 10:41:03 +1000 |
commit | 9f5b40b7a68fe0a2648565ecbd4b08bf60287130 (patch) | |
tree | afc9c851a90f7b9ab5d77bbb1f9e94deb4649574 /support/export/keys.c | |
parent | fbb1602bbd34cbe89dd55ca6eaaa19432237db1d (diff) | |
download | nfs-utils-9f5b40b7a68fe0a2648565ecbd4b08bf60287130.tar.gz nfs-utils-9f5b40b7a68fe0a2648565ecbd4b08bf60287130.tar.xz nfs-utils-9f5b40b7a68fe0a2648565ecbd4b08bf60287130.zip |
Remove some files that old, unused, unneeded.
deleted: support/export/keys.c
deleted: support/include/rpcdispatch.h
deleted: support/include/rpcsec.h
deleted: support/include/version.h
deleted: support/include/ypupdate.h
deleted: support/nfs/clients.c
deleted: support/nfs/keytab.c
deleted: support/nfs/ypupdate_xdr.c
deleted: support/rpc/include/Makefile.am
deleted: tools/rpcdebug/neat_idea.c
deleted: utils/mountd/mount_xdr.c
deleted: utils/rquotad/pathnames.h
Diffstat (limited to 'support/export/keys.c')
-rw-r--r-- | support/export/keys.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/support/export/keys.c b/support/export/keys.c deleted file mode 100644 index 4814808..0000000 --- a/support/export/keys.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * keys.c Key management for nfsd. Currently, keys - * are kept in a single file only, but eventually, - * support for a key server should be added. - * - * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> - */ - -#include "config.h" - -#include <sys/stat.h> -#include "nfslib.h" -#include "exportfs.h" -#include "xmalloc.h" - -struct keycache { - struct keycache * k_next; - struct nfskeyent k_data; -}; - -static struct keycache * keycache = NULL; -static time_t lastmod = 0; - -static void key_reload(void); - - -struct nfskey * -key_lookup(char *hname) -{ - struct keycache *kc; - - key_reload(); - - for (kc = keycache; kc; kc = kc->k_next) { -#if 0 - if (matchhostname(kc->k_data.k_hostname, hname)) -#else - if (!strcmp(kc->k_data.k_hostname, hname)) -#endif - return &kc->k_data.k_key; - } - - return NULL; -} - -static void -key_reload(void) -{ - struct stat stb; - struct keycache *cp; - struct nfskeyent *kp; - - if (stat(_PATH_NFSKEYS, &stb) >= 0 && stb.st_mtime == lastmod) - return; - - while (keycache) { - cp = keycache->k_next; - xfree(keycache); - keycache = cp; - } - - setnfskeyent(_PATH_NFSKEYS); - while ((kp = getnfskeyent()) != NULL) { - cp = (struct keycache *) xmalloc(sizeof(*cp)); - cp->k_data = *kp; - cp->k_next = keycache; - keycache = cp; - } - endnfskeyent(); - - lastmod = stb.st_mtime; -} |