Lines Matching defs:host
120 host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
135 /* Extract salt from known host entry */
143 ssh_hmac_update(ctx, host, strlen(host)) < 0 ||
232 const char *host;
258 hostkeys->entries[hostkeys->num_entries].host = xstrdup(ctx->host);
271 load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path)
276 ctx.host = host;
280 if ((r = hostkeys_foreach(path, record_hostkey, &ctx, host, NULL,
288 ctx.num_loaded, host);
297 free(hostkeys->entries[i].host);
418 write_host_entry(FILE *f, const char *host, const char *ip,
425 if ((hashed_host = host_hash(host, NULL, 0)) == NULL) {
431 fprintf(f, "%s,%s ", host, ip);
433 fprintf(f, "%s ", host);
444 * Appends an entry to the host file. Returns false if the entry could not
448 add_host_to_hostfile(const char *filename, const char *host,
459 success = write_host_entry(f, host, NULL, key, store_hash);
467 const char *host;
468 int *skip_keys; /* XXX split for host/ip? might want to ensure both */
514 do_log2(loglevel, "%s%s%s:%ld: Removed %s key for host %s",
516 l->path, l->linenum, sshkey_type(l->key), ctx->host);
531 hostfile_replace_entries(const char *filename, const char *host, const char *ip,
544 ctx.host = host;
575 /* Remove all entries for the specified host from the file */
576 if ((r = hostkeys_foreach(filename, host_delete, &ctx, host, ip,
592 quiet ? __func__ : "", quiet ? ": " : "", host, filename,
595 if (!write_host_entry(ctx.out, host, ip, keys[i], store_hash)) {
651 match_maybe_hashed(const char *host, const char *names, int *was_hashed)
660 if ((hashed_host = host_hash(host, names, nlen)) == NULL)
665 return match_hostname(host, names, nlen) == 1;
670 const char *host, const char *ip, u_int options)
683 if (host == NULL && (options & HKF_WANT_MATCH) != 0)
722 /* Find the end of the host name portion. */
728 /* Check if the host name matches. */
729 if (host != NULL) {
730 if ((s = match_maybe_hashed(host, lineinfo.hosts,
732 debug2("%s: %s:%ld: bad host hash \"%.32s\"",
757 * Skip this line if host matching requested and
758 * neither host nor address matched.
765 /* Got a match. Skip host name and any following whitespace */