From: Kevin Coffman Date: Thu, 8 Feb 2007 22:27:51 +0000 (-0500) Subject: Add option to svcgssd to enable libnfsidmap debugging. X-Git-Tag: nfs-utils-1-0-11~6 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=395a1d1586c131d3830fac58d6aa6f9ac8e3408f;ds=sidebyside Add option to svcgssd to enable libnfsidmap debugging. Signed-off-by: Kevin Coffman As suggested by Glenn Machin . 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 --- 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 #include #include +#include #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 -.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),