1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License (the "License"). 1N/A * You may not use this file except in compliance with the License. 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * When distributing Covered Code, include this CDDL HEADER in each 1N/A * If applicable, add the following below this CDDL HEADER, with the 1N/A * fields enclosed by brackets "[]" replaced with your own identifying 1N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A * Create a lockfile to prevent simultaneous access to the database 1N/A * creation routines. We set a timeout to LOCK_WAIT seconds. If we 1N/A * haven't obtained a lock after LOCK_RETIRES attempts, we bail out. 1N/A * returns 0 on succes, -1 on (lock) failure. 1N/A * side effect: the directory "path" will be created if it didn't exist. 1N/A /* create directory "path" if it doesn't exist */ 1N/A "waiting for dictionary lock.");
1N/A * Release the database lock 1N/A * database_present() 1N/A * returns 0 if the database files are found, and the database size is 1N/A * greater than 0 and the database version matches the current version. 1N/A /* verify database version number by trying to open it */ 1N/A /* the files are there, but an outdated version */ 1N/A * build_dict_database(list, char *path) 1N/A * Create the Crack Dictionary Database based on the list of sources 1N/A * dictionaries specified in "list". Store the database in "path". 1N/A * Rebuild the database in "path" if the database is older than one of the 1N/A * files listed in "list", or older than the config-file PWADMIN. 1N/A /* Compare mtime of each listed dictionary against DB mtime */ 1N/A "pam_authtok_check:update_dict_database: " 1N/A "dictionary \"%s\" not present.",
buf);
1N/A "pam_authtok_check:update_dict_database: " 1N/A * Because this is the only way we can check if files have been 1N/A * Drawback: the database will also be generated when other 1N/A * tunables are changed. 1N/A * Since we actually rebuild the database, we need to remove 1N/A * the old database first. 1N/A * Build or update database, while holding the global lock.