X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fnfsidmap%2Fnfsidmap.c;fp=utils%2Fnfsidmap%2Fnfsidmap.c;h=e14543c85770d5dd9f167d55c4517486cde302ed;hp=cf1155188851836fcd0ef38934afd9d9f8244cb9;hb=fb06ed9fc1fa11a95544fb2d89adb6c51ef5d946;hpb=5b30c751e3bceab727de684c5ca96c6edd6df001 diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c index cf11551..e14543c 100644 --- a/utils/nfsidmap/nfsidmap.c +++ b/utils/nfsidmap/nfsidmap.c @@ -12,6 +12,7 @@ #include #include "xlog.h" +#include "conffile.h" int verbose = 0; char *usage="Usage: %s [-v] [-c || [-u|-g|-r key] || [-t timeout] key desc]"; @@ -26,6 +27,10 @@ char *usage="Usage: %s [-v] [-c || [-u|-g|-r key] || [-t timeout] key desc]"; #define DEFAULT_KEYRING "id_resolver" #endif +#ifndef PATH_IDMAPDCONF +#define PATH_IDMAPDCONF "/etc/idmapd.conf" +#endif + static int keyring_clear(char *keyring); #define UIDKEYS 0x1 @@ -267,6 +272,13 @@ int main(int argc, char **argv) } } + if (nfs4_init_name_mapping(PATH_IDMAPDCONF)) { + xlog_err("Unable to create name to user id mappings."); + return 1; + } + if (!verbose) + verbose = conf_get_num("General", "Verbosity", 0); + if (keystr) { rc = key_revoke(keystr, keymask); return rc;