|
|
e19a30 |
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
|
|
|
e19a30 |
index aff89d1..f55d2e1 100644
|
|
|
e19a30 |
--- a/utils/idmapd/idmapd.c
|
|
|
e19a30 |
+++ b/utils/idmapd/idmapd.c
|
|
|
e19a30 |
@@ -199,6 +199,12 @@ flush_nfsd_idmap_cache(void)
|
|
|
e19a30 |
return ret;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
|
|
|
e19a30 |
+void usage(char *progname)
|
|
|
e19a30 |
+{
|
|
|
e19a30 |
+ fprintf(stderr, "Usage: %s [-hfvCS] [-p path] [-c path]\n",
|
|
|
e19a30 |
+ basename(progname));
|
|
|
e19a30 |
+}
|
|
|
e19a30 |
+
|
|
|
e19a30 |
int
|
|
|
e19a30 |
main(int argc, char **argv)
|
|
|
e19a30 |
{
|
|
|
e19a30 |
@@ -225,16 +231,18 @@ main(int argc, char **argv)
|
|
|
e19a30 |
progname = argv[0];
|
|
|
e19a30 |
xlog_open(progname);
|
|
|
e19a30 |
|
|
|
e19a30 |
-#define GETOPTSTR "vfd:p:U:G:c:CS"
|
|
|
e19a30 |
+#define GETOPTSTR "hvfd:p:U:G:c:CS"
|
|
|
e19a30 |
opterr=0; /* Turn off error messages */
|
|
|
e19a30 |
while ((opt = getopt(argc, argv, GETOPTSTR)) != -1) {
|
|
|
e19a30 |
if (opt == 'c')
|
|
|
e19a30 |
conf_path = optarg;
|
|
|
e19a30 |
if (opt == '?') {
|
|
|
e19a30 |
if (strchr(GETOPTSTR, optopt))
|
|
|
e19a30 |
- errx(1, "'-%c' option requires an argument.", optopt);
|
|
|
e19a30 |
+ warnx("'-%c' option requires an argument.", optopt);
|
|
|
e19a30 |
else
|
|
|
e19a30 |
- errx(1, "'-%c' is an invalid argument.", optopt);
|
|
|
e19a30 |
+ warnx("'-%c' is an invalid argument.", optopt);
|
|
|
e19a30 |
+ usage(progname);
|
|
|
e19a30 |
+ exit(1);
|
|
|
e19a30 |
}
|
|
|
e19a30 |
}
|
|
|
e19a30 |
optind = 1;
|
|
|
e19a30 |
@@ -276,6 +284,9 @@ main(int argc, char **argv)
|
|
|
e19a30 |
case 'S':
|
|
|
e19a30 |
clientstart = 0;
|
|
|
e19a30 |
break;
|
|
|
e19a30 |
+ case 'h':
|
|
|
e19a30 |
+ usage(progname);
|
|
|
e19a30 |
+ exit(0);
|
|
|
e19a30 |
default:
|
|
|
e19a30 |
break;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
diff --git a/utils/idmapd/idmapd.man b/utils/idmapd/idmapd.man
|
|
|
e19a30 |
index 185cd1b..b9200c7 100644
|
|
|
e19a30 |
--- a/utils/idmapd/idmapd.man
|
|
|
e19a30 |
+++ b/utils/idmapd/idmapd.man
|
|
|
e19a30 |
@@ -10,8 +10,11 @@
|
|
|
e19a30 |
.Sh SYNOPSIS
|
|
|
e19a30 |
.\" For a program: program [-abc] file ...
|
|
|
e19a30 |
.Nm rpc.idmapd
|
|
|
e19a30 |
-.Op Fl v
|
|
|
e19a30 |
+.Op Fl h
|
|
|
e19a30 |
.Op Fl f
|
|
|
e19a30 |
+.Op Fl v
|
|
|
e19a30 |
+.Op Fl C
|
|
|
e19a30 |
+.Op Fl S
|
|
|
e19a30 |
.Op Fl p Ar path
|
|
|
e19a30 |
.Op Fl c Ar path
|
|
|
e19a30 |
.Sh DESCRIPTION
|
|
|
e19a30 |
@@ -20,8 +23,20 @@ is the NFSv4 ID <-> name mapping daemon. It provides functionality to
|
|
|
e19a30 |
the NFSv4 kernel client and server, to which it communicates via
|
|
|
e19a30 |
upcalls, by translating user and group IDs to names, and vice versa.
|
|
|
e19a30 |
.Pp
|
|
|
e19a30 |
+Note that on more recent kernels only the NFSv4 server uses
|
|
|
e19a30 |
+.Nm .
|
|
|
e19a30 |
+The NFSv4 client instead uses
|
|
|
e19a30 |
+.Xr nfsidmap 8 ,
|
|
|
e19a30 |
+and only falls back to
|
|
|
e19a30 |
+.Nm
|
|
|
e19a30 |
+if there was a problem running the
|
|
|
e19a30 |
+.Xr nfsidmap 8
|
|
|
e19a30 |
+program.
|
|
|
e19a30 |
+.Pp
|
|
|
e19a30 |
The options are as follows:
|
|
|
e19a30 |
.Bl -tag -width Ds_imagedir
|
|
|
e19a30 |
+.It Fl h
|
|
|
e19a30 |
+Display usage message.
|
|
|
e19a30 |
.It Fl v
|
|
|
e19a30 |
Increases the verbosity level (can be specified multiple times).
|
|
|
e19a30 |
.It Fl f
|
|
|
e19a30 |
@@ -58,7 +73,8 @@ messages to console, and with a verbosity level of 3.
|
|
|
e19a30 |
.Sh FILES
|
|
|
e19a30 |
.Pa /etc/idmapd.conf
|
|
|
e19a30 |
.Sh SEE ALSO
|
|
|
e19a30 |
-.Xr idmapd.conf 5
|
|
|
e19a30 |
+.Xr idmapd.conf 5 ,
|
|
|
e19a30 |
+.Xr nfsidmap 8
|
|
|
e19a30 |
.\".Sh SEE ALSO
|
|
|
e19a30 |
.\".Xr nylon.conf 4
|
|
|
e19a30 |
.\" .Sh COMPATIBILITY
|