diff options
author | Kevin Coffman <kwc@citi.umich.edu> | 2007-02-08 17:27:51 -0500 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-02-09 11:56:09 +1100 |
commit | 395a1d1586c131d3830fac58d6aa6f9ac8e3408f (patch) | |
tree | 3fc9dfcf6bf8714b29552e01a15dd329ad720350 | |
parent | dbfcba5b03481d49f3e78946fe8fd066e2025545 (diff) | |
download | nfs-utils-395a1d1586c131d3830fac58d6aa6f9ac8e3408f.tar.gz nfs-utils-395a1d1586c131d3830fac58d6aa6f9ac8e3408f.tar.xz nfs-utils-395a1d1586c131d3830fac58d6aa6f9ac8e3408f.zip |
Add option to svcgssd to enable libnfsidmap debugging.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
As suggested by Glenn Machin <GMachin@sandia.gov>. Allow svcgssd
to turn on libnfsidmap debugging. This uses a new command-line
parameter so that it can be enabled independently from other
debugging.
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | utils/gssd/svcgssd.c | 16 | ||||
-rw-r--r-- | utils/gssd/svcgssd.man | 8 |
2 files changed, 20 insertions, 4 deletions
diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c index 0db3762..37e0407 100644 --- a/utils/gssd/svcgssd.c +++ b/utils/gssd/svcgssd.c @@ -54,6 +54,7 @@ #include <stdlib.h> #include <string.h> #include <signal.h> +#include <nfsidmap.h> #include "nfslib.h" #include "svcgssd.h" #include "gss_util.h" @@ -154,7 +155,7 @@ sig_hup(int signal) static void usage(char *progname) { - fprintf(stderr, "usage: %s [-n] [-f] [-v] [-r]\n", + fprintf(stderr, "usage: %s [-n] [-f] [-v] [-r] [-i]\n", progname); exit(1); } @@ -166,15 +167,19 @@ main(int argc, char *argv[]) int fg = 0; int verbosity = 0; int rpc_verbosity = 0; + int idmap_verbosity = 0; int opt; extern char *optarg; char *progname; - while ((opt = getopt(argc, argv, "fvrnp:")) != -1) { + while ((opt = getopt(argc, argv, "fivrnp:")) != -1) { switch (opt) { case 'f': fg = 1; break; + case 'i': + idmap_verbosity++; + break; case 'n': get_creds = 0; break; @@ -203,6 +208,13 @@ main(int argc, char *argv[]) printerr(0, "Warning: rpcsec_gss library does not " "support setting debug level\n"); #endif +#ifdef HAVE_NFS4_SET_DEBUG + nfs4_set_debug(idmap_verbosity, NULL); +#else + if (idmap_verbosity > 0) + printerr(0, "Warning: your nfsidmap library does not " + "support setting debug level\n"); +#endif if (gssd_check_mechs() != 0) { printerr(0, "ERROR: Problem with gssapi library\n"); diff --git a/utils/gssd/svcgssd.man b/utils/gssd/svcgssd.man index a770662..1a015e1 100644 --- a/utils/gssd/svcgssd.man +++ b/utils/gssd/svcgssd.man @@ -2,11 +2,11 @@ .\" rpc.svcgssd(8) .\" .\" Copyright (C) 2003 J. Bruce Fields <bfields@umich.edu> -.TH rpc.svcgssd 8 "17 Mar 2003" +.TH rpc.svcgssd 8 "12 Jan 2007" .SH NAME rpc.svcgssd \- server-side rpcsec_gss daemon .SH SYNOPSIS -.B "rpc.svcgssd [-v] [-r] [-f] [-p pipefsdir]" +.B "rpc.svcgssd [-v] [-r] [-i] [-f] [-p pipefsdir]" .SH DESCRIPTION The rpcsec_gss protocol gives a means of using the gss-api generic security api to provide security for protocols using rpc (in particular, nfs). Before @@ -31,6 +31,10 @@ Increases the verbosity of the output (can be specified multiple times). .B -r If the rpcsec_gss library supports setting debug level, increases the verbosity of the output (can be specified multiple times). +.TP +.B -i +If the nfsidmap library supports setting debug level, +increases the verbosity of the output (can be specified multiple times). .SH SEE ALSO .BR rpc.gssd(8), |