From ba2d04e42f22276f0c990a4c2ce56c647ba9c235 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 26 Dec 2006 21:03:50 +0100 Subject: [PATCH] Imported Debian patch 1.0.10-6~quilt.0 --- debian/bzero.patch | 11 - debian/changelog | 36 +++ debian/control | 19 +- debian/nhfsstone.dirs | 1 - debian/nhfsstone.install | 2 - debian/patches/01-bzero.patch | 13 ++ .../02-document-debian-init-scripts.patch | 14 ++ debian/patches/03-minor-manpage-fixes.patch | 128 +++++++++++ .../patches/04-document-sensitive-uids.patch | 18 ++ .../05-refuse-non-ident-maptypes.patch | 17 ++ .../patches/06-fix-no-tcp-short-option.patch | 13 ++ debian/patches/series | 6 + debian/rules | 17 +- utils/exportfs/exports.man | 12 +- utils/mountd/cache.c | 6 - utils/mountd/mountd.c | 2 +- utils/nfsstat/nfsstat.man | 42 ++-- utils/rquotad/rquota.h | 155 ------------- utils/rquotad/rquota_xdr.c | 215 ------------------ utils/showmount/showmount.man | 2 +- 20 files changed, 280 insertions(+), 449 deletions(-) delete mode 100644 debian/bzero.patch delete mode 100644 debian/nhfsstone.dirs delete mode 100644 debian/nhfsstone.install create mode 100644 debian/patches/01-bzero.patch create mode 100644 debian/patches/02-document-debian-init-scripts.patch create mode 100644 debian/patches/03-minor-manpage-fixes.patch create mode 100644 debian/patches/04-document-sensitive-uids.patch create mode 100644 debian/patches/05-refuse-non-ident-maptypes.patch create mode 100644 debian/patches/06-fix-no-tcp-short-option.patch create mode 100644 debian/patches/series delete mode 100644 utils/rquotad/rquota.h delete mode 100644 utils/rquotad/rquota_xdr.c diff --git a/debian/bzero.patch b/debian/bzero.patch deleted file mode 100644 index 0c7eac7..0000000 --- a/debian/bzero.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nfs-utils-1.0.9.orig/support/nfs/svc_socket.c -+++ nfs-utils-1.0.9/support/nfs/svc_socket.c -@@ -35,6 +35,8 @@ - # define __close(f) close ((f)) - #endif - -+#define __bzero(d,n) memset((d),'\0',(n)) -+ - static int - svc_socket (u_long number, int type, int protocol, int reuse) - { diff --git a/debian/changelog b/debian/changelog index d9024db..1ee9864 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,39 @@ +nfs-utils (1:1.0.10-6~quilt.0) experimental; urgency=low + + * Switch to quilt for patch management. + * Build-depend on quilt. + * Include /usr/share/quilt/quilt.make in debian/rules. + * Make the build target depend on "patch", and the clean target depend on + "unpatch". + * Replace debian/bzero.patch with debian/patches/01-bzero.patch (which + fixes the same issue but matches what we sent upstream), included + unconditionally. Also remove the debian/rules snippet to patch it. + * Split monolithic .diff.gz into diffs in debian/patches: + * 02-document-debian-init-scripts.patch: Make exports(5) man page + document that "/etc/init.d/nfs-kernel-server reload" works on Debian + and derivative distributions. + * 03-minor-manpage-fixes.patch: Misc. manpage fixes already sent + upstream, mostly with regard to - vs. \-. Will be included in 1.0.11. + * 04-document-sensitive-uids.patch: Document sensitive non-root uids and + gids. Will be included in 1.0.11. + * 05-refuse-non-ident-maptypes.patch: Give an error on non-ident map + types such as map_daemon. Pending inclusion upstream. + * 06-fix-no-tcp-short-option.patch: Fix the short option (-n) for + --no-tcp. Will be included in 1.0.11. + * Remove utils/rquotad/rquota.h and utils/rquotad/rquota_xdr.c on + debian/rules clean, to make sure they don't appear in the diff. + * Remove the nhfsstone package, as it is not fit for main; once upstream + removes it too (will happen in 1.0.11), this will fix #398058. + * Remove debian/nhfsstone.*. + * Remove nhfsstone section from debian/control. + * Remove the debhelper template copyright, as newer dh_make gives a + copyright exception. + * Change "#!/usr/bin/make -f" in debian/rules to "#! /usr/bin/make -f", for + good measure. + * Make indentation in debian/rules consistent. + + -- Steinar H. Gunderson Tue, 26 Dec 2006 21:03:50 +0100 + nfs-utils (1:1.0.10-5) unstable; urgency=medium * The NFS kernel server does not support uid mappings, activated with flags diff --git a/debian/control b/debian/control index 129400a..147881f 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Priority: standard Section: net Maintainer: Anibal Monsalve Salazar Uploaders: Steinar H. Gunderson , Daniel Baumann -Build-Depends: debhelper (>= 5), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev, libgssapi-dev, librpcsecgss-dev, perl, pkg-config +Build-Depends: debhelper (>= 5), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev, libgssapi-dev, librpcsecgss-dev, perl, pkg-config, quilt Build-Conflicts: librpcsecgss-dev (= 0.14-1) Standards-Version: 3.7.2 @@ -38,20 +38,3 @@ Description: NFS support files common to client and server . Homepage: http://nfs.sourceforge.net/ -Package: nhfsstone -Priority: extra -Architecture: any -Depends: nfs-common, ${shlibs:Depends} -Replaces: nfs-kernel-server -Description: NFS benchmark program - nhfsstone (pronounced n-f-s-stone, the "h" is silent) is used on a - NFS client to generate an artificial load with a particular mix of - NFS operations. It reports the average response time of the server - in milliseconds per call and the load in calls per second. The - program adjusts its calling patterns based on the client's kernel - NFS statistics and the elapsed time. Load can be generated over a - given time or number of NFS calls. - . - Upstream: SourceForge project "nfs", CVS module nfs-utils. - . - Homepage: http://nfs.sourceforge.net/ diff --git a/debian/nhfsstone.dirs b/debian/nhfsstone.dirs deleted file mode 100644 index 236670a..0000000 --- a/debian/nhfsstone.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/sbin diff --git a/debian/nhfsstone.install b/debian/nhfsstone.install deleted file mode 100644 index 27d18c5..0000000 --- a/debian/nhfsstone.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/sbin/nhfs* -debian/tmp/usr/share/man/man8/nhfs* diff --git a/debian/patches/01-bzero.patch b/debian/patches/01-bzero.patch new file mode 100644 index 0000000..655c166 --- /dev/null +++ b/debian/patches/01-bzero.patch @@ -0,0 +1,13 @@ +Index: nfs-utils-1.0.10/support/nfs/svc_socket.c +=================================================================== +--- nfs-utils-1.0.10.orig/support/nfs/svc_socket.c ++++ nfs-utils-1.0.10/support/nfs/svc_socket.c +@@ -64,7 +64,7 @@ svc_socket (u_long number, int type, int + } + } + +- __bzero ((char *) &addr, sizeof (addr)); ++ memset (&addr, 0, sizeof (addr)); + addr.sin_family = AF_INET; + + ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, diff --git a/debian/patches/02-document-debian-init-scripts.patch b/debian/patches/02-document-debian-init-scripts.patch new file mode 100644 index 0000000..f51cf78 --- /dev/null +++ b/debian/patches/02-document-debian-init-scripts.patch @@ -0,0 +1,14 @@ +Index: nfs-utils-1.0.10/utils/exportfs/exports.man +=================================================================== +--- nfs-utils-1.0.10.orig/utils/exportfs/exports.man ++++ nfs-utils-1.0.10/utils/exportfs/exports.man +@@ -29,6 +29,9 @@ double quotes. You can also specify spac + the export name using a backslash followed by the character code as three + octal digits. + .PP ++To apply changes to this file, run exportfs \-ra or /etc/init.d/nfs-kernel-server ++reload (the latter being a distribution-specific extension). ++.PP + .SS Machine Name Formats + NFS clients may be specified in a number of ways: + .IP "single host diff --git a/debian/patches/03-minor-manpage-fixes.patch b/debian/patches/03-minor-manpage-fixes.patch new file mode 100644 index 0000000..26632bd --- /dev/null +++ b/debian/patches/03-minor-manpage-fixes.patch @@ -0,0 +1,128 @@ +Index: nfs-utils-1.0.10/utils/exportfs/exports.man +=================================================================== +--- nfs-utils-1.0.10.orig/utils/exportfs/exports.man ++++ nfs-utils-1.0.10/utils/exportfs/exports.man +@@ -124,7 +124,7 @@ default. In all subsequence releases, + .I sync + is the default, and + .I async +-must be explicit requested if needed. ++must be explicitly requested if needed. + To help make system adminstrators aware of this change, 'exportfs' + will issue a warning if neither + .I sync +Index: nfs-utils-1.0.10/utils/nfsstat/nfsstat.man +=================================================================== +--- nfs-utils-1.0.10.orig/utils/nfsstat/nfsstat.man ++++ nfs-utils-1.0.10/utils/nfsstat/nfsstat.man +@@ -14,36 +14,36 @@ The + displays statistics kept about NFS client and server activity. + .SH OPTIONS + .TP +-.B -s, --server ++.B \-s, \-\-server + Print only server-side statistics. The default is to print both server and + client statistics. + .TP +-.B -c, --client ++.B \-c, \-\-client + Print only client-side statistics. + .TP +-.B -n, --nfs ++.B \-n, \-\-nfs + Print only NFS statistics. The default is to print both NFS and RPC + information. + .TP +-.B -2 ++.B \-2 + Print only NFS v2 statistics. The default is to only print information + about the versions of \fBNFS\fR that have non-zero counts. + .TP +-.B -3 ++.B \-3 + Print only NFS v3 statistics. + .TP +-.B -4 ++.B \-4 + Print only NFS v4 statistics. + .TP +-.B -m, --mounted ++.B \-m, \-\-mounted + Print information about each of the mounted \fBNFS\fR file systems. + + If this option is used, all other options are ignored. + .TP +-.B -r, --rpc ++.B \-r, \-\-rpc + Print only RPC statistics. + .TP +-.BI -o " facility ++.BI \-o " facility + Display statistics for the specified facility, which must be one of: + .RS + .TP +@@ -69,27 +69,27 @@ total number of lookups, and the number + Display all of the above facilities. + .RE + .TP +-.B -v, --verbose +-This is equivalent to \fB-o all\fR. ++.B \-v, \-\-verbose ++This is equivalent to \fB\-o all\fR. + .SH EXAMPLES + .TP +-.B nfsstat -o all -234 ++.B nfsstat \-o all \-234 + Show all information about all versions of \fBNFS\fR. + .TP +-.B nfsstat --verbose -234 ++.B nfsstat \-\-verbose \-234 + Same as above. + .TP +-.B nfsstat -o all ++.B nfsstat \-o all + Show all information about about active versions of \fBNFS\fR. + .TP +-.B nfsstat --nfs --server -3 ++.B nfsstat \-\-nfs \-\-server \-3 + Show statistics for \fBNFS\fR version 3 server. + .TP +-.B nfsstat -m ++.B nfsstat \-m + Show information about mounted \fBNFS\fR filesystems. + .\" --------------------- DISPLAY -------------------------------- + .SH DISPLAY +-The \fBFlags\fR output from the \fB-m\fR option is the same as the ++The \fBFlags\fR output from the \fB\-m\fR option is the same as the + flags give to the \fBmount\fR command. + .\" --------------------- FILES ---------------------------------- + .SH FILES +@@ -111,11 +111,11 @@ interface to the mounted filesystems. + .BR nfs (5). + .\" ---------------------- BUGS ---------------------------------- + .SH BUGS +-The default output has be changed. To get the old default output you must run \fBnfsstat --auto -2\fR. ++The default output has be changed. To get the old default output you must run \fBnfsstat \-\-auto \-2\fR. + .P +-The function of the \fB-v\fR and \fB-a\fR options have changed. The \fB-a\fR option +-is now reserved for future use. The \fB-v\fR does what the \fB-a\fR option used to do, +-and the new \fB-[234]\fR options replace the \fB-v\fR option. ++The function of the \fB\-v\fR and \fB\-a\fR options have changed. The \fB\-a\fR option ++is now reserved for future use. The \fB\-v\fR does what the \fB\-a\fR option used to do, ++and the new \fB\-[234]\fR options replace the \fB\-v\fR option. + .P + The \fBDisplay\fR section should be more complete. + .P +Index: nfs-utils-1.0.10/utils/showmount/showmount.man +=================================================================== +--- nfs-utils-1.0.10.orig/utils/showmount/showmount.man ++++ nfs-utils-1.0.10/utils/showmount/showmount.man +@@ -21,7 +21,7 @@ lists the set of clients who are mountin + The output from + .B showmount + is designed to +-appear as though it were processed through ``sort -u''. ++appear as though it were processed through ``sort \-u''. + .SH OPTIONS + .TP + .BR \-a " or " \-\-all diff --git a/debian/patches/04-document-sensitive-uids.patch b/debian/patches/04-document-sensitive-uids.patch new file mode 100644 index 0000000..3ce7daf --- /dev/null +++ b/debian/patches/04-document-sensitive-uids.patch @@ -0,0 +1,18 @@ +Index: nfs-utils-1.0.10/utils/exportfs/exports.man +=================================================================== +--- nfs-utils-1.0.10.orig/utils/exportfs/exports.man ++++ nfs-utils-1.0.10/utils/exportfs/exports.man +@@ -405,8 +405,11 @@ Here's the complete list of mapping opti + .TP + .IR root_squash + Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does +-not apply to any other uids that might be equally sensitive, such as user +-.IR bin . ++not apply to any other uids or gids that might be equally sensitive, such as ++user ++.IR bin ++or group ++.IR staff . + .TP + .IR no_root_squash + Turn off root squashing. This option is mainly useful for diskless clients. diff --git a/debian/patches/05-refuse-non-ident-maptypes.patch b/debian/patches/05-refuse-non-ident-maptypes.patch new file mode 100644 index 0000000..d313add --- /dev/null +++ b/debian/patches/05-refuse-non-ident-maptypes.patch @@ -0,0 +1,17 @@ +Index: nfs-utils-1.0.10/utils/mountd/cache.c +=================================================================== +--- nfs-utils-1.0.10.orig/utils/mountd/cache.c ++++ nfs-utils-1.0.10/utils/mountd/cache.c +@@ -381,6 +381,12 @@ void cache_export(nfs_export *exp) + { + FILE *f; + ++ if (exp->m_export.e_maptype != CLE_MAP_IDENT) { ++ xlog(L_ERROR, "%s: unsupported mapping; kernel supports only 'identity' (default)", ++ exp->m_export.m_path); ++ return; ++ } ++ + f = fopen("/proc/net/rpc/auth.unix.ip/channel", "w"); + if (!f) + return; diff --git a/debian/patches/06-fix-no-tcp-short-option.patch b/debian/patches/06-fix-no-tcp-short-option.patch new file mode 100644 index 0000000..af42343 --- /dev/null +++ b/debian/patches/06-fix-no-tcp-short-option.patch @@ -0,0 +1,13 @@ +Index: nfs-utils-1.0.10/utils/mountd/mountd.c +=================================================================== +--- nfs-utils-1.0.10.orig/utils/mountd/mountd.c ++++ nfs-utils-1.0.10/utils/mountd/mountd.c +@@ -558,7 +558,7 @@ main(int argc, char **argv) + + /* Parse the command line options and arguments. */ + opterr = 0; +- while ((c = getopt_long(argc, argv, "o:n:Fd:f:p:P:hH:N:V:vs:t:", longopts, NULL)) != EOF) ++ while ((c = getopt_long(argc, argv, "o:nFd:f:p:P:hH:N:V:vs:t:", longopts, NULL)) != EOF) + switch (c) { + case 'o': + descriptors = atoi(optarg); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..cdddb10 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +01-bzero.patch +02-document-debian-init-scripts.patch +03-minor-manpage-fixes.patch +04-document-sensitive-uids.patch +05-refuse-non-ident-maptypes.patch +06-fix-no-tcp-short-option.patch diff --git a/debian/rules b/debian/rules index 8eba169..d1f160a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,6 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +#! /usr/bin/make -f + +include /usr/share/quilt/quilt.make DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -10,23 +11,21 @@ DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) DEBTMP := $(shell pwd)/debian/tmp build: build-stamp -build-stamp: +build-stamp: patch dh_testdir -ifeq ($(DEB_HOST_ARCH),ia64) - patch -p1 < debian/bzero.patch -endif CFLAGS="-g -O2 -Wall" ./configure \ --mandir='$${prefix}/share/man' \ --enable-secure-statd $(MAKE) touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp rm -rf $(DEBTMP) -$(MAKE) distclean + $(RM) utils/rquotad/rquota.h utils/rquotad/rquota_xdr.c dh_clean binary-indep: build @@ -41,8 +40,8 @@ binary-arch: build # Fix up the manpages for f in lockd statd showmount; do \ - perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \ - debian/tmp/usr/share/man/man8/$$f.8; \ + perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \ + debian/tmp/usr/share/man/man8/$$f.8; \ done; dh_installdocs -A diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man index 7a3e6ae..7aa60fc 100644 --- a/utils/exportfs/exports.man +++ b/utils/exportfs/exports.man @@ -29,9 +29,6 @@ double quotes. You can also specify spaces or other unusual character in the export name using a backslash followed by the character code as three octal digits. .PP -To apply changes to this file, run exportfs \-ra or /etc/init.d/nfs-kernel-server -reload (the latter being a distribution-specific extension). -.PP .SS Machine Name Formats NFS clients may be specified in a number of ways: .IP "single host @@ -124,7 +121,7 @@ default. In all subsequence releases, .I sync is the default, and .I async -must be explicitly requested if needed. +must be explicit requested if needed. To help make system adminstrators aware of this change, 'exportfs' will issue a warning if neither .I sync @@ -405,11 +402,8 @@ Here's the complete list of mapping options: .TP .IR root_squash Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does -not apply to any other uids or gids that might be equally sensitive, such as -user -.IR bin -or group -.IR staff . +not apply to any other uids that might be equally sensitive, such as user +.IR bin . .TP .IR no_root_squash Turn off root squashing. This option is mainly useful for diskless clients. diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 0296f4e..c57d3b0 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -381,12 +381,6 @@ void cache_export(nfs_export *exp) { FILE *f; - if (exp->m_export.e_maptype != CLE_MAP_IDENT) { - xlog(L_ERROR, "%s: unsupported mapping; kernel supports only 'identity' (default)", - exp->m_export.m_path); - return; - } - f = fopen("/proc/net/rpc/auth.unix.ip/channel", "w"); if (!f) return; diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index f40d367..c1d18d4 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -558,7 +558,7 @@ main(int argc, char **argv) /* Parse the command line options and arguments. */ opterr = 0; - while ((c = getopt_long(argc, argv, "o:nFd:f:p:P:hH:N:V:vs:t:", longopts, NULL)) != EOF) + while ((c = getopt_long(argc, argv, "o:n:Fd:f:p:P:hH:N:V:vs:t:", longopts, NULL)) != EOF) switch (c) { case 'o': descriptors = atoi(optarg); diff --git a/utils/nfsstat/nfsstat.man b/utils/nfsstat/nfsstat.man index eb548cb..5d83dc4 100644 --- a/utils/nfsstat/nfsstat.man +++ b/utils/nfsstat/nfsstat.man @@ -14,36 +14,36 @@ The displays statistics kept about NFS client and server activity. .SH OPTIONS .TP -.B \-s, \-\-server +.B -s, --server Print only server-side statistics. The default is to print both server and client statistics. .TP -.B \-c, \-\-client +.B -c, --client Print only client-side statistics. .TP -.B \-n, \-\-nfs +.B -n, --nfs Print only NFS statistics. The default is to print both NFS and RPC information. .TP -.B \-2 +.B -2 Print only NFS v2 statistics. The default is to only print information about the versions of \fBNFS\fR that have non-zero counts. .TP -.B \-3 +.B -3 Print only NFS v3 statistics. .TP -.B \-4 +.B -4 Print only NFS v4 statistics. .TP -.B \-m, \-\-mounted +.B -m, --mounted Print information about each of the mounted \fBNFS\fR file systems. If this option is used, all other options are ignored. .TP -.B \-r, \-\-rpc +.B -r, --rpc Print only RPC statistics. .TP -.BI \-o " facility +.BI -o " facility Display statistics for the specified facility, which must be one of: .RS .TP @@ -69,27 +69,27 @@ total number of lookups, and the number of hits and misses. Display all of the above facilities. .RE .TP -.B \-v, \-\-verbose -This is equivalent to \fB\-o all\fR. +.B -v, --verbose +This is equivalent to \fB-o all\fR. .SH EXAMPLES .TP -.B nfsstat \-o all \-234 +.B nfsstat -o all -234 Show all information about all versions of \fBNFS\fR. .TP -.B nfsstat \-\-verbose \-234 +.B nfsstat --verbose -234 Same as above. .TP -.B nfsstat \-o all +.B nfsstat -o all Show all information about about active versions of \fBNFS\fR. .TP -.B nfsstat \-\-nfs \-\-server \-3 +.B nfsstat --nfs --server -3 Show statistics for \fBNFS\fR version 3 server. .TP -.B nfsstat \-m +.B nfsstat -m Show information about mounted \fBNFS\fR filesystems. .\" --------------------- DISPLAY -------------------------------- .SH DISPLAY -The \fBFlags\fR output from the \fB\-m\fR option is the same as the +The \fBFlags\fR output from the \fB-m\fR option is the same as the flags give to the \fBmount\fR command. .\" --------------------- FILES ---------------------------------- .SH FILES @@ -111,11 +111,11 @@ interface to the mounted filesystems. .BR nfs (5). .\" ---------------------- BUGS ---------------------------------- .SH BUGS -The default output has be changed. To get the old default output you must run \fBnfsstat \-\-auto \-2\fR. +The default output has be changed. To get the old default output you must run \fBnfsstat --auto -2\fR. .P -The function of the \fB\-v\fR and \fB\-a\fR options have changed. The \fB\-a\fR option -is now reserved for future use. The \fB\-v\fR does what the \fB\-a\fR option used to do, -and the new \fB\-[234]\fR options replace the \fB\-v\fR option. +The function of the \fB-v\fR and \fB-a\fR options have changed. The \fB-a\fR option +is now reserved for future use. The \fB-v\fR does what the \fB-a\fR option used to do, +and the new \fB-[234]\fR options replace the \fB-v\fR option. .P The \fBDisplay\fR section should be more complete. .P diff --git a/utils/rquotad/rquota.h b/utils/rquotad/rquota.h deleted file mode 100644 index 09048f3..0000000 --- a/utils/rquotad/rquota.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _RQUOTA_H_RPCGEN -#define _RQUOTA_H_RPCGEN - -#include - -#ifndef IXDR_GET_INT32 -#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) -#endif -#ifndef IXDR_PUT_INT32 -#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) -#endif -#ifndef IXDR_GET_U_INT32 -#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) -#endif -#ifndef IXDR_PUT_U_INT32 -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) -#endif -#define RQ_PATHLEN 1024 - -struct getquota_args { - char *gqa_pathp; - int gqa_uid; -}; -typedef struct getquota_args getquota_args; -#ifdef __cplusplus -extern "C" bool_t xdr_getquota_args(XDR *, getquota_args*); -#elif __STDC__ -extern bool_t xdr_getquota_args(XDR *, getquota_args*); -#else /* Old Style C */ -bool_t xdr_getquota_args(); -#endif /* Old Style C */ - - -struct ext_getquota_args { - char *gqa_pathp; - int gqa_type; - int gqa_id; -}; -typedef struct ext_getquota_args ext_getquota_args; -#ifdef __cplusplus -extern "C" bool_t xdr_ext_getquota_args(XDR *, ext_getquota_args*); -#elif __STDC__ -extern bool_t xdr_ext_getquota_args(XDR *, ext_getquota_args*); -#else /* Old Style C */ -bool_t xdr_ext_getquota_args(); -#endif /* Old Style C */ - - -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; -#ifdef __cplusplus -extern "C" bool_t xdr_rquota(XDR *, rquota*); -#elif __STDC__ -extern bool_t xdr_rquota(XDR *, rquota*); -#else /* Old Style C */ -bool_t xdr_rquota(); -#endif /* Old Style C */ - - -enum gqr_status { - Q_OK = 1, - Q_NOQUOTA = 2, - Q_EPERM = 3, -}; -typedef enum gqr_status gqr_status; -#ifdef __cplusplus -extern "C" bool_t xdr_gqr_status(XDR *, gqr_status*); -#elif __STDC__ -extern bool_t xdr_gqr_status(XDR *, gqr_status*); -#else /* Old Style C */ -bool_t xdr_gqr_status(); -#endif /* Old Style C */ - - -struct getquota_rslt { - gqr_status status; - union { - rquota gqr_rquota; - } getquota_rslt_u; -}; -typedef struct getquota_rslt getquota_rslt; -#ifdef __cplusplus -extern "C" bool_t xdr_getquota_rslt(XDR *, getquota_rslt*); -#elif __STDC__ -extern bool_t xdr_getquota_rslt(XDR *, getquota_rslt*); -#else /* Old Style C */ -bool_t xdr_getquota_rslt(); -#endif /* Old Style C */ - - -#define RQUOTAPROG ((u_int32_t)100011) -#define RQUOTAVERS ((u_int32_t)1) - -#ifdef __cplusplus -#define RQUOTAPROC_GETQUOTA ((u_int32_t)1) -extern "C" getquota_rslt * rquotaproc_getquota_1(getquota_args *, CLIENT *); -extern "C" getquota_rslt * rquotaproc_getquota_1_svc(getquota_args *, struct svc_req *); -#define RQUOTAPROC_GETACTIVEQUOTA ((u_int32_t)2) -extern "C" getquota_rslt * rquotaproc_getactivequota_1(getquota_args *, CLIENT *); -extern "C" getquota_rslt * rquotaproc_getactivequota_1_svc(getquota_args *, struct svc_req *); - -#elif __STDC__ -#define RQUOTAPROC_GETQUOTA ((u_int32_t)1) -extern getquota_rslt * rquotaproc_getquota_1(getquota_args *, CLIENT *); -extern getquota_rslt * rquotaproc_getquota_1_svc(getquota_args *, struct svc_req *); -#define RQUOTAPROC_GETACTIVEQUOTA ((u_int32_t)2) -extern getquota_rslt * rquotaproc_getactivequota_1(getquota_args *, CLIENT *); -extern getquota_rslt * rquotaproc_getactivequota_1_svc(getquota_args *, struct svc_req *); - -#else /* Old Style C */ -#define RQUOTAPROC_GETQUOTA ((u_int32_t)1) -extern getquota_rslt * rquotaproc_getquota_1(); -extern getquota_rslt * rquotaproc_getquota_1_svc(); -#define RQUOTAPROC_GETACTIVEQUOTA ((u_int32_t)2) -extern getquota_rslt * rquotaproc_getactivequota_1(); -extern getquota_rslt * rquotaproc_getactivequota_1_svc(); -#endif /* Old Style C */ -#define EXT_RQUOTAVERS ((u_int32_t)2) - -#ifdef __cplusplus -extern "C" getquota_rslt * rquotaproc_getquota_2(ext_getquota_args *, CLIENT *); -extern "C" getquota_rslt * rquotaproc_getquota_2_svc(ext_getquota_args *, struct svc_req *); -extern "C" getquota_rslt * rquotaproc_getactivequota_2(ext_getquota_args *, CLIENT *); -extern "C" getquota_rslt * rquotaproc_getactivequota_2_svc(ext_getquota_args *, struct svc_req *); - -#elif __STDC__ -extern getquota_rslt * rquotaproc_getquota_2(ext_getquota_args *, CLIENT *); -extern getquota_rslt * rquotaproc_getquota_2_svc(ext_getquota_args *, struct svc_req *); -extern getquota_rslt * rquotaproc_getactivequota_2(ext_getquota_args *, CLIENT *); -extern getquota_rslt * rquotaproc_getactivequota_2_svc(ext_getquota_args *, struct svc_req *); - -#else /* Old Style C */ -extern getquota_rslt * rquotaproc_getquota_2(); -extern getquota_rslt * rquotaproc_getquota_2_svc(); -extern getquota_rslt * rquotaproc_getactivequota_2(); -extern getquota_rslt * rquotaproc_getactivequota_2_svc(); -#endif /* Old Style C */ - -#endif /* !_RQUOTA_H_RPCGEN */ diff --git a/utils/rquotad/rquota_xdr.c b/utils/rquotad/rquota_xdr.c deleted file mode 100644 index f5a28a2..0000000 --- a/utils/rquotad/rquota_xdr.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#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 (xdrs->x_op == XDR_ENCODE) { - int32_t *buf = XDR_INLINE(xdrs,10 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - 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); - } - - } - else { - (void) IXDR_PUT_INT32(buf,objp->rq_bsize); - (void) IXDR_PUT_BOOL(buf,objp->rq_active); - (void) IXDR_PUT_U_INT32(buf,objp->rq_bhardlimit); - (void) IXDR_PUT_U_INT32(buf,objp->rq_bsoftlimit); - (void) IXDR_PUT_U_INT32(buf,objp->rq_curblocks); - (void) IXDR_PUT_U_INT32(buf,objp->rq_fhardlimit); - (void) IXDR_PUT_U_INT32(buf,objp->rq_fsoftlimit); - (void) IXDR_PUT_U_INT32(buf,objp->rq_curfiles); - (void) IXDR_PUT_U_INT32(buf,objp->rq_btimeleft); - (void) IXDR_PUT_U_INT32(buf,objp->rq_ftimeleft); - } - - return (TRUE); - } else if (xdrs->x_op == XDR_DECODE) { - int32_t *buf = XDR_INLINE(xdrs,10 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - 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); - } - - } - else { - objp->rq_bsize = IXDR_GET_INT32(buf); - objp->rq_active = IXDR_GET_BOOL(buf); - objp->rq_bhardlimit = IXDR_GET_U_INT32(buf); - objp->rq_bsoftlimit = IXDR_GET_U_INT32(buf); - objp->rq_curblocks = IXDR_GET_U_INT32(buf); - objp->rq_fhardlimit = IXDR_GET_U_INT32(buf); - objp->rq_fsoftlimit = IXDR_GET_U_INT32(buf); - objp->rq_curfiles = IXDR_GET_U_INT32(buf); - objp->rq_btimeleft = IXDR_GET_U_INT32(buf); - objp->rq_ftimeleft = IXDR_GET_U_INT32(buf); - } - return(TRUE); - } - - 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); -} diff --git a/utils/showmount/showmount.man b/utils/showmount/showmount.man index 068d5c0..30c9d82 100644 --- a/utils/showmount/showmount.man +++ b/utils/showmount/showmount.man @@ -21,7 +21,7 @@ lists the set of clients who are mounting from that host. The output from .B showmount is designed to -appear as though it were processed through ``sort \-u''. +appear as though it were processed through ``sort -u''. .SH OPTIONS .TP .BR \-a " or " \-\-all -- 2.39.5