--- /dev/null
+# files generated by autoconf, automake, autoheader and libtoolize
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.log
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+Makefile.in
+missing
+support/include/config.h.in
+# files generated by configure
+confdefs.h
+config.status
+conftest
+conftest.c
+conftest.cpp
+conftest.er1
+conftest.err
+.deps
+Makefile
+support/include/config.h
+support/include/stamp-h1
+# file generated during compilation
+*.o
+.libs
+lib*.a
+tools/rpcgen/rpcgen
+tools/rpcdebug/rpcdebug
+utils/exportfs/exportfs
+utils/idmapd/idmapd
+utils/lockd/lockd
+utils/mount/mount.nfs
+utils/mountd/mountd
+utils/nfsd/nfsd
+utils/nfsstat/nfsstat
+utils/nhfsstone/nhfsstone
+utils/rquotad/rquotad
+utils/rquotad/rquota.h
+utils/rquotad/rquota_xdr.c
+utils/showmount/showmount
+utils/statd/statd
+tools/locktest/testlk
+tools/getiversion/getiversion
+tools/getkversion/getkversion
+support/export/mount.h
+support/export/mount_clnt.c
+support/export/mount_xdr.c
+support/include/mount.h
+utils/statd/sm_inter.h
+utils/statd/sm_inter_clnt.c
+utils/statd/sm_inter_svc.c
+utils/statd/sm_inter_xdr.c
+# generic editor backup et al
+*~
+commit 7194d7d6320736c14f40d31c3738d40f3119ead5
+Author: Kevin Coffman <kwc@citi.umich.edu>
+Date: Sat Jul 8 10:01:40 2006 +1000
+
+ Use uid/gid of -1 to indicate the export's anonuid/anongid should be used
+
+ Kernel routine nfsd_setuser() in fs/nfsd/auth.c checks for the
+ value -1 and defaults the credential's fsuid/fsgid to the
+ correct anonuid/anongid values for the given export. We should
+ be passing this value (-1) down when a name mapping cannot be found.
+ Thanks to J. Bruce Fields <bfields@fieldses.org> for the reference.
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+ Acked-by: J. Bruce Fields <bfields@fieldses.org>
+
+commit b0604c623f7a98c6061dff19988722d3ae848bd7
+Author: Kevin Coffman <kwc@citi.umich.edu>
+Date: Sat Jul 8 09:58:03 2006 +1000
+
+ Change svcgssd_LDFLAGS to match gssd_LDFLAGS
+
+commit 99414bd3eecf93f23c378d3bb3d45bc98f364abc
+Author: Neil Brown <neilb@suse.de>
+Date: Sat Jul 8 09:41:58 2006 +1000
+
+ Disable building/installing mount.nfs by default.
+
+ mount.nfs does not yet support 'user' option and some others.
+ To make it support this we need to make it setuid-root, and
+ some security isses need to be resolved before that can be done
+ safely.
+
+commit b0c3cbfee702c019dab0a22557bbf38e24dfcee1
+Author: Steve Dickson <steved@redhat.com>
+Date: Sat Jul 8 09:35:02 2006 +1000
+
+ Call nfssvc_versbits before nfssvc_setfds
+
+ nfssvc_versbits() has to be called before nfssvc_setfds()
+ for the version processing to work correctly
+
+commit 26fff911b21943f20e3937ae3f2d29a1572d2309
+Author: Neil Brown <neilb@suse.de>
+Date: Thu Jul 6 13:05:11 2006 +1000
+
+ Only use -rpath for Kerberos libs when actually needed.
+
+ Avoid usage of -rpath is generally safer, and is required by Debian policy.
+
+commit 28a7603b719f8d35bf22fd3018b610b489fec78f
+Author: Neil Brown <neilb@suse.de>
+Date: Thu Jul 6 12:28:33 2006 +1000
+
+ Use 65534 instead of -2 in svcgssd_proc.c
+
+ as this is more consistant across achitectures.
+
+commit 904de920ea4da3ad5604c417f0d784fcda83ed2a
+Author: Shankar Anand <shanand@novell.com>
+Date: Tue Jul 4 08:50:56 2006 -0600
+
+ This patch adds code to nfsstat to read /proc/net/rpc/nfsd for nfsv4 server statistics and print them.
+
+ Submitted by: Shankar Anand <shanand@novell.com>
+
+commit 2179c112b9a386ca3d51d0e19390ddfadd745030
+Author: Steinar H. Gunderson <sesse@debian.org>
+Date: Wed Jul 5 15:55:45 2006 +1000
+
+ Fix typos in various man pages.
+
+commit 3419e37500dfd19cb2c246260dbd2bc0ee4704d4
+Author: Steinar H. Gunderson <sesse@debian.org>
+Date: Wed Jul 5 15:51:30 2006 +1000
+
+ Use 65534 for anon uid/gid rather than -2
+
+ This is more consistant across platforms.
+
+commit 65735eef8a9441901245f6047edafc50f2d97c97
+Author: Greg Banks <gnb@chook.melbourne.sgi.com>
+Date: Wed Jul 5 13:37:21 2006 +1000
+
+ Update rpcdebug to know about new 2.6 debug flags. Added
+ a manpage and installed rpcdebug (in sbindir).
+
+commit 23b3a9d0284d78cb6bf96b8cd44e9a4662ff60ae
+Author: Greg Banks <gnb@chook.melbourne.sgi.com>
+Date: Wed Jul 5 12:22:45 2006 +1000
+
+ Ignore new generated files.
+
+commit 89053f3f440b629911cb994a293d5be73bb79bf9
+Author: Greg Banks <gnb@chook.melbourne.sgi.com>
+Date: Wed Jul 5 12:20:20 2006 +1000
+
+ Add rquota.h to BUILT_SOURCES so rquotad builds on the first try.
+
+commit 66f9d8251c92124e46a209c47e5c0f7d3a0c4e6e
+Author: Neil Brown <neilb@suse.de>
+Date: Wed Jul 5 11:06:09 2006 +1000
+
+ Generate rquota_xdr.c and rquota.h from rquota.x
+
+ rquota_svc.c is still by-hand as it contains alot of extras.
+ These should really be moved to rquota_server.c
+
+commit 9f5b40b7a68fe0a2648565ecbd4b08bf60287130
+Author: Neil Brown <neilb@suse.de>
+Date: Wed Jul 5 10:41:03 2006 +1000
+
+ 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
+
+commit fbb1602bbd34cbe89dd55ca6eaaa19432237db1d
+Author: Neil Brown <neilb@suse.de>
+Date: Wed Jul 5 10:30:51 2006 +1000
+
+ Avoid error creating an existing symlink
+
+ Just remove the link first.
+
+commit 0bc710a5a2b695039613a917e009dba3552ab1cc
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:33:54 2006 -0400
+
+ Don't depend on Kerberos headers when checking librpcsecgss in configure
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Older versions of MIT Kerberos are missing an OID definition, causing
+ the configure checks for librpcsecgss to fail. We shouldn't be depending
+ on their libraries during the configure.
+
+commit 5bfa10c94c44f082dc211a5fb431e2202ea9bb35
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Tue Jul 4 18:33:56 2006 +1000
+
+ Eliminate warnings from code generated by rpcgen
+
+ - unused variable 'buf'
+ - emit a declaration for `buf' on demand.
+ - unused variable 'i'
+ - declare i immediately before use
+ - unused value from IXDR_PUT_
+ - cast to (void)
+ - type-punned pointer reference
+ - cast to (void*) first :-(
+
+commit acae444246635ec2ca8990d53e685c9062d73091
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:43 2006 -0400
+
+ Handle mapping failure from get_ids.
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Temporary patch to do default mapping if we get an error while trying to
+ map a gss principal to the appropriate uid/gid. This currently returns
+ hardcoded values. This may be correct, or we may need to try and figure
+ out the correct values to match the anonuid/anongid for the export.
+
+commit 1f1b05a65ef3dc6597c7bc1e2a38f38ae95bf230
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:38 2006 -0400
+
+ Properly report errors in readline() function
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Change message priorities for errors and debug messages.
+
+commit ee664fd246d77010af13fb557407c612752a5ea8
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:33 2006 -0400
+
+ Change default buffer size increment for readline()
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ The readline routine expects much smaller messages than we are passing.
+ Change the default initial allocation and increment value from 128
+ to 2048. This saves many calls to realloc().
+
+commit 3da69ce5c4fac5677e91aa20e60750ab8de2ab97
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:27 2006 -0400
+
+ Clean up the printerr() logging function.
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Update the printerr() function to:
+
+ 1) Determine whether we'll print the message before going to all the
+ work of formatting it.
+ 2) Don't just toss away messages that are too long for the buffer.
+ Print what we can and give an indication of the truncation with
+ "..." at the end.
+ 3) Use a single buffer rather than two.
+ 4) Messages either go to syslog (with level ERR) or stderr. Don't
+ send some messages to syslog level DEBUG.
+
+commit 0b2a5b574c7ffd99aa3226d36e1d261826405625
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:21 2006 -0400
+
+ Use setfsuid() rather than seteuid() while creating contexts
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ As suggested by Olaf Kirch <okir@suse.de>, use setfsuid() rather than
+ seteuid() when creating a gss context. This prevents users from using
+ credentials that do not belong to them, while also preventing them from
+ doing things like killing, renicing, or changing the priority of the
+ gssd process while it is processing the context creation.
+
+commit 0f899e6d862994ffb437ae73e087c4a21ab59723
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:16 2006 -0400
+
+ Limit acquire_cred call to to Kerberos only
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Specify that the acquire_cred call should only be concerned with returning
+ Kerberos credentials since this is Kerberos-only functionality.
+
+commit 3829bb90e764cd72c0009cb32a8b39d0fab89d81
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:10 2006 -0400
+
+ Check that the gssapi library is usable early on.
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Do a call to determine mechanisms supported by the gssapi library early.
+ This allows us to discover early in case the gssapi library is somehow
+ misconfigured. We can bail out early and give a meaningful message
+ rather than getting errors on each attempt at a context negotiation.
+
+commit 119c3e9aafe84c0f7c2846c46ad5e6f5eeece0da
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:34:05 2006 -0400
+
+ Fix problems with 64-bit big-endian machines
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Correct the definition of mech_used in the gss context to use gss_OID_desc.
+ This fixes problems on 64-bit machines when referencing the OID.
+
+ Also updates write_buffer function to use u_int rather than size_t when
+ doing calculations.
+
+commit c3f05548d7b3d586e7eebbdde9339617e88530f3
+Author: kwc@citi.umich.edu <kwc@citi.umich.edu>
+Date: Mon Jul 3 18:33:59 2006 -0400
+
+ Define CFLAGS for gss_clnt_send_err compile
+
+ Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
+
+ Add CFLAGS to make sure we find and use the correct gssapi.h when
+ building gss_clnt_send_err
+
+commit 4e9ed06f8f8a0cd9f34a6830c0ff14344a528042
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Mon Jul 3 15:59:54 2006 +1000
+
+ Use socklen_t some more to avoid warnings.
+
+commit 6c40236820fda8960af891f41aa9d53f8bbe50a2
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Mon Jul 3 15:39:41 2006 +1000
+
+ Fix warning about pointer signedness differing.
+
+commit 3bf702b1a914b3867117b74d519c55fa68f4dc28
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Mon Jul 3 15:17:34 2006 +1000
+
+ Include the right header to get xmalloc() declaration.
+
+commit 940c7c304d4a43c00c27529cdddc7c87db6eef87
+Merge: b90d201... a503848...
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Mon Jul 3 14:21:48 2006 +1000
+
+ Merge branch 'master' of git://linux-nfs.org/nfs-utils
+
+commit b90d201551aaa712c011c3d5de900fad714a26a6
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Tue Jun 27 21:30:18 2006 +1000
+
+ Comment out unused variable.
+
+commit 33beb42d3d2cd13a82ddbbdc4275d2a048030ae3
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Tue Jun 27 21:22:59 2006 +1000
+
+ Comment out the decades-old SCCS id strings from the original Sun
+ distribution. They cause compile warnings, there is no longer any
+ reason to try to build them into the binaries, and gcc seems to be
+ eliding some of them anyway.
+
+commit 3172063ead6b99611d049a59938808a6358f48a4
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Tue Jun 27 20:55:07 2006 +1000
+
+ Detect if glibc provides socklen_t and use that instead
+ of int in those cases which generate compile warnings,
+ e.g. the last argument of recvfrom().
+
+commit a09eeb36c2c45151b9bb89f5015da0c584799716
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Tue Jun 27 20:28:02 2006 +1000
+
+ Replace the deprecated sigblock() with more modern
+ signal functions to avoid compile warnings.
+
+commit 93608a52655abf5ac23404c4b5cc05fe575a9c04
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Thu Jun 22 18:01:10 2006 +1000
+
+ Fix a number of the easier compile warnings: unused variables,
+ unused labels, constness, signedness.
+
+commit a07343ee0da4f0974a23b673ae1b0d482c7426a1
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Thu Jun 22 17:31:24 2006 +1000
+
+ Detect presence of nfs4_set_debug() in libnfsidmap and
+ don't bother calling it if it's missing.
+
+commit dcfcb677b39443b6392db3234fd50498bc158507
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Thu Jun 22 17:19:17 2006 +1000
+
+ Remove useless m4 quoting around args to PKG_CHECK_MODULES().
+
+commit 24d303ffae686192bda0a5996e8590219dcc82e7
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Thu Jun 22 17:16:19 2006 +1000
+
+ Do m4 quoting of AC_MSG_ERROR() and AC_MSG_WARN() as
+ the autoconf people intended. This avoids errors in
+ autoconf on SLES10.
+
+commit 66a699d953727d3a992cc09ed5304b83d661a737
+Author: Greg Banks <gnb@melbourne.sgi.com>
+Date: Thu Jun 22 16:51:44 2006 +1000
+
+ Add a .gitignore file to suppress the files generated
+ during autogen, configure and build.
commit 49b164d978ee6266df7ba0bd335cb34337e7c381
Author: Steve Dickson <SteveD@redhat.com>
Date: Mon Jul 3 09:52:00 2006 +1000
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
fi
AC_MSG_RESULT($KRBDIR)
+ dnl Check if -rpath=$(KRBDIR)/lib is needed
+ echo "The current KRBDIR is $KRBDIR"
+ if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \
+ -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then
+ KRBLDFLAGS="";
+ elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then
+ KRBLDFLAGS="";
+ else
+ KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib"
+ fi
+
dnl Now check for functions within gssapi library
AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context,
AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
AC_SUBST([KRBDIR])
AC_SUBST([KRBLIBS])
AC_SUBST([KRBCFLAGS])
+ AC_SUBST([KRBLDFLAGS])
AC_SUBST([K5VERS])
])
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59e for linux nfs-utils 1.0.9-pre1.
+# Generated by GNU Autoconf 2.59e for linux nfs-utils 1.0.9.
#
# Report bugs to <nfs@lists.sf.net>.
#
# Identity of this package.
PACKAGE_NAME='linux nfs-utils'
PACKAGE_TARNAME='nfs-utils'
-PACKAGE_VERSION='1.0.9-pre1'
-PACKAGE_STRING='linux nfs-utils 1.0.9-pre1'
+PACKAGE_VERSION='1.0.9'
+PACKAGE_STRING='linux nfs-utils 1.0.9'
PACKAGE_BUGREPORT='nfs@lists.sf.net'
ac_unique_file="tools/getiversion/getiversion.c"
KRBDIR
KRBLIBS
KRBCFLAGS
+KRBLDFLAGS
K5VERS
ALLOCA
LIBOBJS
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures linux nfs-utils 1.0.9-pre1 to adapt to many kinds of systems.
+\`configure' configures linux nfs-utils 1.0.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of linux nfs-utils 1.0.9-pre1:";;
+ short | recursive ) echo "Configuration of linux nfs-utils 1.0.9:";;
esac
cat <<\_ACEOF
--enable-secure-statd Only lockd can use statd (security)
--enable-rquotad enable rquotad [default=yes]
--enable-mount Create mount.nfs and don't use the util-linux
- mount(8) functionality. [default=yes]
+ mount(8) functionality. [default=no]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared[=PKGS] build shared libraries [default=yes]
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-linux nfs-utils configure 1.0.9-pre1
+linux nfs-utils configure 1.0.9
generated by GNU Autoconf 2.59e
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by linux nfs-utils $as_me 1.0.9-pre1, which was
+It was created by linux nfs-utils $as_me 1.0.9, which was
generated by GNU Autoconf 2.59e. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='nfs-utils'
- VERSION='1.0.9-pre1'
+ VERSION='1.0.9'
cat >>confdefs.h <<_ACEOF
if test "${enable_mount+set}" = set; then
enableval=$enable_mount; enable_mount=$enableval
else
- enable_mount=yes
+ enable_mount=no
fi
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6521 "configure"' > conftest.$ac_ext
+ echo '#line 6522 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8686: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8687: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8690: \$? = $ac_status" >&5
+ echo "$as_me:8691: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8954: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8955: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8958: \$? = $ac_status" >&5
+ echo "$as_me:8959: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9058: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9059: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9062: \$? = $ac_status" >&5
+ echo "$as_me:9063: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11499 "configure"
+#line 11500 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11599 "configure"
+#line 11600 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13967: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13968: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13971: \$? = $ac_status" >&5
+ echo "$as_me:13972: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14071: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14072: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14075: \$? = $ac_status" >&5
+ echo "$as_me:14076: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15632: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15633: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15636: \$? = $ac_status" >&5
+ echo "$as_me:15637: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15736: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15737: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15740: \$? = $ac_status" >&5
+ echo "$as_me:15741: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17955: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17956: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17959: \$? = $ac_status" >&5
+ echo "$as_me:17960: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18223: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18224: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18227: \$? = $ac_status" >&5
+ echo "$as_me:18228: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18327: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18328: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18331: \$? = $ac_status" >&5
+ echo "$as_me:18332: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
# Put the nasty error message in config.log where it belongs
echo "$RPCSECGSS_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&5
-echo "$as_me: error: Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&2;}
+ { { echo "$as_me:$LINENO: error: Unable to locate information required to use librpcsecgss." >&5
+echo "$as_me: error: Unable to locate information required to use librpcsecgss." >&2;}
+ { (exit 1); exit 1; }; }
+ { { echo "$as_me:$LINENO: error: If you have pkgconfig installed, you might try setting environment" >&5
+echo "$as_me: error: If you have pkgconfig installed, you might try setting environment" >&2;}
+ { (exit 1); exit 1; }; }
+ { { echo "$as_me:$LINENO: error: variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&5
+echo "$as_me: error: variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&5
-echo "$as_me: error: Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&2;}
+ { { echo "$as_me:$LINENO: error: Unable to locate information required to use librpcsecgss." >&5
+echo "$as_me: error: Unable to locate information required to use librpcsecgss." >&2;}
+ { (exit 1); exit 1; }; }
+ { { echo "$as_me:$LINENO: error: If you have pkgconfig installed, you might try setting environment" >&5
+echo "$as_me: error: If you have pkgconfig installed, you might try setting environment" >&2;}
+ { (exit 1); exit 1; }; }
+ { { echo "$as_me:$LINENO: error: variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&5
+echo "$as_me: error: variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig" >&2;}
{ (exit 1); exit 1; }; }
done
+ { echo "$as_me:$LINENO: checking for nfs4_set_debug in -lnfsidmap" >&5
+echo $ECHO_N "checking for nfs4_set_debug in -lnfsidmap... $ECHO_C" >&6; }
+if test "${ac_cv_lib_nfsidmap_nfs4_set_debug+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnfsidmap $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nfs4_set_debug ();
+int
+main ()
+{
+return nfs4_set_debug ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nfsidmap_nfs4_set_debug=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_nfsidmap_nfs4_set_debug=no
+fi
+
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_nfsidmap_nfs4_set_debug" >&5
+echo "${ECHO_T}$ac_cv_lib_nfsidmap_nfs4_set_debug" >&6; }
+if test $ac_cv_lib_nfsidmap_nfs4_set_debug = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NFS4_SET_DEBUG 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for Kerberos v5" >&5
{ echo "$as_me:$LINENO: result: $KRBDIR" >&5
echo "${ECHO_T}$KRBDIR" >&6; }
+ echo "The current KRBDIR is $KRBDIR"
+ if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \
+ -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then
+ KRBLDFLAGS="";
+ elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then
+ KRBLDFLAGS="";
+ else
+ KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib"
+ fi
+
as_ac_Lib=`echo "ac_cv_lib_$gssapi_lib''_gss_krb5_export_lucid_sec_context" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for gss_krb5_export_lucid_sec_context in -l$gssapi_lib" >&5
echo $ECHO_N "checking for gss_krb5_export_lucid_sec_context in -l$gssapi_lib... $ECHO_C" >&6; }
+
{ echo "$as_me:$LINENO: checking for authgss_create_default in -lrpcsecgss" >&5
echo $ECHO_N "checking for authgss_create_default in -lrpcsecgss... $ECHO_C" >&6; }
if test "${ac_cv_lib_rpcsecgss_authgss_create_default+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrpcsecgss $KRBLIBS $LIBS"
+LIBS="-lrpcsecgss -lgssapi -ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrpcsecgss $KRBLIBS $LIBS"
+LIBS="-lrpcsecgss -lgssapi -ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
+
for ac_func in alarm atexit dup2 fdatasync ftruncate getcwd \
gethostbyaddr gethostbyname gethostname getmntent \
gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
realpath rmdir select socket strcasecmp strchr strdup \
- strerror strrchr strtol strtoul
+ strerror strrchr strtol strtoul sigprocmask
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
_ACEOF
+{ echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_socklen_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef socklen_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_socklen_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_socklen_t=no
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
+
+{ echo "$as_me:$LINENO: checking size of socklen_t" >&5
+echo $ECHO_N "checking size of socklen_t... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_socklen_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_socklen_t" = yes; then
+ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_socklen_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (socklen_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (socklen_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; } ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef socklen_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_socklen_t=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (socklen_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (socklen_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_socklen_t=0
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_socklen_t" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SOCKLEN_T $ac_cv_sizeof_socklen_t
+_ACEOF
+
+
+
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by linux nfs-utils $as_me 1.0.9-pre1, which was
+This file was extended by linux nfs-utils $as_me 1.0.9, which was
generated by GNU Autoconf 2.59e. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-linux nfs-utils config.status 1.0.9-pre1
+linux nfs-utils config.status 1.0.9
configured by $0, generated by GNU Autoconf 2.59e,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
KRBDIR!$KRBDIR$ac_delim
KRBLIBS!$KRBLIBS$ac_delim
KRBCFLAGS!$KRBCFLAGS$ac_delim
+KRBLDFLAGS!$KRBLDFLAGS$ac_delim
K5VERS!$K5VERS$ac_delim
ALLOCA!$ALLOCA$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_INIT([linux nfs-utils],[1.0.9-pre1],[nfs@lists.sf.net],[nfs-utils])
+AC_INIT([linux nfs-utils],[1.0.9],[nfs@lists.sf.net],[nfs-utils])
AC_CANONICAL_BUILD([])
AC_CANONICAL_HOST([])
AC_CONFIG_SRCDIR(tools/getiversion/getiversion.c)
AC_ARG_ENABLE(mount,
[AC_HELP_STRING([--enable-mount],
- [Create mount.nfs and don't use the util-linux mount(8) functionality. @<:@default=yes@:>@])],
+ [Create mount.nfs and don't use the util-linux mount(8) functionality. @<:@default=no@:>@])],
enable_mount=$enableval,
- enable_mount=yes)
+ enable_mount=no)
AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
# Check whether user wants TCP wrappers support
AC_CHECK_LIB(nsl, main, [LIBNSL="-lnsl"])
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])
if test "$enable_nfsv4" = yes; then
- AC_CHECK_LIB(event, event_dispatch, [libevent=1], [AC_MSG_ERROR(libevent needed for nfsv4 support)])
- AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], [AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
- AC_CHECK_HEADERS(event.h, ,[AC_MSG_ERROR(libevent needed for nfsv4 support)])
- AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
+ AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
+ AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+ AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
+ AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
dnl librpcsecgss already has a dependency on libgssapi,
dnl but we need to make sure we get the right version
if test "$enable_gss" = yes; then
- PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.10], [],
- [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
+ PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.10, ,
+ [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.])
+ AC_MSG_ERROR([If you have pkgconfig installed, you might try setting environment])
+ AC_MSG_ERROR([variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
]
)
- PKG_CHECK_MODULES([GSSAPI], [libgssapi >= 0.9])
+ PKG_CHECK_MODULES(GSSAPI, libgssapi >= 0.9)
fi
fi
if test "$enable_gss" = yes; then
dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
- AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for gss support)])
- AC_CHECK_HEADERS(spkm3.h, ,[AC_MSG_WARN(could not locate SPKM3 header; will not have SPKM3 support)])
+ AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support]))
+ AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support]))
+ dnl the nfs4_set_debug function doesn't appear in all version of the library
+ AC_CHECK_LIB(nfsidmap, nfs4_set_debug,
+ AC_DEFINE(HAVE_NFS4_SET_DEBUG,1,
+ [Whether nfs4_set_debug() is present in libnfsidmap]),)
dnl Check for Kerberos V5
AC_KERBEROS_V5
dnl This is not done until here because we need to have KRBLIBS set
dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIBS)
+ AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssapi -ldl)
AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
- AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIBS)
+ AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssapi -ldl)
fi
gethostbyaddr gethostbyname gethostname getmntent \
gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
realpath rmdir select socket strcasecmp strchr strdup \
- strerror strrchr strtol strtoul])
+ strerror strrchr strtol strtoul sigprocmask])
dnl *************************************************************
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(socklen_t)
+
dnl *************************************************************
dnl Export some path names to config.h
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
-EXTRA_DIST = \
- mount.x \
- \
- keys.c
+EXTRA_DIST = mount.x
noinst_LIBRARIES = libexport.a
libexport_a_SOURCES = client.c export.c hostname.c nfsctl.c rmtab.c \
$(GENFILES_H): %.h: %.x $(RPCGEN)
test -f $@ && rm -rf $@ || true
$(RPCGEN) -h -o $@ $<
+ rm -f $(top_builddir)/support/include/mount.h
$(LN_S) ../export/mount.h $(top_builddir)/support/include/mount.h
MAINTAINERCLEANFILES = Makefile.in
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
GENFILES_XDR = mount_xdr.c
GENFILES_H = mount.h
GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
-EXTRA_DIST = \
- mount.x \
- \
- keys.c
-
+EXTRA_DIST = mount.x
noinst_LIBRARIES = libexport.a
libexport_a_SOURCES = client.c export.c hostname.c nfsctl.c rmtab.c \
xtab.c mount_clnt.c mount_xdr.c
$(GENFILES_H): %.h: %.x $(RPCGEN)
test -f $@ && rm -rf $@ || true
$(RPCGEN) -h -o $@ $<
+ rm -f $(top_builddir)/support/include/mount.h
$(LN_S) ../export/mount.h $(top_builddir)/support/include/mount.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <netdb.h>
#include "xmalloc.h"
#include "misc.h"
+++ /dev/null
-/*
- * 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;
-}
nfs_mntent.h \
nfs_paths.h \
nfslib.h \
- rpcdispatch.h \
rpcmisc.h \
- rpcsec.h \
tcpwrapper.h \
- version.h \
xio.h \
xlog.h \
xmalloc.h \
- xcommon.h \
- ypupdate.h
+ xcommon.h
MAINTAINERCLEANFILES = Makefile.in
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
nfs_mntent.h \
nfs_paths.h \
nfslib.h \
- rpcdispatch.h \
rpcmisc.h \
- rpcsec.h \
tcpwrapper.h \
- version.h \
xio.h \
xlog.h \
xmalloc.h \
- xcommon.h \
- ypupdate.h
+ xcommon.h
MAINTAINERCLEANFILES = Makefile.in
all: config.h
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
+/* Whether nfs4_set_debug() is present in libnfsidmap */
+#undef HAVE_NFS4_SET_DEBUG
+
/* Define to 1 if you have the <nfsidmap.h> header file. */
#undef HAVE_NFSIDMAP_H
gss_krb5_set_allowable_enctypes */
#undef HAVE_SET_ALLOWABLE_ENCTYPES
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
+/* The size of `socklen_t', as computed by sizeof. */
+#undef SIZEOF_SOCKLEN_T
+
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
#define RPCDBG_AUTH 0x0010
#define RPCDBG_PMAP 0x0020
#define RPCDBG_SCHED 0x0040
+#define RPCDBG_TRANS 0x0080
#define RPCDBG_SVCSOCK 0x0100
#define RPCDBG_SVCDSP 0x0200
#define RPCDBG_MISC 0x0400
+#define RPCDBG_CACHE 0x0800
#define RPCDBG_ALL 0x7fff
/*
#define NLMDBG_CLNTSUBS 0x0020
#define NLMDBG_SVCSUBS 0x0040
#define NLMDBG_HOSTCACHE 0x0080
+#define NLMDBG_XDR 0x0100
#define NLMDBG_ALL 0x7fff
#define NFSDBG_XDR 0x0020
#define NFSDBG_FILE 0x0040
#define NFSDBG_ROOT 0x0080
+#define NFSDBG_CALLBACK 0x0100
#define NFSDBG_ALL 0xFFFF
#endif /* _NFS_DEBUG_H */
+++ /dev/null
-/*
- * nlm_dispatch This is a generic RPC call dispatcher.
- * It is loosely based on the dispatch mechanism I
- * first encountered in the UNFSD source.
- *
- * Cyopright (C) 1995, Olaf Kirch <okir@monad.swb.de>
- *
- * 24.05.95 okir
- *
- */
-
-#ifndef RPCDISPATCH_H
-#define RPCDISPATCH_H
-
-#include <rpc/rpc.h>
-
-#ifdef __STDC__
-# define CONCAT(a,b) a##b
-# define CONCAT3(a,b,c) a##b##c
-# define STRING(a) #a
-#else
-# define CONCAT(a,b) a/**/b
-# define CONCAT3(a,b,c) a/**/b/**/c
-# define STRING(a) "a"
-#endif
-
-#ifdef __STDC__
-typedef bool_t (*rpcsvc_fn_t)(struct svc_req *, void *argp, void *resp);
-#else
-typedef bool_t (*rpcsvc_fn_t)();
-#endif
-
-#define table_ent(func, vers, arg_type, res_type) \
- { STRING(func), \
- (rpcsvc_fn_t)CONCAT(func,_svc), vers,\
- (xdrproc_t)CONCAT(xdr_, arg_type), sizeof(arg_type), \
- (xdrproc_t)CONCAT(xdr_, res_type), sizeof(res_type), \
- }
-#define nlm_undef_svc NULL
-#define xdr_nlm_void xdr_void
-
-struct dispatch_entry {
- const char *name;
- rpcsvc_fn_t func;
- unsigned int versions; /* bitmap of versions */
- xdrproc_t xdr_arg_fn; /* argument XDR */
- size_t xdr_arg_size;
- xdrproc_t xdr_res_fn; /* result XDR */
- size_t xdr_res_size;
-};
-
-void rpc_dispatch(struct svc_req *rq, SVCXPRT *tp,
- struct dispatch_entry *dtable, int nproc,
- void *argp, void *resp);
-void rpc_svcrun(void);
-
-#endif /* RPCDISPATCH_H */
+++ /dev/null
-/*
- * Declarations needed for the authdes library. Some of the functions
- * mentioned herein have been omitted from the Linux libc header files
- */
-
-#ifndef RPCSEC_H
-#define RPCSEC_H
-
-int netname2user(char *netname, int *uidp, int *gidp,
- int *gidlenp, int *gidlist);
-int netname2host(char *netname, char *hostname, int hostlen);
-int getnetname(char *name);
-int user2netname(char *netname, int uid, char *domain);
-int host2netname(char *netname, char *hostname, char *domain);
-void passwd2des(char *pw, char *key);
-int getsecretkey(char *netname, char *secretkey, char *passwd);
-int getpublickey(char *hostname, char *publickey);
-int yp_update(char *domain, char *map, unsigned int ypop,
- char *key, int keylen, char *data, int datalen);
-int key_setsecret(char *secret);
-int xencrypt(char *secret, char *passwd);
-int xdecrypt(char *secret, char *passwd);
-
-
-#define PUBLICKEY_MAP "publickey.byname"
-#define NETID_MAP "netid.byname"
-
-#ifndef DEBUG
-#define RPCSEC_BASE "/etc/"
-#else
-#define RPCSEC_BASE "/tmp/"
-#endif
-
-#define PUBLICKEY_FILE RPCSEC_BASE "publickey"
-#define PUBLICKEY_LOCK RPCSEC_BASE "publickey.lock"
-#define ROOTKEY_FILE RPCSEC_BASE ".rootkey"
-#define KEYSTORE_FILE RPCSEC_BASE "keystore"
-
-#endif /* RPCSEC_H */
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
+++ /dev/null
-#define VERSION "1.4.7 (0.4.22)"
+++ /dev/null
-/*
- * ypupdate.h This file contains the public declarations for the
- * ypupdate client side RPC stubs.
- *
- * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef YPUPDATE_H
-#define YPUPDATE_H
-
-#include <rpcsvc/ypclnt.h>
-
-int yp_update(char *domain, char *map, unsigned int ypop,
- char *key, int keylen, char *data, int datalen);
-
-#endif YPUPDATE_H
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#) from_local.c 1.3 96/05/31 15:52:57";
#endif
*/
#include <string.h>
-#include <malloc.h>
+#include "xcommon.h"
#include <sys/stat.h>
int
MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = \
- clients.c \
- keytab.c \
- ypupdate_xdr.c
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
svc_socket.c cacheio.c closeall.c conn.c fstab.c nfs_mntent.c
MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = \
- clients.c \
- keytab.c \
- ypupdate_xdr.c
-
all: all-am
.SUFFIXES:
+++ /dev/null
-/*
- * support/nfs/nfsclient.c
- *
- * Parse the nfsclients file.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#include "config.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include "xmalloc.h"
-#include "nfslib.h"
-#include "exportfs.h"
-#include "xio.h"
-
-static char *cfname = NULL;
-static XFILE *cfp = NULL;
-static int *squash_uids = NULL,
- *squash_gids = NULL;
-static int squash_uidlen = 0,
- squash_gidlen = 0;
-static char *hosts = NULL;
-
-static int parsesquash(char *list, int **idp, int *lenp);
-static int parsenum(char **cpp);
-static int parsekey(struct nfskey *keyp, char *str);
-static int hexdigit(char c);
-static int gettag(char *tag, int len);
-static int getattr(char *attr, int alen, char *value, int vlen);
-static void syntaxerr(char *msg);
-
-#ifndef isblank
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#endif
-
-void
-setnfsclntent(char *fname)
-{
- if (cfp)
- xfclose(cfp);
- if (!fname)
- fname = _PATH_NFSCLIENTS;
- if ((cfp = xfopen(fname)) == NULL)
- xlog(L_ERROR, "can't open %s for reading", fname);
- cfname = strdup(fname);
-}
-
-struct nfsclntent *
-getnfsclntent(void)
-{
- static struct nfsclntent cle;
- static char *hostptr = NULL;
- char attr[32], val[512], *sp;
- int ok;
-
- if (!cfp)
- endnfsclntent();
-
-again:
- if (hosts) {
- if (hostptr)
- goto nexthost;
- xfree(hosts);
- hosts = NULL;
- }
-
- if ((ok = gettag(cle.c_tag, sizeof(cle.c_tag))) < 0)
- syntaxerr("expected tag");
- if (ok <= 0)
- return NULL;
-
- cle.c_hostname[0] = '\0';
- cle.c_fhkey.k_type = CLE_KEY_NONE;
- cle.c_mapping = CLE_MAP_IDENT;
- cle.c_anonuid = 65534;
- cle.c_anongid = 65534;
-
- if (squash_uids)
- xfree(squash_uids);
- if (squash_gids)
- xfree(squash_gids);
- squash_uids = squash_gids = NULL;
- squash_uidlen = squash_gidlen = 0;
-
- while (ok) {
- if ((ok = getattr(attr, sizeof(attr), val, sizeof(val))) < 0)
- return NULL;
- if (!ok)
- break;
- if (attr[0] == 'h' && !strcmp(attr, "hosts")) {
- int l0 = hosts? strlen(hosts) : 0;
-
- hosts = (char *) xrealloc(hosts, l0+strlen(val)+2);
- if (l0)
- hosts[l0++] = ':';
- strcpy(hosts+l0, val);
- } else
- if (attr[0] == 'f' && !strcmp(attr, "fhmac")) {
- if (!parsekey(&cle.c_fhkey, val))
- return NULL;
- } else
- if (attr[0] == 'm' && !strcmp(attr, "mapping")) {
- if (!strcmp(val, "identity"))
- cle.c_mapping = CLE_MAP_IDENT;
- else if (!strcmp(val, "file"))
- cle.c_mapping = CLE_MAP_FILE;
- else if (!strcmp(val, "daemon"))
- cle.c_mapping = CLE_MAP_UGIDD;
- else {
- syntaxerr("invalid mapping type");
- return NULL;
- }
- } else
- if (attr[0] == 's' && !strcmp(attr, "squash_uids")) {
- if (!parsesquash(val, &squash_uids, &squash_uidlen))
- return NULL;
- } else
- if (attr[0] == 's' && !strcmp(attr, "squash_gids")) {
- if (!parsesquash(val, &squash_gids, &squash_gidlen))
- return NULL;
- } else
- if (attr[0] == 'a' && !strcmp(attr, "anonuid"))
- cle.c_anonuid = atoi(val);
- else
- if (attr[0] == 'a' && !strcmp(attr, "anongid"))
- cle.c_anongid = atoi(val);
- else
- syntaxerr("unknown attribute");
- }
-
- cle.c_squashuids = squash_uids;
- cle.c_squashgids = squash_gids;
-
- /* This is the anon entry */
- if (!hosts) {
- if (strcmp(cle.c_tag, "anonymous")) {
- xlog(L_ERROR,
- "%s:%d: entry %s allows anonymous access. Ignored.",
- cfname, xfp->x_line, cle.c_tag);
- goto again;
- }
- return &cle;
- }
- hostptr = hosts;
-
-nexthost:
- if (*hostptr == ':' && strcmp(cle.c_tag, "anonymous")) {
- xlog(L_ERROR,
- "%s:%d: entry %s allows anonymous access. Ignored.",
- cfname, cfp->x_line, cle.c_tag);
- while (*hostptr == ':')
- hostptr++;
- }
-
- /* Ignore trailing colons */
- if (!*hostptr) {
- hostptr = NULL;
- goto again;
- }
-
- sp = hostptr;
- hostptr = strchr(hostptr, ':');
- if (hostptr)
- *hostptr++ = '\0';
- strncpy(cle.c_hostname, sp, sizeof(cle.c_hostname) - 1);
- cle.c_hostname [sizeof(cle.c_hostname) - 1] = '\0';
- return &cle;
-}
-
-void
-endnfsclntent(void)
-{
- if (cfname)
- free(cfname);
- if (cfp)
- xfclose(cfp);
- if (squash_uids)
- xfree(squash_uids);
- if (squash_gids)
- xfree(squash_gids);
- if (hosts)
- xfree(hosts);
- cfname = NULL;
- cfp = NULL;
- squash_uids = NULL;
- squash_gids = NULL;
- hosts = NULL;
-}
-
-static int
-parsekey(struct nfskey *keyp, char *str)
-{
- char *sp;
- int i, l, x0, x1;
-
-
- if ((sp = strchr(str, ':')) != NULL)
- *sp++ = '\0';
- if (!strcmp(str, "null"))
- keyp->k_type = CLE_KEY_NULL;
- else if (!strcmp(str, "md5"))
- keyp->k_type = CLE_KEY_MD5;
- else if (!strcmp(str, "sha"))
- keyp->k_type = CLE_KEY_SHA;
- else {
- syntaxerr("unknown key type");
- return 0;
- }
- if (keyp->k_type == CLE_KEY_NULL) {
- keyp->k_len = 0;
- if (sp)
- syntaxerr("unexpected key data for null key");
- return sp? 0 : 1;
- } else if (sp) {
- if ((l = strlen(sp)) & 1) {
- syntaxerr("odd key length");
- return 0;
- }
-
- l >>= 1;
- for (i = 0; i < l && i < sizeof(keyp->k_key); i++, sp += 2) {
- if ((x0 = hexdigit(sp[0])) == 0xff ||
- (x1 = hexdigit(sp[1])) == 0xff) {
- syntaxerr("bad key digit");
- return 0;
- }
- keyp->k_key[i] = (x0 << 4) | x1;
- }
- keyp->k_len = i;
- return 1;
- }
- return 0;
-}
-
-static int
-hexdigit(char c)
-{
- if ((c = tolower(c)) >= '0' && c <= '9')
- return c - '0';
- if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
- return 0xff;
-}
-
-static int
-parsesquash(char *list, int **idp, int *lenp)
-{
- char *cp = list;
- int id0, id1;
- int len = *lenp;
- int *id = *idp;
-
- do {
- id0 = parsenum(&cp);
- if (*cp == '-') {
- cp++;
- id1 = parsenum(&cp);
- } else {
- id1 = id0;
- }
- if (id0 == -1 || id1 == -1) {
- syntaxerr("uid/gid -1 not permitted");
- return 0;
- }
- if ((len % 8) == 0)
- id = (int *) xrealloc(id, (len + 9) * sizeof(*id));
- id[len++] = id0;
- id[len++] = id1;
- if (!*cp)
- break;
- if (*cp != ',') {
- syntaxerr("bad uid/gid list");
- return 0;
- }
- cp++;
- } while(1);
-
- id[len] = -1;
- *lenp = len;
- *idp = id;
- return 1;
-}
-
-static int
-parsenum(char **cpp)
-{
- char *cp = *cpp, c;
- int num = 0;
-
- if (**cpp == '-')
- (*cpp)++;
- while (isdigit(**cpp))
- (*cpp)++;
- c = **cpp; **cpp = '\0'; num = atoi(cp); **cpp = c;
- return num;
-}
-
-static int
-gettag(char *tag, int len)
-{
- xskip(cfp, " \t\n");
- return xgettok(cfp, ':', tag, len);
-}
-
-static int
-getattr(char *attr, int alen, char *value, int vlen)
-{
- int ok;
-
- xskip(cfp, " \t");
- if ((ok = xgettok(cfp, '=', attr, alen)) < 0)
- syntaxerr("missing attribute");
- if (ok <= 0)
- return ok;
- xskip(cfp, " \t=");
-
- return xgettok(cfp, 0, value, vlen);
-}
-
-static void
-syntaxerr(char *msg)
-{
- xlog(L_ERROR, "%s:%d: syntax error: %s",
- cfname, cfp->x_line, msg);
-}
-
*
*/
+#include "config.h"
#include <errno.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
#include "conn.h"
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
extern int verbose;
/* Map an NFS version into the corresponding Mountd version */
if (sock != -1) {
if (caddr) {
/* Get the address of our end of this connection */
- int len = sizeof(*caddr);
+ socklen_t len = sizeof(*caddr);
if (getsockname(sock, caddr, &len) != 0)
caddr->sin_family = 0;
}
+++ /dev/null
-/*
- * support/nfs/keytab.c
- *
- * Manage the nfskeys database.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#include "config.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include "xmalloc.h"
-#include "nfslib.h"
-#include "exportfs.h"
-#include "xio.h"
-
-static FILE *cfp = NULL;
-
-int
-setnfskeyent(char *fname)
-{
- if (cfp)
- fclose(cfp);
- if (!fname)
- fname = _PATH_NFSKEYS;
- cfp = fsetnfskeyent(fname, "r");
- return cfp != NULL;
-}
-
-FILE *
-fsetnfskeyent(char *fname, char *type)
-{
-#if 0
- FILE *fp;
-
- if ((fp = fopen(fname, type)) == NULL)
- xlog(L_ERROR, "can't open %s for %sing\n",
- fname, type[0] == 'r'? "read" : "writ");
- return fp;
-#else
- return fopen(fname, type);
-#endif
-}
-
-struct nfskeyent *
-getnfskeyent(void)
-{
- return fgetnfskeyent(cfp);
-}
-
-struct nfskeyent *
-fgetnfskeyent(FILE *fp)
-{
- static struct nfskeyent ke;
-
- if (!fp)
- return NULL;
-
- do {
- if (fread(&ke, sizeof(ke), 1, fp) != 1)
- return NULL;
- } while(ke.k_hostname[0] == '\0');
- return &ke;
-}
-
-void
-endnfskeyent(void)
-{
- if (cfp)
- fclose(cfp);
- cfp = NULL;
-}
-
-void
-fendnfskeyent(FILE *fp)
-{
- if (fp)
- fclose(fp);
-}
-
-void
-fputnfskeyent(FILE *fp, struct nfskeyent *kep)
-{
- fwrite(kep, sizeof(*kep), 1, fp);
-}
-
-int
-getnfskeytype(char *st)
-{
- if (!strcasecmp(st, "null"))
- return CLE_KEY_NULL;
- if (!strcasecmp(st, "md5"))
- return CLE_KEY_MD5;
- if (!strcasecmp(st, "sha"))
- return CLE_KEY_SHA;
- return CLE_KEY_NONE;
-}
-
-char *
-getnfskeyname(int type)
-{
- switch (type) {
- case CLE_KEY_NONE:
- return "none";
- case CLE_KEY_NULL:
- return "null";
- case CLE_KEY_MD5:
- return "md5";
- case CLE_KEY_SHA:
- return "sha";
- }
- return "unk";
-}
-
-int
-getnfskeysize(int type)
-{
- switch (type) {
- case CLE_KEY_MD5:
- return 16;
- case CLE_KEY_SHA:
- return 20;
- }
- return 0;
-}
static unsigned char need_escaping[] = { ' ', '\t', '\n', '\\' };
static char *
-mangle(const unsigned char *s) {
+mangle(const char *arg) {
+ const unsigned char *s = (const unsigned char *)arg;
char *ss, *sp;
int n;
- n = strlen(s);
+ n = strlen(arg);
ss = sp = xmalloc(4*n+1);
while(1) {
for (n = 0; n < sizeof(need_escaping); n++) {
struct nfsctl_arg arg;
int fd;
- nfssvc_setfds(port, protobits, haddr);
-
+ /* Note: must set versions before fds so that
+ * the ports get registered with portmap against correct
+ * versions
+ */
nfssvc_versbits(versbits);
+ nfssvc_setfds(port, protobits, haddr);
fd = open(NFSD_THREAD_FILE, O_WRONLY);
if (fd < 0)
#include <time.h>
#include "nfslib.h"
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
static void closedown(int sig);
int makesock(int port, int proto);
struct sockaddr_in saddr;
SVCXPRT *transp;
int sock;
- int asize;
+ socklen_t asize;
asize = sizeof(saddr);
sock = 0;
if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0
&& saddr.sin_family == AF_INET) {
- int ssize = sizeof (int);
+ socklen_t ssize = sizeof (int);
int fdtype = 0;
if (getsockopt(0, SOL_SOCKET, SO_TYPE,
(char *)&fdtype, &ssize) == -1)
break;
case AUTH_UNIX: {
struct authunix_parms *unix_cred;
+ time_t time;
struct tm *tm;
unix_cred = (struct authunix_parms *) rqstp->rq_clntcred;
- tm = localtime(&unix_cred->aup_time);
+ time = unix_cred->aup_time;
+ tm = localtime(&time);
snprintf(sp, buflen, "UNIX %d/%d/%d %02d:%02d:%02d %s %d.%d",
tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec,
+++ /dev/null
-/*
- * support/nfs/ypupdate_xdr.c
- *
- * This file contains the XDR code for the ypupdate protocol.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#include "config.h"
-
-#include <ypupdate.h>
-
-bool_t
-xdr_ypupdate_args(XDR *xdrs, ypupdate_args *objp)
-{
- return xdr_string(xdrs, &objp->mapname, MAXMAPNAMELEN) &&
- xdr_bytes(xdrs, &objp->key.yp_buf_val,
- &objp->key.yp_buf_len, MAXYPDATALEN) &&
- xdr_bytes(xdrs, &objp->datum.yp_buf_val,
- &objp->datum.yp_buf_len, MAXYPDATALEN);
-}
-
-bool_t
-xdr_ypdelete_args(XDR *xdrs, ypdelete_args *objp)
-{
- return xdr_string(xdrs, &objp->mapname, MAXMAPNAMELEN) &&
- xdr_bytes(xdrs, &objp->key.yp_buf_val,
- &objp->key.yp_buf_len, MAXYPDATALEN);
-}
+++ /dev/null
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = rpc
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
CC=$(CC_FOR_BUILD)
LIBTOOL = @LIBTOOL@ --tag=CC
-EXTRA_DIST= neat_idea.c
+man8_MANS = rpcdebug.man
+EXTRA_DIST = $(man8_MANS)
-noinst_PROGRAMS = rpcdebug
+sbin_PROGRAMS = rpcdebug
rpcdebug_SOURCES = rpcdebug.c
rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD)
rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-noinst_PROGRAMS = rpcdebug$(EXEEXT)
+sbin_PROGRAMS = rpcdebug$(EXEEXT)
subdir = tools/rpcdebug
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/support/include/config.h
CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
+sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(sbin_PROGRAMS)
am_rpcdebug_OBJECTS = rpcdebug-rpcdebug.$(OBJEXT)
rpcdebug_OBJECTS = $(am_rpcdebug_OBJECTS)
rpcdebug_LDADD = $(LDADD)
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(rpcdebug_SOURCES)
DIST_SOURCES = $(rpcdebug_SOURCES)
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man8_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
statedir = @statedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-EXTRA_DIST = neat_idea.c
+man8_MANS = rpcdebug.man
+EXTRA_DIST = $(man8_MANS)
rpcdebug_SOURCES = rpcdebug.c
rpcdebug_CFLAGS = $(CFLAGS_FOR_BUILD)
rpcdebug_CPPFLAGS = $(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+ done
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+clean-sbinPROGRAMS:
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
distclean-libtool:
-rm -f libtool
uninstall-info-am:
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 8*) ;; \
+ *) ext='8' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
+ done
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 8*) ;; \
+ *) ext='8' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
+ for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
mostlyclean-am
distclean: distclean-am
info-am:
-install-data-am:
+install-data-am: install-man
-install-exec-am:
+install-exec-am: install-sbinPROGRAMS
install-info: install-info-am
-install-man:
+install-man: install-man8
installcheck-am:
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man8
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS ctags distclean \
+ clean-libtool clean-sbinPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
+ install-man8 install-sbinPROGRAMS install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am uninstall-man \
+ uninstall-man8 uninstall-sbinPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
+++ /dev/null
-/*
- * Get or set RPC debug flags.
- *
- * I would have loved to write this without recourse to the sysctl
- * interface, but the only plausible approach (reading and writing
- * /dev/kmem at the offsets indicated by the *_debug symbols from
- * /proc/ksyms) didn't work, because /dev/kmem doesn't translate virtual
- * addresses on write. Unfortunately, modules are stuffed into memory
- * allocated via vmalloc.
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <nfs/debug.h>
-#include "nfslib.h"
-
-static int verbose = 0;
-static int memfd;
-static off_t flagpos;
-
-static void find_offset(char *module);
-static unsigned int find_flag(char **module, char *name);
-static unsigned int get_flags(void);
-static void set_flags(unsigned int value);
-static void print_flags(char *module, unsigned int flags);
-static void usage(int excode);
-
-int
-main(int argc, char **argv)
-{
- int opt_s = 0,
- opt_c = 0;
- unsigned int flags = 0, oflags;
- char * module = NULL;
- int c;
-
- while ((c = getopt(argc, argv, "chm:sv")) != EOF) {
- switch (c) {
- case 'c':
- opt_c = 1;
- break;
- case 'h':
- usage(0);
- case 'm':
- module = optarg;
- break;
- case 's':
- opt_s = 1;
- break;
- case 'v':
- verbose++;
- break;
- default:
- fprintf(stderr, "rpcdebug: unknown option -%c\n",
- optopt);
- usage(1);
- }
- }
-
- if (opt_c + opt_s > 1) {
- fprintf(stderr, "You can use at most one of -c and -s\n");
- usage(1);
- }
-
- if (argc == optind) {
- flags = ~(unsigned int) 0;
- } else {
- for (; optind < argc; optind++) {
- unsigned int temp;
-
- if (!(temp = find_flag(&module, argv[optind]))) {
- fprintf(stderr, "rpcdebug: unknown flag %s\n",
- argv[optind]);
- exit(1);
- }
- flags |= temp;
- }
- }
-
- if (!module) {
- fprintf(stderr, "rpcdebug: no module name specified, and "
- "could not be inferred.\n");
- usage(1);
- }
-
- if ((memfd = open("/dev/kmem", O_RDWR)) < 0) {
- perror("can't open /dev/mem");
- exit(1);
- }
-
- find_offset(module);
-
- oflags = get_flags();
-
- if (opt_c) {
- set_flags(oflags & ~flags);
- } else if (opt_s) {
- set_flags(oflags | flags);
- } else {
- print_flags(module, oflags);
- }
-
- close(memfd);
- return 0;
-}
-
-#define FLAG(mname, fname) \
- { #mname, #fname, mname##DBG_##fname }
-
-static struct flagmap {
- char * module;
- char * name;
- unsigned int value;
-} flagmap[] = {
- /* rpc */
- FLAG(RPC, XPRT),
- FLAG(RPC, CALL),
- FLAG(RPC, TYPES),
- FLAG(RPC, NFS),
- FLAG(RPC, AUTH),
- FLAG(RPC, PMAP),
- FLAG(RPC, SCHED),
- FLAG(RPC, SVCSOCK),
- FLAG(RPC, SVCDSP),
- FLAG(RPC, MISC),
- FLAG(RPC, ALL),
-
- /* nfs */
- /* currently handled by RPCDBG_NFS */
-
- /* nfsd */
- FLAG(NFSD, SOCK),
- FLAG(NFSD, FH),
- FLAG(NFSD, EXPORT),
- FLAG(NFSD, SVC),
- FLAG(NFSD, PROC),
- FLAG(NFSD, FILEOP),
- FLAG(NFSD, AUTH),
- FLAG(NFSD, REPCACHE),
- FLAG(NFSD, XDR),
- FLAG(NFSD, LOCKD),
- FLAG(NFSD, ALL),
-
- /* lockd */
- FLAG(NLM, SVC),
- FLAG(NLM, CLIENT),
- FLAG(NLM, CLNTLOCK),
- FLAG(NLM, SVCLOCK),
- FLAG(NLM, MONITOR),
- FLAG(NLM, CLNTSUBS),
- FLAG(NLM, SVCSUBS),
- FLAG(NLM, ALL),
-
- { NULL, NULL, 0 }
-};
-
-static unsigned int
-find_flag(char **module, char *name)
-{
- char *mod = *module;
- unsigned int value = 0;
- int i;
-
- for (i = 0; flagmap[i].module; i++) {
- if ((mod && strcasecmp(mod, flagmap[i].module))
- || strcasecmp(name, flagmap[i].name))
- continue;
- if (value) {
- fprintf(stderr,
- "rpcdebug: ambiguous symbol name %s.\n"
- "This name is used by more than one module, "
- "please specify the module name using\n"
- "the -m option.\n",
- name);
- usage(1);
- }
- value = flagmap[i].value;
- if (*module)
- return value;
- mod = flagmap[i].module;
- }
-
- *module = mod;
- return value;
-}
-
-static unsigned int
-get_flags(void)
-{
- unsigned int value;
- int count;
-
- if (lseek(memfd, flagpos, SEEK_SET) < 0) {
- perror("lseek");
- exit(1);
- }
- if ((count = read(memfd, &value, sizeof(value))) < 0) {
- perror("read");
- exit(1);
- }
- if (count != sizeof(value)) {
- fprintf(stderr, "read failed (only %d bytes read)\n",
- count);
- exit(1);
- }
- if (verbose)
- printf("getting flags 0x%x\n", value);
- return value;
-}
-
-static void
-set_flags(unsigned int value)
-{
- int count;
-
- if (verbose)
- printf("setting flags 0x%x\n", value);
- if (lseek(memfd, flagpos, SEEK_SET) < 0) {
- perror("lseek");
- exit(1);
- }
- if ((count = write(memfd, &value, sizeof(value))) < 0) {
- perror("write");
- exit(1);
- }
- if (count != sizeof(value)) {
- fprintf(stderr, "write failed (only %d bytes written)\n",
- count);
- exit(1);
- }
-}
-
-static void
-find_offset(char *module)
-{
- char buffer[512], *sp;
- char symbol[64];
- FILE *fp;
- int len;
-
- len = sprintf(symbol, "%s_debug", module);
-
- if ((fp = fopen("/proc/ksyms", "r")) < 0) {
- perror("rpcdebug: can't open /proc/ksyms");
- exit(1);
- }
-
- while (fgets(buffer, sizeof(buffer), fp) != NULL) {
- if (!(sp = strchr(buffer, ' ')))
- continue;
- if (strncmp(++sp, symbol, len))
- continue;
- if (sp[len] != '\n' && sp[len] != '\t'
- && strncmp(sp+len, "_R", 2))
- continue;
- flagpos = (unsigned long) strtol(buffer, &sp, 16);
- /* printf("position is %lx\n", flagpos); */
- if (sp && *sp == ' ')
- return;
- fprintf(stderr, "rpcdebug: weird line in /proc/ksyms: %s\n",
- buffer);
- exit(1);
- }
-
- fprintf(stderr, "rpcdebug: debug symbol for module %s not found.\n",
- module);
- exit(1);
-}
-
-static char *
-strtolower(char *str)
-{
- static char temp[64];
- char *sp;
-
- strcpy(temp, str);
- for (sp = temp; *sp; sp++)
- *sp = tolower(*sp);
- return temp;
-}
-
-static void
-print_flags(char *module, unsigned int flags)
-{
- char *lastmod = NULL;
- int i;
-
- if (module) {
- printf("%-10s", strtolower(module));
- if (!flags) {
- printf("<no flags set>\n");
- return;
- }
- /* printf(" <%x>", flags); */
- }
-
- for (i = 0; flagmap[i].module; i++) {
- if (module) {
- if (strcasecmp(flagmap[i].module, module))
- continue;
- } else if (!lastmod || strcmp(lastmod, flagmap[i].module)) {
- if (lastmod)
- printf("\n");
- printf("%-10s", strtolower(flagmap[i].module));
- lastmod = flagmap[i].module;
- }
- if (!(flags & flagmap[i].value)
- || (module && !strcasecmp(flagmap[i].name, "all")))
- continue;
- printf(" %s", strtolower(flagmap[i].name));
- }
- printf("\n");
-}
-
-static void
-usage(int excode)
-{
- fprintf(stderr, "usage: rpcdebug [-m module] [-cs] flags ...\n");
- if (verbose) {
- printf("\nModule Valid flags\n");
- print_flags(NULL, ~(unsigned int) 0);
- }
- exit (excode);
-}
-
FLAG(RPC, AUTH),
FLAG(RPC, PMAP),
FLAG(RPC, SCHED),
+ FLAG(RPC, TRANS),
FLAG(RPC, SVCSOCK),
FLAG(RPC, SVCDSP),
FLAG(RPC, MISC),
+ FLAG(RPC, CACHE),
FLAG(RPC, ALL),
/* nfs */
FLAG(NFS, XDR),
FLAG(NFS, FILE),
FLAG(NFS, ROOT),
- // FLAG(NFS, CALLBACK),
+ FLAG(NFS, CALLBACK),
FLAG(NFS, ALL),
/* nfsd */
FLAG(NLM, CLNTSUBS),
FLAG(NLM, SVCSUBS),
FLAG(NLM, HOSTCACHE),
+ FLAG(NLM, XDR),
FLAG(NLM, ALL),
{ NULL, NULL, 0 }
--- /dev/null
+.\"
+.\" rpcdebug(8)
+.\"
+.\" By Greg Banks <gnb@melbourne.sgi.com>
+.\" Copyright (c) 2006 Silicon Graphics, Inc.
+.\" Derived from nfsstat.man which bore the message:
+.\" Copyright (C) 1996-2005 Olaf Kirch <okir@suse.de>
+.TH rpcdebug 8 "5 Jul 2006"
+.SH NAME
+rpcdebug \- set and clear NFS and RPC kernel debug flags
+.SH SYNOPSIS
+\fBrpcdebug\fP \fB\-vh\fP
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP \fB\-s\fP \fIflags\fP...
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP \fB\-c\fP \fIflags\fP...
+.br
+.SH DESCRIPTION
+The \fBrpcdebug\fP command allows an administrator to set and clear
+the Linux kernel's NFS client and server debug flags. Setting these
+flags causes the kernel to emit messages to the system log in response
+to NFS activity; this is typically useful when debugging NFS problems.
+.PP
+The first form in the synopsis can be used to list all available
+debug flags. The second form shows the currently set debug flags
+for the given module. The third form sets one or more flags, and
+the fourth form clears one or more flags.
+.PP
+The value \fBall\fP may be used to set or clear all the flags for
+the given module.
+.SH OPTIONS
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-c
+Clear the given debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-h
+Print a help message and exit. When combined with the \fB\-v\fP
+option, also prints the available debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.BI \-m " module"
+Specify which module's flags to set or clear. Available
+modules are:
+.RS
+.TP
+.BR nfsd
+The NFS server.
+.TP
+.BR nfs
+The NFS client.
+.TP
+.BR nlm
+The Network Lock Manager, in either an NFS client or server.
+.TP
+.BR rpc
+The Remote Procedure Call module, in either an NFS client or server.
+.RE
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-s
+Set the given debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-v
+Increase the verbosity of \fBrpcdebug\fP's output.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH FILES
+.TP
+.B /proc/sys/sunrpc/{rpc,nfs,nfsd,nlm}_debug
+procfs\-based interface to kernel debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH SEE ALSO
+.BR rpc.nfsd (8),
+.BR nfs (5),
+.BR syslogd (8).
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH BUGS
+Bugs can be found or reported at
+.BR http://nfs.sf.net/ .
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH AUTHOR
+Program by Olaf Kirch <okir@suse.de> and
+<frederic.jolly@bull.ext.net>.
+Manpage by Greg Banks <gnb@melbourne.sgi.com>.
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
#endif
if (Inline == 0)
return;
- /* May cause lint to complain. but ... */
- f_print(fout, "\t register int32_t *buf;\n\n");
}
static void
} else {
print_ifopen(indent, "array");
}
- print_ifarg("(char **)");
+ /* The (void*) avoids a gcc-4.1 warning */
+ print_ifarg("(char **)(void*)");
if (*objname == '&') {
f_print(fout, "%s.%s_val, (u_int *)%s.%s_len",
objname, name, objname, name);
char *sizestr, *plus;
char ptemp[256];
int can_inline;
+ const char *buf_declaration;
if (Inline == 0) {
for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
print_stat(1, &dl->decl);
} else {
-
- for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
- if (dl->decl.rel == REL_VECTOR) {
- f_print(fout, "\t int i;\n");
- break;
- }
size = 0;
can_inline = 0;
for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
i = 0;
size = 0;
sizestr = NULL;
+ buf_declaration = "int32_t *";
for (dl = def->def.st.decls; dl != NULL; dl = dl->next) { /* xxx */
/* now walk down the list and check for basic types */
/* were already looking at a xdr_inlineable structure */
if (sizestr == NULL)
- f_print(fout, "\t buf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
- size);
+ f_print(fout, "\t %sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
+ buf_declaration, size);
else if (size == 0)
f_print(fout,
- "\t buf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
- sizestr);
+ "\t %sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
+ buf_declaration, sizestr);
else
f_print(fout,
- "\t buf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
- size, sizestr);
+ "\t %sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
+ buf_declaration, size, sizestr);
+ buf_declaration = "";
f_print(fout, "\n\t if (buf == NULL) {\n");
/* were already looking at a xdr_inlineable structure */
if (sizestr == NULL)
- f_print(fout, "\t\tbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
- size);
+ f_print(fout, "\t\t%sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
+ buf_declaration, size);
else if (size == 0)
f_print(fout,
- "\t\tbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
- sizestr);
+ "\t\t%sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
+ buf_declaration, sizestr);
else
f_print(fout,
- "\t\tbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
- size, sizestr);
+ "\t\t%sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
+ buf_declaration, size, sizestr);
+ buf_declaration = "";
f_print(fout, "\n\t\tif (buf == NULL) {\n");
break;
case REL_VECTOR:
f_print(fout, "\t\t{ register %s *genp; \n", decl->type);
+ f_print(fout, "\t\t int i;\n");
f_print(fout, "\t\t for ( i = 0,genp=objp->%s;\n \t\t\ti < %s; i++){\n\t\t",
decl->name, decl->array_max);
emit_single_in_line(decl, flag, REL_VECTOR);
int freed=0;
if(flag == PUT)
- f_print(fout,"\t\t IXDR_PUT_");
+ f_print(fout,"\t\t (void) IXDR_PUT_");
else
if(rel== REL_ALIAS)
f_print(fout,"\t\t objp->%s = IXDR_GET_",decl->name);
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI";
#endif
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
write_bytes.h
gssd_LDADD = $(RPCSECGSS_LIBS) $(KRBLIBS)
-gssd_LDFLAGS =
+gssd_LDFLAGS = $(KRBLDFLAGS)
gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
$(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
$(RPCSECGSS_LIBS) -lnfsidmap \
$(KRBLIBS)
-svcgssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
+svcgssd_LDFLAGS = $(KRBLDFLAGS)
svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
$(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
gss_clnt_send_err_SOURCES = gss_clnt_send_err.c
+gss_clnt_send_err_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
+ $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
+
MAINTAINERCLEANFILES = Makefile.in
#######################################################################
"$(DESTDIR)$(man8dir)"
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(sbin_PROGRAMS)
-am_gss_clnt_send_err_OBJECTS = gss_clnt_send_err.$(OBJEXT)
+am_gss_clnt_send_err_OBJECTS = \
+ gss_clnt_send_err-gss_clnt_send_err.$(OBJEXT)
gss_clnt_send_err_OBJECTS = $(am_gss_clnt_send_err_OBJECTS)
gss_clnt_send_err_LDADD = $(LDADD)
am__objects_1 = gssd-context.$(OBJEXT) gssd-context_mit.$(OBJEXT) \
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
write_bytes.h
gssd_LDADD = $(RPCSECGSS_LIBS) $(KRBLIBS)
-gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
+gssd_LDFLAGS = $(KRBLDFLAGS)
gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
$(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
$(RPCSECGSS_LIBS) -lnfsidmap \
$(KRBLIBS)
-svcgssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib
+svcgssd_LDFLAGS = $(KRBLDFLAGS)
svcgssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
$(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
gss_clnt_send_err_SOURCES = gss_clnt_send_err.c
+gss_clnt_send_err_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
+ $(RPCSECGSS_CFLAGS) $(KRBCFLAGS)
+
MAINTAINERCLEANFILES = Makefile.in
all: all-am
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gss_clnt_send_err.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssd-context.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssd-context_heimdal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssd-context_mit.Po@am__quote@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+gss_clnt_send_err-gss_clnt_send_err.o: gss_clnt_send_err.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gss_clnt_send_err_CFLAGS) $(CFLAGS) -MT gss_clnt_send_err-gss_clnt_send_err.o -MD -MP -MF "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo" -c -o gss_clnt_send_err-gss_clnt_send_err.o `test -f 'gss_clnt_send_err.c' || echo '$(srcdir)/'`gss_clnt_send_err.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo" "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Po"; else rm -f "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gss_clnt_send_err.c' object='gss_clnt_send_err-gss_clnt_send_err.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gss_clnt_send_err_CFLAGS) $(CFLAGS) -c -o gss_clnt_send_err-gss_clnt_send_err.o `test -f 'gss_clnt_send_err.c' || echo '$(srcdir)/'`gss_clnt_send_err.c
+
+gss_clnt_send_err-gss_clnt_send_err.obj: gss_clnt_send_err.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gss_clnt_send_err_CFLAGS) $(CFLAGS) -MT gss_clnt_send_err-gss_clnt_send_err.obj -MD -MP -MF "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo" -c -o gss_clnt_send_err-gss_clnt_send_err.obj `if test -f 'gss_clnt_send_err.c'; then $(CYGPATH_W) 'gss_clnt_send_err.c'; else $(CYGPATH_W) '$(srcdir)/gss_clnt_send_err.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo" "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Po"; else rm -f "$(DEPDIR)/gss_clnt_send_err-gss_clnt_send_err.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gss_clnt_send_err.c' object='gss_clnt_send_err-gss_clnt_send_err.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gss_clnt_send_err_CFLAGS) $(CFLAGS) -c -o gss_clnt_send_err-gss_clnt_send_err.obj `if test -f 'gss_clnt_send_err.c'; then $(CYGPATH_W) 'gss_clnt_send_err.c'; else $(CYGPATH_W) '$(srcdir)/gss_clnt_send_err.c'; fi`
+
gssd-context.o: context.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gssd_CFLAGS) $(CFLAGS) -MT gssd-context.o -MD -MP -MF "$(DEPDIR)/gssd-context.Tpo" -c -o gssd-context.o `test -f 'context.c' || echo '$(srcdir)/'`context.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gssd-context.Tpo" "$(DEPDIR)/gssd-context.Po"; else rm -f "$(DEPDIR)/gssd-context.Tpo"; exit 1; fi
#include <time.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>
#include "err_util.h"
void qword_add(char **bpp, int *lp, char *str)
return 0;
}
+#define READLINE_BUFFER_INCREMENT 2048
+
int readline(int fd, char **buf, int *lenp)
{
/* read a line into *buf, which is malloced *len long
int len;
if (*lenp == 0) {
- char *b = malloc(128);
+ char *b = malloc(READLINE_BUFFER_INCREMENT);
if (b == NULL)
return 0;
*buf = b;
- *lenp = 128;
+ *lenp = READLINE_BUFFER_INCREMENT;
}
len = read(fd, *buf, *lenp);
if (len <= 0) {
- printerr(2, "read error in readline: %d\n", len);
+ printerr(0, "readline: read error: len %d errno %d (%s)\n",
+ len, errno, strerror(errno));
return 0;
}
while ((*buf)[len-1] != '\n') {
*/
char *new;
int nl;
- *lenp += 128;
+ *lenp += READLINE_BUFFER_INCREMENT;
new = realloc(*buf, *lenp);
if (new == NULL)
return 0;
*buf = new;
nl = read(fd, *buf +len, *lenp - len);
if (nl <= 0 ) {
- printerr(2, "read error in readline: %d\n", nl);
+ printerr(0, "readline: read error: len %d "
+ "errno %d (%s)\n", nl, errno, strerror(errno));
return 0;
}
len += nl;
}
(*buf)[len-1] = 0;
- printerr(1, "read line with %d characters:\n%s\n", *lenp, *buf);
+ printerr(3, "readline: read %d chars into buffer of size %d:\n%s\n",
+ len, *lenp, *buf);
return 1;
}
uint64_t seq_recv; /* gssint_uint64 */
void *seqstate;
krb5_auth_context auth_context;
- gss_buffer_desc *mech_used; /* gss_OID_desc */
+ gss_OID_desc *mech_used; /* gss_OID_desc */
/* Protocol spec revision
0 => RFC 1964 with 3DES and RC4 enhancements
1 => draft-ietf-krb-wg-gssapi-cfx-01
int established;
int big_endian;
krb5_auth_context auth_context;
- gss_buffer_desc *mech_used;
+ gss_OID_desc *mech_used;
int nctypes;
krb5_cksumtype *ctypes;
} krb5_gss_ctx_id_rec, *krb5_gss_ctx_id_t;
if (WRITE_BYTES(&p, end, kctx->endtime)) goto out_err;
word_seq_send = kctx->seq_send;
if (WRITE_BYTES(&p, end, word_seq_send)) goto out_err;
- if (write_buffer(&p, end, kctx->mech_used)) goto out_err;
+ if (write_oid(&p, end, kctx->mech_used)) goto out_err;
printerr(2, "serialize_krb5_ctx: serializing keys with "
"enctype %d and length %d\n",
static int fg = 0;
static char message_buf[500];
-static char tmp_buf[500];
void initerr(char *progname, int set_verbosity, int set_fg)
{
openlog(progname, LOG_PID, LOG_DAEMON);
}
+
void printerr(int priority, char *format, ...)
{
va_list args;
int ret;
+ int buf_used, buf_available;
+ char *buf;
+
+ /* Don't bother formatting a message we're never going to print! */
+ if (priority > verbosity)
+ return;
+
+ buf_used = strlen(message_buf);
+ /* subtract 4 to leave room for "...\n" if necessary */
+ buf_available = sizeof(message_buf) - buf_used - 4;
+ buf = message_buf + buf_used;
- /* aggregate lines: only print buffer when we get to the end of a
- * line or run out of space: */
+ /*
+ * Aggregate lines: only print buffer when we get to the
+ * end of a line or run out of space
+ */
va_start(args, format);
- ret = vsnprintf(tmp_buf, sizeof(tmp_buf), format, args);
+ ret = vsnprintf(buf, buf_available, format, args);
va_end(args);
- if ((ret < 0) || (ret >= sizeof(tmp_buf)))
- goto output;
- if (strlen(tmp_buf) + strlen(message_buf) + 1 > sizeof(message_buf))
- goto output;
- strcat(message_buf, tmp_buf);
- if (tmp_buf[strlen(tmp_buf) - 1] == '\n')
- goto output;
+
+ if (ret < 0)
+ goto printit;
+ if (ret >= buf_available) {
+ /* Indicate we're truncating */
+ strcat(message_buf, "...\n");
+ goto printit;
+ }
+ if (message_buf[strlen(message_buf) - 1] == '\n')
+ goto printit;
return;
-output:
- priority -= verbosity;
- if (priority < 0)
- priority = 0;
+printit:
if (fg) {
- if (priority == 0)
- fprintf(stderr, "%s", message_buf);
+ fprintf(stderr, "%s", message_buf);
} else {
- int sys_pri;
- switch (priority) {
- case 0:
- sys_pri = LOG_ERR;
- break;
- case 1:
- sys_pri = LOG_DEBUG;
- break;
- default:
- goto out;
- }
- syslog(sys_pri, "%s", message_buf);
+ syslog(LOG_ERR, "%s", message_buf);
}
-out:
+ /* reset the buffer */
memset(message_buf, 0, sizeof(message_buf));
}
return (maj_stat == GSS_S_COMPLETE);
}
+
+int gssd_check_mechs(void)
+{
+ u_int32_t maj_stat, min_stat;
+ gss_OID_set supported_mechs = GSS_C_NO_OID_SET;
+ int retval = -1;
+
+ maj_stat = gss_indicate_mechs(&min_stat, &supported_mechs);
+ if (maj_stat != GSS_S_COMPLETE) {
+ printerr(0, "Unable to obtain list of supported mechanisms. "
+ "Check that gss library is properly configured.\n");
+ goto out;
+ }
+ if (supported_mechs == GSS_C_NO_OID_SET ||
+ supported_mechs->count == 0) {
+ printerr(0, "Unable to obtain list of supported mechanisms. "
+ "Check that gss library is properly configured.\n");
+ goto out;
+ }
+ maj_stat = gss_release_oid_set(&min_stat, &supported_mechs);
+ retval = 0;
+out:
+ return retval;
+}
+
int gssd_acquire_cred(char *server_name);
void pgsserr(char *msg, u_int32_t maj_stat, u_int32_t min_stat,
const gss_OID mech);
+int gssd_check_mechs(void);
#endif /* _GSS_UTIL_H_ */
"support setting debug level\n");
#endif
+ if (gssd_check_mechs() != 0)
+ errx(1, "Problem with gssapi library");
+
if (!fg && daemon(0, 0) < 0)
errx(1, "fork");
/* Create the context as the user (not as root) */
save_uid = geteuid();
- if (seteuid(uid) != 0) {
- printerr(0, "WARNING: Failed to seteuid for "
+ if (setfsuid(uid) != 0) {
+ printerr(0, "WARNING: Failed to setfsuid for "
"user with uid %d\n", uid);
goto out_fail;
}
- printerr(2, "creating context using euid %d (save_uid %d)\n",
- geteuid(), save_uid);
+ printerr(2, "creating context using fsuid %d (save_uid %d)\n",
+ uid, save_uid);
sec.qop = GSS_C_QOP_DEFAULT;
sec.svc = RPCSEC_GSS_SVC_NONE;
gss_release_cred(&min_stat, &sec.cred);
if (a != NULL) freeaddrinfo(a);
/* Restore euid to original value */
- if ((save_uid != -1) && (seteuid(save_uid) != 0)) {
- printerr(0, "WARNING: Failed to restore euid"
- " to uid %d\n", save_uid);
+ if ((save_uid != -1) && (setfsuid(save_uid) != uid)) {
+ printerr(0, "WARNING: Failed to restore fsuid"
+ " to uid %d from %d\n", save_uid, uid);
}
return retval;
{
u_int maj_stat, min_stat;
gss_cred_id_t credh;
+ gss_OID_set_desc desired_mechs;
krb5_enctype enctypes[] = { ENCTYPE_DES_CBC_CRC };
int num_enctypes = sizeof(enctypes) / sizeof(enctypes[0]);
+ /* We only care about getting a krb5 cred */
+ desired_mechs.count = 1;
+ desired_mechs.elements = &krb5oid;
+
maj_stat = gss_acquire_cred(&min_stat, NULL, 0,
- GSS_C_NULL_OID_SET, GSS_C_INITIATE,
+ &desired_mechs, GSS_C_INITIATE,
&credh, NULL, NULL);
if (maj_stat != GSS_S_COMPLETE) {
"support setting debug level\n");
#endif
+ if (gssd_check_mechs() != 0) {
+ printerr(0, "ERROR: Problem with gssapi library\n");
+ exit(1);
+ }
+
if (!fg)
mydaemon(0, 0);
return -1;
}
*bp = '\0';
- printerr(1, "writing message: %s", buf);
+ printerr(3, "writing message: %s", buf);
if (write(g, buf, bp - buf) == -1) {
printerr(0, "WARNING: failed to write message\n");
close(g);
nfs4_init_name_mapping(NULL); /* XXX: should only do this once */
res = nfs4_gss_princ_to_ids(secname, sname, &uid, &gid);
if (res < 0) {
- printerr(0, "WARNING: get_ids: failed to map name '%s' "
- "to uid/gid: %s\n", sname, strerror(-res));
/*
* -ENOENT means there was no mapping, any other error
* value means there was an error trying to do the
* mapping.
+ * If there was no mapping, we send down the value -1
+ * to indicate that the anonuid/anongid for the export
+ * should be used.
*/
if (res == -ENOENT) {
- cred->cr_uid = 65534; /* XXX */
- cred->cr_gid = 65534; /* XXX */
- cred->cr_groups[0] = 65534;/* XXX */
- cred->cr_ngroups = 1;
+ cred->cr_uid = -1;
+ cred->cr_gid = -1;
+ cred->cr_ngroups = 0;
res = 0;
goto out_free;
}
+ printerr(0, "WARNING: get_ids: failed to map name '%s' "
+ "to uid/gid: %s\n", sname, strerror(-res));
goto out_free;
}
cred->cr_uid = uid;
int len = (int)arg->length; /* make an int out of size_t */
if (WRITE_BYTES(p, end, len))
return -1;
- if (*p + arg->length > end)
+ if (*p + len > end)
return -1;
memcpy(*p, arg->value, len);
*p += len;
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
errx(1, "Could not find group \"%s\"", nobodygroup);
nobodygid = gr->gr_gid;
+#ifdef HAVE_NFS4_SET_DEBUG
nfs4_set_debug(verbose, idmapd_warnx);
+#endif
if (conf_path == NULL)
conf_path = _PATH_IDMAPDCONF;
if (nfs4_init_name_mapping(conf_path))
struct idmap_client *ic = data;
struct idmap_msg im;
u_char buf[IDMAP_MAXMSGSZ + 1];
- size_t len, bsiz;
+ size_t len;
+ ssize_t bsiz;
char *bp, typebuf[IDMAP_MAXMSGSZ],
buf1[IDMAP_MAXMSGSZ], authbuf[IDMAP_MAXMSGSZ], *p;
unsigned long tmp;
/* Get rid of newline and terminate buffer*/
buf[len - 1] = '\0';
- bp = buf;
+ bp = (char *)buf;
memset(&im, 0, sizeof(im));
imconv(ic, &im);
buf[0] = '\0';
- bp = buf;
+ bp = (char *)buf;
bsiz = sizeof(buf);
/* Authentication name */
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
if (failed)
return NULL;
memset(fh.fh_handle, 0, sizeof(fh.fh_handle));
- fh.fh_size = qword_get(&bp, fh.fh_handle, NFS3_FHSIZE);
+ fh.fh_size = qword_get(&bp, (char *)fh.fh_handle, NFS3_FHSIZE);
return &fh;
}
+++ /dev/null
-/*
- * mount_xdr XDR procedures for mountd.
- *
- * Originally generated by rpcgen; edited to get rid of warnings.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mount.h>
-
-inline bool_t
-xdr_fhandle(XDR *xdrs, fhandle objp)
-{
- return xdr_opaque(xdrs, objp, FHSIZE);
-}
-
-bool_t
-xdr_fhstatus(XDR *xdrs, fhstatus *objp)
-{
- return xdr_u_int(xdrs, &objp->fhs_status) &&
- (objp->fhs_status != 0 ||
- xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle));
-}
-
-bool_t
-xdr_dirpath(XDR *xdrs, dirpath *objp)
-{
- return xdr_string(xdrs, objp, MNTPATHLEN);
-}
-
-inline bool_t
-xdr_name(XDR *xdrs, name *objp)
-{
- return xdr_string(xdrs, objp, MNTPATHLEN);
-}
-
-bool_t
-xdr_mountlist(XDR *xdrs, mountlist *objp)
-{
- return xdr_pointer(xdrs, (char **)objp, sizeof(struct mountbody),
- (xdrproc_t)xdr_mountbody);
-}
-
-bool_t
-xdr_mountbody(XDR *xdrs, mountbody *objp)
-{
- return xdr_name(xdrs, &objp->ml_hostname) &&
- xdr_dirpath(xdrs, &objp->ml_directory) &&
- xdr_mountlist(xdrs, &objp->ml_next);
-}
-
-bool_t
-xdr_groups(XDR *xdrs, groups *objp)
-{
- return xdr_pointer(xdrs, (char **)objp, sizeof(struct groupnode),
- (xdrproc_t)xdr_groupnode);
-}
-
-bool_t
-xdr_groupnode(XDR *xdrs, groupnode *objp)
-{
- return xdr_name(xdrs, &objp->gr_name) &&
- xdr_groups(xdrs, &objp->gr_next);
-}
-
-bool_t
-xdr_exports(XDR *xdrs, exports *objp)
-{
- return xdr_pointer(xdrs, (char **)objp, sizeof(struct exportnode),
- (xdrproc_t)xdr_exportnode);
-}
-
-bool_t
-xdr_exportnode(XDR *xdrs, exportnode *objp)
-{
- return xdr_dirpath(xdrs, &objp->ex_dir) &&
- xdr_groups(xdrs, &objp->ex_groups) &&
- xdr_exports(xdrs, &objp->ex_next);
-}
static void usage(const char *, int exitcode);
static exports get_exportlist(void);
-static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, int *, int v3);
+static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, mountstat3 *, int v3);
int new_cache = 0;
struct nfs_fh_len *fh;
xlog(D_CALL, "MNT3(%s) called", *path);
- if ((fh = get_rootfh(rqstp, path, (int *) &res->fhs_status, 1)) != NULL) {
+ if ((fh = get_rootfh(rqstp, path, &res->fhs_status, 1)) != NULL) {
struct mountres3_ok *ok = &res->mountres3_u.mountinfo;
ok->fhandle.fhandle3_len = fh->fh_size;
- ok->fhandle.fhandle3_val = fh->fh_handle;
+ ok->fhandle.fhandle3_val = (char *)fh->fh_handle;
ok->auth_flavors.auth_flavors_len
= sizeof(flavors)/sizeof(flavors[0]);
ok->auth_flavors.auth_flavors_val = flavors;
}
static struct nfs_fh_len *
-get_rootfh(struct svc_req *rqstp, dirpath *path, int *error, int v3)
+get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
{
struct sockaddr_in *sin =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
static unsigned int cltv3info[24]; /* NFSv3 call counts ([0] == 22) */
static unsigned int svcv4info[4]; /* NFSv4 call counts ([0] == 2) */
static unsigned int cltv4info[34]; /* NFSv4 call counts ([0] == 32) */
+static unsigned int svcv4opinfo[42];/* NFSv4 call counts ([0] == 40) */
static unsigned int svcnetinfo[5]; /* 0 # of received packets
* 1 UDP packets
* 2 TCP packets
"statfs", "readlink", "readdir", "server_caps", "delegreturn",
};
+static const char * nfssvrv4opname[40] = {
+ "op0-unused", "op1-unused", "op2-future", "access", "close", "commit",
+ "create", "delegpurge", "delegreturn", "getattr", "getfh", "link",
+ "lock", "lockt", "locku", "lookup", "lookup_root", "nverify",
+ "open", "openattr", "open_conf", "open_dgrd", "putfh", "putpubfh",
+ "putrootfh", "read", "readdir", "readlink", "remove", "rename",
+ "renew", "restorefh", "savefh", "secinfo", "setattr", "setcltid",
+ "setcltidconf", "verify", "write", "rellockowner"
+};
+
typedef struct statinfo {
char *tag;
int nrvals;
{ "proc2", STRUCTSIZE(svcv2info), svcv2info },
{ "proc3", STRUCTSIZE(svcv3info), svcv3info },
{ "proc4", STRUCTSIZE(svcv4info), svcv4info },
+ { "proc4ops", STRUCTSIZE(svcv4opinfo),svcv4opinfo},
{ NULL, 0, NULL }
};
"Server nfs v3:\n",
nfsv3name, svcv3info + 1, sizeof(nfsv3name)/sizeof(char *)
);
- if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0]))
+ if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0])) {
print_callstats(
"Server nfs v4:\n",
nfssvrv4name, svcv4info + 1, sizeof(nfssvrv4name)/sizeof(char *)
);
+ print_callstats(
+ "Server nfs v4 operations:\n",
+ nfssvrv4opname, svcv4opinfo + 1, sizeof(nfssvrv4opname)/sizeof(char *)
+ );
+ }
}
}
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)nhfsstone.c 1.22 90/05/08 Copyright (c) 1990, Legato Systems Inc";
#endif
* Ported to Linux by Olaf Kirch <okir@monad.swb.de>
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int pid; /* process id */
int delay; /* msecs since last checked current time */
int randnum; /* a random number */
+#if HAVE_SIGPROCMASK
+ sigset_t oldmask; /* saved signal mask */
+#else
int oldmask; /* saved signal mask */
+#endif
int sampletime; /* secs between reading kernel stats */
char *opts; /* option parsing */
int pct;
(void) signal(SIGINT, cleanup);
(void) signal(SIGUSR1, startup);
+#if HAVE_SIGPROCMASK
+ {
+ sigset_t mask;
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGUSR1);
+ sigprocmask(SIG_BLOCK, &mask, &oldmask);
+ }
+#else
+ /*
+ * sigblock() is marked deprecated in modern
+ * glibc and hence generates a warning.
+ */
oldmask = sigblock(sigmask(SIGUSR1));
+#endif
if (ncalls == 0) {
if (runtime == 0) {
exit(1);
}
+#if HAVE_SIGPROCMASK
+ sigsuspend(&oldmask);
+#else
sigpause(oldmask);
+#endif
/*
* Initialize counters
## Process this file with automake to produce Makefile.in
+RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
+
+GENFILES_XDR = rquota_xdr.c
+GENFILES_H = rquota.h
+
+BUILT_SOURCES = $(GENFILES_H)
+
+GENFILES = $(GENFILES_XDR) $(GENFILES_H)
man8_MANS = rquotad.man
RPCPREFIX = rpc.
EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir
rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \
- hasquota.c mntent.h pathnames.h rquota.h
+ hasquota.c mntent.h rquota.h
rquotad_LDADD = ../../support/export/libexport.a \
../../support/nfs/libnfs.a \
../../support/misc/libmisc.a \
MAINTAINERCLEANFILES = Makefile.in
+
+$(RPCGEN):
+ make -C $(top_srcdir)/tools/rpcgen all
+
+$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -c -o $@ $<
+
+
+$(GENFILES_H): %.h: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -h -o $@ $<
+
#######################################################################
# The following allows the current practice of having
# daemons renamed during the install to include RPCPREFIX
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
statedir = @statedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
+GENFILES_XDR = rquota_xdr.c
+GENFILES_H = rquota.h
+BUILT_SOURCES = $(GENFILES_H)
+GENFILES = $(GENFILES_XDR) $(GENFILES_H)
man8_MANS = rquotad.man
RPCPREFIX = rpc.
KPREFIX = @kprefix@
EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir
rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \
- hasquota.c mntent.h pathnames.h rquota.h
+ hasquota.c mntent.h rquota.h
rquotad_LDADD = ../../support/export/libexport.a \
../../support/nfs/libnfs.a \
-I$(top_srcdir)/support/export
MAINTAINERCLEANFILES = Makefile.in
-all: all-am
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
fi; \
done
check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
-install: install-am
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
uninstall-man uninstall-man8 uninstall-sbinPROGRAMS
+$(RPCGEN):
+ make -C $(top_srcdir)/tools/rpcgen all
+
+$(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -c -o $@ $<
+
+$(GENFILES_H): %.h: %.x $(RPCGEN)
+ test -f $@ && rm -rf $@ || true
+ $(RPCGEN) -h -o $@ $<
+
#######################################################################
# The following allows the current practice of having
# daemons renamed during the install to include RPCPREFIX
+++ /dev/null
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * 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.
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- *
- * @@(#)pathnames.h 5.3 (Berkeley) 6/1/90
- */
-
-#include <paths.h>
-
-#undef _PATH_TMP
-#define _PATH_TMP "/tmp/EdP.aXXXXXX"
+++ /dev/null
-#define RQ_PATHLEN 1024
-
-struct getquota_args {
- char *gqa_pathp;
- int gqa_uid;
-};
-typedef struct getquota_args getquota_args;
-bool_t xdr_getquota_args();
-
-
-struct ext_getquota_args {
- char *gqa_pathp;
- int gqa_type;
- int gqa_id;
-};
-typedef struct ext_getquota_args ext_getquota_args;
-bool_t xdr_ext_getquota_args();
-
-
-struct rquota {
- int rq_bsize;
- bool_t rq_active;
- u_int rq_bhardlimit;
- u_int rq_bsoftlimit;
- u_int rq_curblocks;
- u_int rq_fhardlimit;
- u_int rq_fsoftlimit;
- u_int rq_curfiles;
- u_int rq_btimeleft;
- u_int rq_ftimeleft;
-};
-typedef struct rquota rquota;
-bool_t xdr_rquota();
-
-
-enum gqr_status {
- Q_OK = 1,
- Q_NOQUOTA = 2,
- Q_EPERM = 3,
-};
-typedef enum gqr_status gqr_status;
-bool_t xdr_gqr_status();
-
-
-struct getquota_rslt {
- gqr_status status;
- union {
- rquota gqr_rquota;
- } getquota_rslt_u;
-};
-typedef struct getquota_rslt getquota_rslt;
-bool_t xdr_getquota_rslt();
-
-
-#define RQUOTAPROG ((u_long)100011)
-#define RQUOTAVERS ((u_long)1)
-#define RQUOTAPROC_GETQUOTA ((u_long)1)
-extern getquota_rslt *rquotaproc_getquota_1();
-#define RQUOTAPROC_GETACTIVEQUOTA ((u_long)2)
-extern getquota_rslt *rquotaproc_getactivequota_1();
-#define EXT_RQUOTAVERS ((u_long)2)
-extern getquota_rslt *rquotaproc_getquota_2();
-extern getquota_rslt *rquotaproc_getactivequota_2();
-
return(&result);
}
-getquota_rslt *rquotaproc_getquota_1(getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getquota_1_svc(getquota_args *argp, struct svc_req *rqstp)
{
return(getquotainfo(0, (caddr_t *)argp, rqstp));
}
-getquota_rslt *rquotaproc_getactivequota_1(getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getactivequota_1_svc(getquota_args *argp, struct svc_req *rqstp)
{
return(getquotainfo(ACTIVE, (caddr_t *)argp, rqstp));
}
-getquota_rslt *rquotaproc_getquota_2(ext_getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getquota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp)
{
return(getquotainfo(TYPE_EXTENDED, (caddr_t *)argp, rqstp));
}
-getquota_rslt *rquotaproc_getactivequota_2(ext_getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getactivequota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp)
{
return(getquotainfo(TYPE_EXTENDED | ACTIVE, (caddr_t *)argp, rqstp));
}
#define SIG_PF void(*)(int)
#endif
-extern getquota_rslt *rquotaproc_getquota_1(getquota_args *argp,
- struct svc_req *rqstp);
-extern getquota_rslt *rquotaproc_getactivequota_1(getquota_args *argp,
- struct svc_req *rqstp);
-extern getquota_rslt *rquotaproc_getquota_2(ext_getquota_args *argp,
- struct svc_req *rqstp);
-extern getquota_rslt *rquotaproc_getactivequota_2(ext_getquota_args *argp,
- struct svc_req *rqstp);
-
static struct option longopts[] =
{
{ "help", 0, 0, 'h' },
case RQUOTAPROC_GETQUOTA:
xdr_argument = (xdrproc_t) xdr_getquota_args;
xdr_result = (xdrproc_t) xdr_getquota_rslt;
- local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_1;
+ local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_1_svc;
break;
case RQUOTAPROC_GETACTIVEQUOTA:
xdr_argument = (xdrproc_t) xdr_getquota_args;
xdr_result = (xdrproc_t) xdr_getquota_rslt;
- local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_1;
+ local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_1_svc;
break;
default:
case RQUOTAPROC_GETQUOTA:
xdr_argument = (xdrproc_t) xdr_ext_getquota_args;
xdr_result = (xdrproc_t) xdr_getquota_rslt;
- local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_2;
+ local = (char *(*)(char *, struct svc_req *)) rquotaproc_getquota_2_svc;
break;
case RQUOTAPROC_GETACTIVEQUOTA:
xdr_argument = (xdrproc_t) xdr_ext_getquota_args;
xdr_result = (xdrproc_t) xdr_getquota_rslt;
- local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_2;
+ local = (char *(*)(char *, struct svc_req *)) rquotaproc_getactivequota_2_svc;
break;
default:
+++ /dev/null
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <rpc/rpc.h>
-#include "rquota.h"
-
-
-bool_t
-xdr_getquota_args(xdrs, objp)
- XDR *xdrs;
- getquota_args *objp;
-{
- if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) {
- return (FALSE);
- }
- if (!xdr_int(xdrs, &objp->gqa_uid)) {
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-
-
-bool_t
-xdr_ext_getquota_args(xdrs, objp)
- XDR *xdrs;
- ext_getquota_args *objp;
-{
- if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) {
- return (FALSE);
- }
- if (!xdr_int(xdrs, &objp->gqa_type)) {
- return (FALSE);
- }
- if (!xdr_int(xdrs, &objp->gqa_id)) {
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-
-
-bool_t
-xdr_rquota(xdrs, objp)
- XDR *xdrs;
- rquota *objp;
-{
- if (!xdr_int(xdrs, &objp->rq_bsize)) {
- return (FALSE);
- }
- if (!xdr_bool(xdrs, &objp->rq_active)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_bhardlimit)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_curblocks)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_fhardlimit)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_curfiles)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_btimeleft)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->rq_ftimeleft)) {
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-
-
-bool_t
-xdr_gqr_status(xdrs, objp)
- XDR *xdrs;
- gqr_status *objp;
-{
- if (!xdr_enum(xdrs, (enum_t *)objp)) {
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-
-
-bool_t
-xdr_getquota_rslt(xdrs, objp)
- XDR *xdrs;
- getquota_rslt *objp;
-{
- if (!xdr_gqr_status(xdrs, &objp->status)) {
- return (FALSE);
- }
- switch (objp->status) {
- case Q_OK:
- if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota)) {
- return (FALSE);
- }
- break;
- case Q_NOQUOTA:
- break;
- case Q_EPERM:
- break;
- default:
- return (FALSE);
- }
- return (TRUE);
-}
-
-
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
K5VERS = @K5VERS@
KRBCFLAGS = @KRBCFLAGS@
KRBDIR = @KRBDIR@
+KRBLDFLAGS = @KRBLDFLAGS@
KRBLIBS = @KRBLIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
static pid_t mypid;
/* Turns on logging to console/stderr. */
+#if 0
static int opt_debug = 0; /* Will be command-line option, eventually */
+#endif
void log_init()
{
clnt = NL_NEXT(clnt);
}
+#ifdef RESTRICTED_STATD
failure:
+#endif
note(N_WARNING, "Received erroneous SM_UNMON request from %s for %s",
my_name, mon_name);
return (&result);
dprintf(N_DEBUG, "SM_UNMON_ALL request from %s with no "
"SM_MON requests from it.", my_name);
}
+#ifdef RESTRICTED_STATD
failure:
+#endif
return (&result);
}
#include "log.h"
#include "ha-callout.h"
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
#define MAXMSGSIZE (2048 / sizeof(unsigned int))
static unsigned long xid = 0; /* RPC XID counter */
struct rpc_msg mesg;
notify_list *lp = NULL;
XDR xdr, *xdrs = &xdr;
- int alen = sizeof(*sin);
+ socklen_t alen = sizeof(*sin);
/* Receive message */
if ((msglen = recvfrom(sockfd, msgbuf, sizeof(msgbuf), 0,
* two copies of each - one in main(), one static in log.c...
* It also eliminates the 256-char static in log.c */
char *name_p = NULL;
-char *version_p = NULL;
+const char *version_p = NULL;
/* PRC: a high-availability callout program can be specified with -H
* When this is done, the program will receive callouts whenever clients
#endif
if (!(run_mode & MODE_NODAEMON)) {
- int filedes, fdmax, tempfd;
+ int tempfd;
if (pipe(pipefds)<0) {
perror("statd: unable to create pipe");
* as to why they're global.
*/
extern char *name_p; /* program basename */
-extern char *version_p; /* program version */
+extern const char *version_p; /* program version */
extern int re_notify; /* time to re-read notify list */
change_state (void)
{
int fd, size;
- extern short int restart;
if ((fd = open (SM_STAT_PATH, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) == -1)
die ("open (%s): %s", SM_STAT_PATH, strerror (errno));