Lines Matching defs:history

57 static int files_update_history(char *name, char *history);
83 char *history;
363 * Password history file format:
369 #define HISTMODE S_IRUSR /* mode to create history file */
383 * old password history.
390 * PWU_SUCCESS, passwd found in user's old password history.
393 * PWU_NOT_FOUND, passwd not in user's old password history.
412 * treating user not found in backing store or no history as
424 debug("files_checkhistory: no history requested");
520 FILE *history;
525 debug("files_getattr: Get password history for %s ",
528 if ((history = fopen(HISTORY, "rF")) == NULL) {
534 while ((s = fgets(buf, sizeof (buf), history)) !=
544 debug("got history line for %s", s);
556 (void) fclose(history);
648 pwbuf->history = NULL;
714 free(pwbuf->history);
715 pwbuf->history = strdup(hash);
716 if (pwbuf->history == NULL) {
735 spw->sp_pwdp = pwbuf->history;
791 free(pwbuf->history);
792 pwbuf->history = NULL;
1132 if (pwbuf->history != NULL) {
1133 debug("update_history = %s", pwbuf->history);
1134 result = files_update_history(name, pwbuf->history);
1155 free(pwbuf->history);
1165 files_update_history(char *name, char *history)
1169 FILE *src; /* history database file */
1170 FILE *dst; /* temp history database being updated */
1177 debug("files_update_history(%s) no history, unlinking", name);
1179 return (PWU_SUCCESS); /* no history update defined */
1182 history, histsize);
1225 (void) fprintf(dst, "%s:%s:", name, history);
1227 "\t%s:%s:", name, history);
1229 /* get old crypted password history */
1252 /* user not found, add to history file */
1253 (void) fprintf(dst, "%s:%s:\n", name, history);
1255 "\t%s:%s:", name, history);
1270 * rename history to ohistory,
1271 * rename tmp to history,
1281 /* old history won't go away, lose the update */