summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2014-01-23 08:32:44 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:48:28 +0000
commit13de86c54e2c02e548bd8805ea7df17ddad4e531 (patch)
treee5244b66cd372fc4fa49f473b1a3c4a37e65e35d /meta
parent2a59d55f712bbd79b1edf3ccb90ccabf609c9f0d (diff)
downloadopenembedded-core-13de86c54e2c02e548bd8805ea7df17ddad4e531.tar.gz
openembedded-core-13de86c54e2c02e548bd8805ea7df17ddad4e531.tar.bz2
openembedded-core-13de86c54e2c02e548bd8805ea7df17ddad4e531.zip
unfs-server: Remove unfs-server recipe and patches
The unfs-server only supports NFS v2 and it is not useful any longer with the advent of 64 bit inodes and the fact that the server has only a 32 bit key for the NFS hash which is hardcoded back to the inode. This recipe is replaced with a user mode NFS server using v3. [YOCTO #5639] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/001-2.2b47-2.2b51.patch2349
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/002-destdir.patch73
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/003-manpages.patch33
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/004-strsignal.patch53
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/005-sys-time.patch34
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/006-reiserfs.patch1277
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/007-map.patch83
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/008-configure.patch18
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/009-multirw.patch20
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/010-realpath.patch35
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/011-fno-strict-aliasing.patch18
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/012-nostrip.patch18
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/013-mntpathlen.patch37
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/014-uninitialized.patch17
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/015-setattr.patch31
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/016-makefile.in.patch19
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/017-wrs-dynamic-rpc.patch263
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/018-remove-tcp-wrappers.patch25
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/019-pid-before-fork.patch130
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/020-undefined-chmod-fix.patch23
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/021-nolibwrap.patch25
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/022-add-close-on-exec-descriptors.patch66
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/023-no-rpc-register.patch34
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb78
24 files changed, 0 insertions, 4759 deletions
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/001-2.2b47-2.2b51.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/001-2.2b47-2.2b51.patch
deleted file mode 100644
index b2cdc5e2bc..0000000000
--- a/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/001-2.2b47-2.2b51.patch
+++ /dev/null
@@ -1,2349 +0,0 @@
-Upstream-Status: Inappropriate [other]
-Upstream is not making further releases of this software.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-# Patch origin: nfs-server source RPM from openSUSE 10.3
-
-diff -urN nfs-server-2.2beta47/.version nfs-server-2.2beta51/.version
---- nfs-server-2.2beta47/.version Tue Sep 7 09:47:27 1999
-+++ nfs-server-2.2beta51/.version Fri Nov 8 14:45:36 2002
-@@ -1 +1 @@
--2.2beta46
-+2.2beta51
-diff -urN nfs-server-2.2beta47/ChangeLog nfs-server-2.2beta51/ChangeLog
---- nfs-server-2.2beta47/ChangeLog Wed Nov 10 10:17:51 1999
-+++ nfs-server-2.2beta51/ChangeLog Fri Nov 8 14:45:36 2002
-@@ -1,8 +1,59 @@
-+Thu Nov 9 17:03:05 2000
-+
-+ * No longer use OPEN_MAX
-+
-+ * Reworked configure.in, BUILD script no longer needed
-+ (nor functioning)
-+
-+ * Be more anal about matching cached fh's and real files.
-+ In addition to the psi, we also store dev/ino/type now
-+ and match that in fh_find.
-+
-+ * Write pidfiles
-+
-+ * Support nosetuid
-+
-+Wed Feb 9 14:52:34 2000
-+
-+ * auth_init.c didn't properly parse options--rot_squash
-+ which is obviously a typo was parsed as ro.
-+ Thanks to Jan Steffan for complaining about this :-)
-+
-+Mon Jan 31 11:48:34 2000
-+
-+ * Fixed Y2K bug in logging.c.
-+ Thanks to Jonathan Hankins <jhankins@homewood.k12.al.us>.
-+
-+Thu Dec 9 11:14:21 1999
-+
-+ * Fix handling of NFS-mounted and /proc directories.
-+ They weren't properly hidden.
-+ Thanks to Dick Streefland <dick_streefland@tasking.com>
-+ for the report and a first patch.
-+
- Wed Nov 10 10:17:16 1999
-
- * Security fix for buffer overflow in fh_buildpath
- No thanks to Mariusz who reported it to bugtraq
- rather than me.
-+
-+Wed Nov 09 17:10:00 1999
-+
-+ * Workaround for broken Solaris clients that can't handle
-+ atime/mtime/ctime of 0.
-+ Thanks to Frank Wuebbelin for his problem report and
-+ testing the fix.
-+
-+ * Fixed typo in exports.man
-+
-+Tue Nov 2 10:31:14 1999
-+
-+ * Patch for mode 0100 and 0100 executables by
-+ Michael Deutschmann <michael@talamasca.wkpowerlink.com>
-+
-+ * Common startup stuff for all daemons.
-+ Inspired by code sent to me by someone (sorry, I forgot
-+ your name, and the mail's gone!)
-
- Wed Sep 8 09:07:38 1999
-
-diff -urN nfs-server-2.2beta47/Makefile.in nfs-server-2.2beta51/Makefile.in
---- nfs-server-2.2beta47/Makefile.in Tue Jun 22 14:53:10 1999
-+++ nfs-server-2.2beta51/Makefile.in Fri Nov 8 14:45:36 2002
-@@ -17,23 +17,30 @@
-
- #### Start of system configuration section. ####
-
--srcdir = @srcdir@
--VPATH = @srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-
--CC = @CC@
--AR = ar
--RANLIB = @RANLIB@
--
--INSTALL = @INSTALL@
--INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
--INSTALL_DATA = @INSTALL_DATA@
--MAKEINFO = makeinfo
--TEXI2DVI = texi2dvi
--RPCGEN = @RPCGEN@ @RPCGEN_C@
-+CC = @CC@
-+AR = ar
-+RANLIB = @RANLIB@
-+
-+INSTALL = @INSTALL@
-+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
-+INSTALL_DATA = @INSTALL_DATA@
-+MAKEINFO = makeinfo
-+TEXI2DVI = texi2dvi
-+RPCGEN = @RPCGEN@ @RPCGEN_C@
-
- # General compile options and libs:
--DEFS = @DEFS@ $(NFSD_DEFS)
--LIBS = libnfs.a @LIBS@
-+DEFS = @DEFS@ $(NFSD_DEFS)
-+LIBS = libnfs.a @LIBS@
-+
-+# Ugidd support
-+UGIDD_PROG = @UGIDD_PROG@
-+UGIDD_MAN = @UGIDD_MAN@
-+
-+# New inode mapping scheme
-+DEVTAB_FILE = $(install_prefix)@PATH_DEVTAB@
-
- # Compile options for nfsd:
- # CALL_PROFILING
-@@ -80,9 +87,6 @@
-
- #### End of system configuration section. ####
-
--# include site-specific defintions generated by BUILD.
--include site.mk
--
- SHELL = /bin/sh
-
- SRCS = version.c logging.c fh.c devtab.c \
-@@ -96,19 +100,19 @@
- utimes.c mkdir.c rename.c getopt.c getopt_long.c \
- alloca.c mountlist.c xmalloc.c \
- xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
-- haccess.c failsafe.c signals.c
-+ haccess.c daemon.c signals.c
- XDRFILES = mount.x nfs_prot.x
- GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
- ugid.h ugid_xdr.c ugid_clnt.c
- HDRS = system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \
- rpcmisc.h faccess.h rquotad.h rquota.h haccess.h
--LIBHDRS = fsusage.h getopt.h mountlist.h failsafe.h signals.h
-+LIBHDRS = fsusage.h getopt.h mountlist.h daemon.h signals.h
- MANPAGES5 = exports
- MANPAGES8p = mountd nfsd $(UGIDD_MAN)
- MANPAGES8 = showmount
- MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8)
- LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \
-- nfsmounted.o faccess.o haccess.o failsafe.o \
-+ nfsmounted.o faccess.o haccess.o daemon.o \
- signals.o @LIBOBJS@ @ALLOCA@
- OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o
- NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
-@@ -174,15 +178,13 @@
- ${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)
-
- $(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
-- $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS) \
-- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
-+ $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS)
-
- $(rpcprefix)nfsd: $(NFSD_OBJS) libnfs.a
- $(CC) $(LDFLAGS) -o $@ $(NFSD_OBJS) $(LIBS)
-
- $(rpcprefix)ugidd: $(UGIDD_OBJS) libnfs.a
-- $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS) \
-- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
-+ $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS)
-
- showmount: $(SHOWMOUNT_OBJS) libnfs.a
- $(CC) $(LDFLAGS) -o $@ $(SHOWMOUNT_OBJS) $(LIBS)
-diff -urN nfs-server-2.2beta47/aclocal.m4 nfs-server-2.2beta51/aclocal.m4
---- nfs-server-2.2beta47/aclocal.m4 Fri Jun 11 12:04:22 1999
-+++ nfs-server-2.2beta51/aclocal.m4 Fri Nov 8 14:45:36 2002
-@@ -221,20 +221,14 @@
- ])dnl
- dnl *********** libwrap bug **************
- define(AC_LIBWRAP_BUG,
-- [if test -f site.mk; then
-- . ./site.mk
-- fi
-- if test ! -z "$LIBWRAP_DIR"; then
-+ [if test "$ac_cv_lib_wrap_main" = yes; then
- AC_MSG_CHECKING(for link problem with libwrap.a)
- AC_CACHE_VAL(nfsd_cv_lib_wrap_bug,
-- [ac_save_LIBS=$LIBS
-- LIBS="$LIBS $LIBWRAP_DIR $LIBWRAP_LIB"
-- AC_TRY_LINK([
-+ [AC_TRY_LINK([
- extern int deny_severity;
- ],[
- deny_severity=1;
- ], nfsd_cv_lib_wrap_bug=no, nfsd_cv_lib_wrap_bug=yes)
-- LIBS=$ac_save_LIBS
- ]) dnl
- AC_MSG_RESULT($nfsd_cv_lib_wrap_bug)
- test $nfsd_cv_lib_wrap_bug = yes && AC_DEFINE(HAVE_LIBWRAP_BUG)
-diff -urN nfs-server-2.2beta47/auth.c nfs-server-2.2beta51/auth.c
---- nfs-server-2.2beta47/auth.c Mon Sep 13 16:56:03 1999
-+++ nfs-server-2.2beta51/auth.c Fri Nov 8 14:45:36 2002
-@@ -84,8 +84,9 @@
- 0, /* relative links */
- 0, /* noaccess */
- 1, /* cross_mounts */
-- (uid_t)-2, /* default uid */
-- (gid_t)-2, /* default gid */
-+ 1, /* allow setuid */
-+ 65534, /* default uid */
-+ 65534, /* default gid */
- 0, /* no NIS domain */
- };
-
-@@ -99,8 +100,9 @@
- 0, /* relative links */
- 0, /* noaccess */
- 1, /* cross_mounts */
-- (uid_t)-2, /* default uid */
-- (gid_t)-2, /* default gid */
-+ 0, /* allow setuid */
-+ 65534, /* default uid */
-+ 65534, /* default gid */
- 0, /* no NIS domain */
- };
-
-@@ -673,6 +675,7 @@
- cpp = &unknown_clients;
- } else {
- cpp = &known_clients;
-+ cp->clnt_addr = *(struct in_addr *) hp->h_addr;
- auth_hash_host(cp, hp);
- }
- cp->next = *cpp;
-diff -urN nfs-server-2.2beta47/auth.h nfs-server-2.2beta51/auth.h
---- nfs-server-2.2beta47/auth.h Thu Apr 8 14:47:56 1999
-+++ nfs-server-2.2beta51/auth.h Fri Nov 8 14:45:36 2002
-@@ -23,14 +23,6 @@
- extern char * public_root_path;
- extern struct nfs_fh public_root;
-
--#if defined(linux) && defined(i386) && !defined(HAVE_SETFSUID)
--# define MAYBE_HAVE_SETFSUID
--#endif
--
--#ifdef MAYBE_HAVE_SETFSUID
--extern int have_setfsuid;
--#endif
--
- /*
- * These externs are set in the dispatcher (dispatch.c) and auth_fh
- * (nfsd.c) so that we can determine access rights, export options,
-@@ -59,6 +51,7 @@
- int link_relative;
- int noaccess;
- int cross_mounts;
-+ int allow_setuid;
- uid_t nobody_uid;
- gid_t nobody_gid;
- char * clnt_nisdomain;
-@@ -112,7 +105,7 @@
- extern void auth_free_lists(void);
- extern nfs_client *auth_clnt(struct svc_req *rqstp);
- extern nfs_mount *auth_path(nfs_client *, struct svc_req *, char *);
--extern void auth_user(nfs_mount *, struct svc_req *);
-+extern int auth_user(nfs_mount *, struct svc_req *);
-
- extern nfs_client *auth_get_client(char *);
- extern nfs_mount *auth_match_mount(nfs_client *, char *);
-diff -urN nfs-server-2.2beta47/auth_clnt.c nfs-server-2.2beta51/auth_clnt.c
---- nfs-server-2.2beta47/auth_clnt.c Wed Nov 10 10:18:06 1999
-+++ nfs-server-2.2beta51/auth_clnt.c Fri Nov 8 14:45:36 2002
-@@ -12,20 +12,17 @@
- */
-
-
-+#include <sys/fsuid.h>
- #include "system.h"
- #include "nfsd.h"
--#include "fakefsuid.h"
--
--#ifndef svc_getcaller
--#define svc_getcaller(x) ((struct sockaddr_in *) &(x)->xp_rtaddr.buf)
--#endif
-+#include "rpcmisc.h"
-
-
--#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
--static void setfsids(uid_t, gid_t, gid_t *, int);
-+#if defined(HAVE_SETFSUID)
-+static int setfsids(uid_t, gid_t, gid_t *, int);
- #endif
- #ifndef HAVE_SETFSUID
--static void seteids(uid_t, gid_t, gid_t *, int);
-+static int seteids(uid_t, gid_t, gid_t *, int);
- #endif
-
- uid_t auth_uid = 0; /* Current effective user ids */
-@@ -43,6 +40,17 @@
- short *gid, short *nrgids, int *groups);
- #endif
-
-+/*
-+ * The following crap is required for glibc 2.1 which has 32bit uids
-+ * in user land mapped to 16bit uids in the Linux kernel
-+ */
-+#if defined(HAVE_BROKEN_SETFSUID)
-+# define native_uid(u) ((unsigned short)(u))
-+# define native_gid(g) ((unsigned short)(g))
-+#else
-+# define native_uid(u) (u)
-+# define native_gid(g) (g)
-+#endif
-
- /*
- * For an RPC request, look up the NFS client info along with the
-@@ -92,8 +100,9 @@
- }
-
- if (logging_enabled(D_AUTH)) {
-- Dprintf(D_AUTH, "auth_path(%s): mount point %s, (%s%s%s%s%s)\n",
-- path, mp->path,
-+ Dprintf(D_AUTH, "auth_path(%s, %s): "
-+ "mount point %s, (%s%s%s%s%s)\n",
-+ inet_ntoa(cp->clnt_addr), path, mp->path,
- mp->o.all_squash? "all_squash " : (
- mp->o.root_squash? "root_squash " : ""),
- (mp->o.uidmap == map_daemon)? "uidmap " : "",
-@@ -105,7 +114,8 @@
- return mp;
- }
-
--void auth_user(nfs_mount *mp, struct svc_req *rqstp)
-+int
-+auth_user(nfs_mount *mp, struct svc_req *rqstp)
- {
- uid_t cuid;
- gid_t cgid;
-@@ -160,23 +170,18 @@
- else if (cred_len > NGRPS)
- cred_len = NGRPS;
-
-- cuid = luid(cred_uid, mp, rqstp);
-- cgid = lgid(cred_gid, mp, rqstp);
-+ cuid = luid(native_uid(cred_uid), mp, rqstp);
-+ cgid = lgid(native_gid(cred_gid), mp, rqstp);
- clen = cred_len;
- for (i = 0; i < cred_len; i++)
-- cgids[i] = lgid(cred_gids[i], mp, rqstp);
-+ cgids[i] = lgid(native_gid(cred_gids[i]), mp, rqstp);
- } else {
- /* On systems that have 32bit uid_t in user space but
- * 16bit in the kernel, we need to truncate the
- * nobody ID (default -2).
- */
--#if !defined(HAVE_BROKEN_SETFSUID)
-- cuid = mp->o.nobody_uid;
-- cgid = mp->o.nobody_gid;
--#else
-- cuid = (unsigned short) mp->o.nobody_uid;
-- cgid = (unsigned short) mp->o.nobody_gid;
--#endif
-+ cuid = native_uid(mp->o.nobody_uid);
-+ cgid = native_gid(mp->o.nobody_gid);
- /* Construct a list of one gid. */
- cgids[0] = cgid;
- clen = 1;
-@@ -193,14 +198,9 @@
- * upper 16 bits set (including our default nobody uid -2).
- */
- #if defined(HAVE_SETFSUID)
-- setfsids(cuid, cgid, cgids, clen);
-+ return setfsids(cuid, cgid, cgids, clen);
- #else
--#if defined(MAYBE_HAVE_SETFSUID)
-- if (have_setfsuid)
-- setfsids(cuid, cgid, cgids, clen);
-- else
--#endif
-- seteids(cuid, cgid, cgids, clen);
-+ return seteids(cuid, cgid, cgids, clen);
- #endif
- }
-
-@@ -210,6 +210,8 @@
- void
- auth_override_uid(uid_t uid)
- {
-+ int res;
-+
- /* extension hooks: */
- efs_setfsuid(uid);
-
-@@ -217,19 +219,18 @@
- uid = (unsigned short) uid;
- #endif
- #if defined(HAVE_SETFSUID)
-- setfsuid(uid);
-+ res = setfsuid(uid);
- #else
--#if defined(MAYBE_HAVE_SETFSUID)
-- if (have_setfsuid)
-- setfsuid(uid);
-- else
--#endif
-- seteuid(uid);
-+ res = seteuid(uid);
- #endif
-+ /* should never happen */
-+ if (res < 0)
-+ Dprintf(L_FATAL, "auth_override_uid(%d) failed: %s",
-+ uid, strerror(errno));
- }
-
--#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
--static void
-+#if defined(HAVE_SETFSUID)
-+static int
- setfsids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
- {
- /* extension hooks: */
-@@ -238,43 +239,47 @@
-
- /* First, set the user ID. */
- if (auth_uid != cred_uid) {
-- if (setfsuid(cred_uid) < 0)
-+ if (setfsuid(cred_uid) < 0) {
- Dprintf(L_ERROR, "Unable to setfsuid %d: %s\n",
- cred_uid, strerror(errno));
-- else
-- auth_uid = cred_uid;
-+ return 0;
-+ }
-+ auth_uid = cred_uid;
- }
-
- /* Next, the group ID. */
- if (auth_gid != cred_gid) {
-- if (setfsgid(cred_gid) < 0)
-+ if (setfsgid(cred_gid) < 0) {
- Dprintf(L_ERROR, "Unable to setfsgid %d: %s\n",
- cred_gid, strerror(errno));
-- else
-- auth_gid = cred_gid;
-+ return 0;
-+ }
-+ auth_gid = cred_gid;
- }
-
- #ifdef HAVE_SETGROUPS
- /* Finally, set the supplementary group IDs if possible. */
-- if (cred_len < 0 || cred_len > NGRPS)
-+ if (cred_len < 0 || cred_len > NGRPS) {
- Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
-- else if (cred_len != auth_gidlen
-- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
-- if (setgroups(cred_len, cred_gids) < 0)
-+ return 0;
-+ }
-+ if (cred_len != auth_gidlen
-+ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
-+ if (setgroups(cred_len, cred_gids) < 0) {
- Dprintf(L_ERROR, "Unable to setgroups: %s\n",
- strerror(errno));
-- else {
-- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
-- auth_gidlen = cred_len;
-+ return 0;
- }
-+ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
-+ auth_gidlen = cred_len;
- }
- #endif /* HAVE_SETGROUPS */
--
-+ return 1;
- }
- #endif
-
- #if !defined(HAVE_SETFSUID)
--static void
-+static int
- seteids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
- {
- /* extension hooks: */
-@@ -286,52 +291,62 @@
- /* First set the group ID. */
- if (auth_gid != cred_gid) {
- if (auth_uid != ROOT_UID) {
-- if (seteuid(ROOT_UID) < 0)
-+ if (seteuid(ROOT_UID) < 0) {
- Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
- ROOT_UID, strerror(errno));
-- else
-- auth_uid = ROOT_UID;
-+ return 0;
-+ }
-+ auth_uid = ROOT_UID;
- }
-- if (setegid(cred_gid) < 0)
-+ if (setegid(cred_gid) < 0) {
- Dprintf(L_ERROR, "Unable to setegid(%d): %s\n",
- cred_gid, strerror(errno));
-- else
-- auth_gid = cred_gid;
-+ return 0;
-+ }
-+ auth_gid = cred_gid;
- }
-
- #ifdef HAVE_SETGROUPS
- /* Next set the supplementary group IDs if possible. */
-- if (cred_len < 0 || cred_len > NGRPS)
-+ if (cred_len < 0 || cred_len > NGRPS) {
- Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
-- else if (cred_len != auth_gidlen
-- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
-+ return 0;
-+ }
-+ if (cred_len != auth_gidlen
-+ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
- if (auth_uid != ROOT_UID) {
-- if (seteuid(ROOT_UID) < 0)
-+ if (seteuid(ROOT_UID) < 0) {
- Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
- ROOT_UID, strerror(errno));
-- else
-- auth_uid = ROOT_UID;
-+ return 0;
-+ }
-+ auth_uid = ROOT_UID;
- }
-- if (setgroups(cred_len, cred_gids) < 0)
-+ if (setgroups(cred_len, cred_gids) < 0) {
- Dprintf(L_ERROR, "Unable to setgroups: %s\n",
- strerror(errno));
-- else {
-- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
-- auth_gidlen = cred_len;
-+ return 0;
- }
-+ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
-+ auth_gidlen = cred_len;
- }
- #endif /* HAVE_SETGROUPS */
-
- /* Finally, set the user ID. */
- if (auth_uid != cred_uid) {
-- if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0)
-+ if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0) {
- Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
- ROOT_UID, strerror(errno));
-- if (seteuid(cred_uid) < 0)
-+ return 0;
-+ }
-+ if (seteuid(cred_uid) < 0) {
- Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
- cred_uid, strerror(errno));
-- else
-- auth_uid = cred_uid;
-+ return 0;
-+ }
-+ auth_uid = cred_uid;
- }
-+
-+ return 1;
- }
- #endif
-diff -urN nfs-server-2.2beta47/auth_init.c nfs-server-2.2beta51/auth_init.c
---- nfs-server-2.2beta47/auth_init.c Mon Apr 19 14:01:21 1999
-+++ nfs-server-2.2beta51/auth_init.c Fri Nov 8 14:45:36 2002
-@@ -13,7 +13,6 @@
- */
-
- #include "nfsd.h"
--#include "fakefsuid.h"
- #include <pwd.h>
-
- #define LINE_SIZE 1024
-@@ -263,55 +262,63 @@
- cp++;
- while (*cp != terminator) {
- kwd = cp;
-- while (isalpha(*cp) || *cp == '_' || *cp == '=') {
-- /* break out of loop after = sign */
-- if (*cp++ == '=')
-- break;
-- }
-+ /* Gobble up keyword and "=" if there is one */
-+ while (isalpha(*cp) || *cp == '_')
-+ ++cp;
-+ if (*cp == '=')
-+ ++cp;
-+
- klen = cp - kwd;
-
- /* process keyword */
-- if (strncmp(kwd, "secure", 6) == 0)
-+#define ifkwd(n, string) \
-+ if (klen == (n) && !strncmp(kwd, string, (n)))
-+
-+ ifkwd(2, "ro")
-+ mp->o.read_only = 1;
-+ else ifkwd(2, "rw")
-+ mp->o.read_only = 0;
-+ else ifkwd(6, "secure")
- mp->o.secure_port = 1;
-- else if (strncmp(kwd, "insecure", 8) == 0)
-+ else ifkwd(8, "insecure")
- mp->o.secure_port = 0;
-- else if (strncmp(kwd, "root_squash", 11) == 0)
-+ else ifkwd(11, "root_squash")
- mp->o.root_squash = 1;
-- else if (strncmp(kwd, "no_root_squash", 14) == 0)
-+ else ifkwd(14, "no_root_squash")
- mp->o.root_squash = 0;
-- else if (strncmp(kwd, "ro", 2) == 0)
-- mp->o.read_only = 1;
-- else if (strncmp(kwd, "rw", 2) == 0)
-- mp->o.read_only = 0;
-- else if (strncmp(kwd, "link_relative", 13) == 0)
-+ else ifkwd(13, "link_relative")
- mp->o.link_relative = 1;
-- else if (strncmp(kwd, "link_absolute", 13) == 0)
-+ else ifkwd(13, "link_absolute")
- mp->o.link_relative = 0;
-- else if (strncmp(kwd, "map_daemon", 10) == 0)
-+ else ifkwd(10, "map_daemon")
- mp->o.uidmap = map_daemon;
-- else if (strncmp(kwd, "map_nis=", 8) == 0)
-+ else ifkwd(8, "map_nis=")
- parse_nis_uidmap(mp, &cp);
-- else if (strncmp(kwd, "map_static=", 11) == 0)
-+ else ifkwd(11, "map_static=")
- parse_static_uidmap(mp, &cp);
-- else if (strncmp(kwd, "map_identity", 12) == 0)
-+ else ifkwd(12, "map_identity")
- mp->o.uidmap = identity;
-- else if (strncmp(kwd, "all_squash", 10) == 0)
-+ else ifkwd(10, "all_squash")
- mp->o.all_squash = 1;
-- else if (strncmp(kwd, "no_all_squash", 13) == 0)
-+ else ifkwd(13, "no_all_squash")
- mp->o.all_squash = 0;
-- else if (strncmp(kwd, "noaccess", 8) == 0)
-+ else ifkwd(8, "noaccess")
- mp->o.noaccess = 1;
-- else if (strncmp(kwd, "squash_uids=", 12) == 0)
-+ else ifkwd(12, "squash_uids=")
- parse_squash(mp, 1, &cp);
-- else if (strncmp(kwd, "squash_gids=", 12) == 0)
-+ else ifkwd(12, "squash_gids=")
- parse_squash(mp, 0, &cp);
-- else if (strncmp(kwd, "anonuid=", 8) == 0)
-+ else ifkwd(8, "anonuid=")
- mp->o.nobody_uid = parse_num(&cp);
-- else if (strncmp(kwd, "anongid=", 8) == 0)
-+ else ifkwd(8, "anongid=")
- mp->o.nobody_gid = parse_num(&cp);
-- else if (strncmp(kwd, "async", 5) == 0)
-+ else ifkwd(6, "setuid")
-+ mp->o.allow_setuid = 1;
-+ else ifkwd(8, "nosetuid")
-+ mp->o.allow_setuid = 0;
-+ else ifkwd(5, "async")
- /* knfsd compatibility, ignore */;
-- else if (strncmp(kwd, "sync", 4) == 0)
-+ else ifkwd(4, "sync")
- /* knfsd compatibility, ignore */;
- else {
- Dprintf(L_ERROR,
-@@ -566,11 +573,6 @@
- auth_check_all_wildcards();
- auth_sort_all_mountlists();
- auth_log_all();
--
--#if defined(MAYBE_HAVE_SETFSUID) && !defined(HAVE_SETFSUID)
-- /* check if the a.out setfsuid syscall works on this machine */
-- have_setfsuid = (setfsuid(0) >= 0);
--#endif
-
- auth_initialized = 1;
- }
-diff -urN nfs-server-2.2beta47/config.h.in nfs-server-2.2beta51/config.h.in
---- nfs-server-2.2beta47/config.h.in Fri Jun 11 12:01:22 1999
-+++ nfs-server-2.2beta51/config.h.in Fri Nov 8 14:45:36 2002
-@@ -3,7 +3,7 @@
- /* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
--#ifndef _ALL_SOURCE
-+#ifdef _ALL_SOURCE
- #undef _ALL_SOURCE
- #endif
-
-diff -urN nfs-server-2.2beta47/configure.in nfs-server-2.2beta51/configure.in
---- nfs-server-2.2beta47/configure.in Fri Jun 11 11:58:10 1999
-+++ nfs-server-2.2beta51/configure.in Fri Nov 8 14:45:36 2002
-@@ -2,7 +2,36 @@
- dnl Updated for autoconf 2.
- dnl
- AC_INIT(nfsd.c)
--AC_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADER(config.h site.h)
-+
-+dnl **************************************************************
-+dnl * handle --enable options
-+dnl **************************************************************
-+AC_ARG_ENABLE(new-inodes,
-+ [ --enable-new-inodes Enable new-style inode inodes])
-+AC_ARG_WITH(devtab,
-+ [ --with-devtab=file Specify location for devtab [/var/lib/nfs/devtab]],
-+ PATH_DEVTAB=$withval,
-+ PATH_DEVTAB=/var/lib/nfs/devtab)
-+AC_ARG_ENABLE(ugid-dynamic,
-+ [ --enable-ugid-dynamic Enable uid mapping using rpc.ugidd (not recommended)])
-+AC_ARG_ENABLE(ugid-nis,
-+ [ --enable-ugid-nis Enable NIS-based uid mapping])
-+AC_ARG_ENABLE(host-access,
-+ [ --enable-host-access Enable host access checking])
-+AC_ARG_ENABLE(mount-logging,
-+ [ --disable-mount-logging Do not log mount operations to syslog],,
-+ enable_mount_logging=yes)
-+AC_ARG_WITH(exports-uid,
-+ [ --with-exports-uid=N Make sure that /etc/exports is owned by uid N],,
-+ with_exports_uid=0)
-+AC_ARG_WITH(exports-gid,
-+ [ --with-exports-gid=N Make sure that /etc/exports is owned by gid N],,
-+ with_exports_gid=0)
-+
-+dnl **************************************************************
-+dnl * Check for all kinds of stuff
-+dnl **************************************************************
- AC_PROG_CC
- # If we're using gcc, we want warning flags
- test -n "$GCC" &&
-@@ -19,7 +48,7 @@
- AC_MINIX
- AC_ISC_POSIX
- AC_PROG_INSTALL
--AC_CROSS_CHECK
-+dnl AC_CROSS_CHECK
- AC_STDC_HEADERS
- AC_GNULIBC
- AC_CONST
-@@ -52,14 +81,45 @@
- AC_CHECK_LIB(rpc, main)
- AC_CHECK_LIB(crypt, main)
- AC_CHECK_LIB(nys, main)
--AC_REPLACE_FUNCS(strerror realpath mkdir rename utimes strdup strstr getopt getopt_long)
- AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred)
- AC_AUTHDES_GETUCRED
- AC_BROKEN_SETFSUID
- AC_MOUNTLIST
- AC_FSUSAGE
-+AC_CHECK_LIB(wrap, main)
- AC_LIBWRAP_BUG
- AC_BSD_SIGNALS
-+
-+dnl **************************************************************
-+dnl * Munge user specified options
-+dnl **************************************************************
-+if test "$enable_new_inodes" = yes; then
-+ AC_DEFINE(ENABLE_DEVTAB)
-+fi
-+if test "$enable_ugid_dynamic" = yes; then
-+ AC_DEFINE(ENABLE_UGID_DAEMON)
-+ UGIDD_PROG=\${rpcprefix}.ugidd
-+ UGIDD_MAN=ugidd
-+fi
-+if test "$enable_ugid_nis" = yes; then
-+ AC_DEFINE(ENABLE_UGID_NIS)
-+fi
-+if test "$enable_host_access" = yes; then
-+ AC_DEFINE(HOSTS_ACCESS)
-+fi
-+if test "$enable_mount_logging" = yes; then
-+ AC_DEFINE(WANT_LOG_MOUNTS)
-+fi
-+AC_DEFINE_UNQUOTED(EXPORTSOWNERUID, $with_exports_uid)
-+AC_DEFINE_UNQUOTED(EXPORTSOWNERGID, $with_exports_gid)
-+AC_SUBST(PATH_DEVTAB)
-+AC_SUBST(UGIDD_PROG)
-+AC_SUBST(UGIDD_MAN)
-+
-+dnl **************************************************************
-+dnl * Output CFLAGS and LDFLAGS
-+dnl **************************************************************
- AC_SUBST(LDFLAGS)
- AC_SUBST(CFLAGS)
-+
- AC_OUTPUT(Makefile)
-diff -urN nfs-server-2.2beta47/daemon.c nfs-server-2.2beta51/daemon.c
---- nfs-server-2.2beta47/daemon.c Thu Jan 1 01:00:00 1970
-+++ nfs-server-2.2beta51/daemon.c Fri Nov 8 14:45:52 2002
-@@ -0,0 +1,270 @@
-+/*
-+ * daemon.c
-+ *
-+ * Copyright (C) 1998, <okir@monad.swb.de>
-+ *
-+ * Implements common daemon stuff and
-+ * fail-safe mode for nfsd/mountd.
-+ */
-+
-+#include "system.h"
-+#include "logging.h"
-+#include "signals.h"
-+#include <sys/wait.h>
-+
-+static const char * pidfilename = 0;
-+static const char * get_signame(int signo);
-+
-+/*
-+ * Do the Crawley Thing
-+ */
-+void
-+daemonize(void)
-+{
-+ int c;
-+
-+ /* Ignore SIGHUP so the parent can exit while we're still
-+ * in limbo */
-+ ignore_signal(SIGHUP);
-+
-+ /* Now fork */
-+ c = fork();
-+ if (c < 0)
-+ Dprintf(L_FATAL, "unable to fork: %s", strerror(errno));
-+
-+ /* Parent process: exit */
-+ if (c > 0)
-+ exit(0);
-+
-+ /* Do the session stuff */
-+ close(0);
-+ close(1);
-+ close(2);
-+#ifdef HAVE_SETSID
-+ setsid();
-+#else
-+ if ((c = open("/dev/tty", O_RDWR)) >= 0) {
-+ ioctl(c, TIOCNOTTY, (char *) NULL);
-+ close(c);
-+ }
-+#endif
-+
-+ /* Stop stderr logging */
-+ background_logging();
-+}
-+
-+void<