]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/nfsidmap/nfsidmap.c
nfsidmap: Default domain not being set.
[nfs-utils.git] / utils / nfsidmap / nfsidmap.c
index b767395fba10effb198b2217583459de51b3b611..e14543c85770d5dd9f167d55c4517486cde302ed 100644 (file)
@@ -36,17 +36,6 @@ static int keyring_clear(char *keyring);
 #define UIDKEYS 0x1
 #define GIDKEYS 0x2
 
 #define UIDKEYS 0x1
 #define GIDKEYS 0x2
 
-/*
- * Check to the config file for the verbosity level
- */
-int
-get_config_verbose(char *path)
-{
-       conf_path = path;
-       conf_init();
-       return conf_get_num("General", "Verbosity", 0);
-}
-
 /*
  * Find either a user or group id based on the name@domain string
  */
 /*
  * Find either a user or group id based on the name@domain string
  */
@@ -282,9 +271,14 @@ int main(int argc, char **argv)
                        break;
                }
        }
                        break;
                }
        }
-       if (!verbose) {
-               verbose = get_config_verbose(PATH_IDMAPDCONF);
+
+       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;              
        if (keystr) {
                rc = key_revoke(keystr, keymask);
                return rc;