Make user.c independent of command line options.
[adu.git] / select.c
index e30697e..4ebfbbf 100644 (file)
--- a/select.c
+++ b/select.c
@@ -912,7 +912,8 @@ int run_select_query(struct uid_range *admissible_uids, struct format_info *fi)
        if (ret < 0)
                goto out;
        check_signals();
-       ret = open_admissible_user_tables(admissible_uids);
+       ret = open_admissible_user_tables(conf.database_dir_arg,
+               admissible_uids);
        if (ret < 0)
                goto out;
        check_signals();
@@ -1062,7 +1063,7 @@ int com_select(void)
        ret = parse_select_options(conf.select_options_arg, &params,
                &admissible_uids, &fi);
        if (ret > 0) {
-               ret = read_uid_file();
+               ret = read_uid_file(conf.database_dir_arg);
                if (ret < 0)
                        goto out;
                ret = run_select_query(admissible_uids, fi);