Lines Matching defs:path
51 * side effect: the directory "path" will be created if it didn't exist.
54 lock_db(char *path)
60 /* create directory "path" if it doesn't exist */
61 if (stat(path, &st) == -1) {
63 (mkdir(path, 0755) == -1 || chmod(path, 0755) == -1))
67 (void) snprintf(dblock, sizeof (dblock), "%s/authtok_check.lock", path);
121 database_present(char *path)
129 (void) snprintf(dict_hwm, sizeof (dict_hwm), "%s/%s", path,
131 (void) snprintf(dict_pwd, sizeof (dict_pwd), "%s/%s", path,
133 (void) snprintf(dict_pwi, sizeof (dict_pwi), "%s/%s", path,
142 if ((dict = PWOpen(path, "r")) == NULL) {
144 PWRemove(path);
152 * build_dict_database(list, char *path)
155 * dictionaries specified in "list". Store the database in "path".
158 build_dict_database(char *list, char *path)
160 return (packer(list, path) == -1 ? DICTDATABASE_BUILD_ERR : 0);
164 * Rebuild the database in "path" if the database is older than one of the
168 update_dict_database(char *list, char *path)
177 (void) snprintf(dbase_pwd, sizeof (dbase_pwd), "%s/%s", path,
226 PWRemove(path);
227 return (build_dict_database(list, path));
237 make_dict_database(char *list, char *path)
241 if (lock_db(path) == 0) {
242 if (database_present(path) == NO_DICTDATABASE)
243 r = build_dict_database(list, path);
245 r = update_dict_database(list, path);