Lines Matching refs:nstatefile
573 char *statefile = NULL, *ostatefile = NULL, *nstatefile = NULL; in sshkey_xmss_update_state() local
599 asprintf(&nstatefile, "%s.nstate", filename) == -1) { in sshkey_xmss_update_state()
603 unlink(nstatefile); in sshkey_xmss_update_state()
616 if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) == -1) { in sshkey_xmss_update_state()
618 PRINT("%s: open new state file: %s", __func__, nstatefile); in sshkey_xmss_update_state()
624 PRINT("%s: write new state file hdr: %s", __func__, nstatefile); in sshkey_xmss_update_state()
631 PRINT("%s: write new state file data: %s", __func__, nstatefile); in sshkey_xmss_update_state()
637 PRINT("%s: sync new state file: %s", __func__, nstatefile); in sshkey_xmss_update_state()
643 PRINT("%s: close new state file: %s", __func__, nstatefile); in sshkey_xmss_update_state()
655 if (rename(nstatefile, statefile) == -1) { in sshkey_xmss_update_state()
657 PRINT("%s: rename %s to %s", __func__, nstatefile, statefile); in sshkey_xmss_update_state()
666 if (nstatefile) in sshkey_xmss_update_state()
667 unlink(nstatefile); in sshkey_xmss_update_state()
670 free(nstatefile); in sshkey_xmss_update_state()