Lines Matching refs:lineinfo
670 struct hostkey_foreach_line lineinfo; in hostkeys_foreach() local
673 memset(&lineinfo, 0, sizeof(lineinfo)); in hostkeys_foreach()
684 free(lineinfo.line); in hostkeys_foreach()
685 sshkey_free(lineinfo.key); in hostkeys_foreach()
686 memset(&lineinfo, 0, sizeof(lineinfo)); in hostkeys_foreach()
687 lineinfo.path = path; in hostkeys_foreach()
688 lineinfo.linenum = linenum; in hostkeys_foreach()
689 lineinfo.line = xstrdup(line); in hostkeys_foreach()
690 lineinfo.marker = MRK_NONE; in hostkeys_foreach()
691 lineinfo.status = HKF_STATUS_OK; in hostkeys_foreach()
692 lineinfo.keytype = KEY_UNSPEC; in hostkeys_foreach()
699 lineinfo.status = HKF_STATUS_COMMENT; in hostkeys_foreach()
700 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
706 if ((lineinfo.marker = check_markers(&cp)) == MRK_ERROR) { in hostkeys_foreach()
717 lineinfo.hosts = cp; in hostkeys_foreach()
722 if ((s = match_maybe_hashed(host, lineinfo.hosts, in hostkeys_foreach()
725 __func__, path, linenum, lineinfo.hosts); in hostkeys_foreach()
729 lineinfo.status = HKF_STATUS_MATCHED; in hostkeys_foreach()
730 lineinfo.match |= HKF_MATCH_HOST | in hostkeys_foreach()
735 if ((s = match_maybe_hashed(ip, lineinfo.hosts, in hostkeys_foreach()
739 linenum, lineinfo.hosts); in hostkeys_foreach()
743 lineinfo.status = HKF_STATUS_MATCHED; in hostkeys_foreach()
744 lineinfo.match |= HKF_MATCH_IP | in hostkeys_foreach()
753 lineinfo.status != HKF_STATUS_MATCHED) in hostkeys_foreach()
765 lineinfo.rawkey = cp = cp2; in hostkeys_foreach()
773 if ((lineinfo.key = sshkey_new(KEY_UNSPEC)) == NULL) { in hostkeys_foreach()
778 if (!hostfile_read_key(&cp, &kbits, lineinfo.key)) { in hostkeys_foreach()
781 lineinfo.keytype = lineinfo.key->type; in hostkeys_foreach()
782 lineinfo.comment = cp; in hostkeys_foreach()
785 l = strcspn(lineinfo.rawkey, " \t"); in hostkeys_foreach()
787 lineinfo.rawkey[l] == '\0') in hostkeys_foreach()
789 memcpy(ktype, lineinfo.rawkey, l); in hostkeys_foreach()
791 lineinfo.keytype = sshkey_type_from_name(ktype); in hostkeys_foreach()
797 if (lineinfo.keytype == KEY_UNSPEC && l < 8 && in hostkeys_foreach()
812 lineinfo.keytype = KEY_UNSPEC; in hostkeys_foreach()
814 if (lineinfo.keytype == KEY_UNSPEC) { in hostkeys_foreach()
816 sshkey_free(lineinfo.key); in hostkeys_foreach()
817 lineinfo.key = NULL; in hostkeys_foreach()
818 lineinfo.status = HKF_STATUS_INVALID; in hostkeys_foreach()
819 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
824 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
827 sshkey_free(lineinfo.key); in hostkeys_foreach()
828 free(lineinfo.line); in hostkeys_foreach()