/netbsd/external/bsd/dhcpcd/dist/hooks/ |
H A D | 30-hostname | 1 # Set the hostname from DHCP data if required 3 # A hostname can either be a short hostname or a FQDN. 11 # DHCPv6 has no hostname option. 29 hostname 31 sysctl -n kern.hostname 33 sysctl -n kernel.hostname 43 hostname "$1" 50 hostname "$1" 66 hostname="$(_hostname)" 84 [ "$hostname" = \ [all …]
|
/netbsd/external/bsd/ntp/dist/sntp/ |
H A D | kod_management.c | 25 const char *hostname, in search_entry() argument 32 if (!strcmp(kod_db[a]->hostname, hostname)) in search_entry() 44 if (!strcmp(kod_db[a]->hostname, hostname)) { in search_entry() 55 const char * hostname, in add_entry() argument 66 strlcpy(pke->hostname, hostname, sizeof(pke->hostname)); in add_entry() 72 if (strcmp(kod_db[n]->hostname, pke->hostname) >= 0) in add_entry() 76 0 == strcmp(kod_db[n]->hostname, pke->hostname)) { in add_entry() 93 const char * hostname, in delete_entry() argument 100 if (!strcmp(kod_db[a]->hostname, hostname) in delete_entry() 170 kod_db[a]->hostname); in write_kod_db() [all …]
|
/netbsd/external/mit/libuv/dist/src/unix/ |
H A D | getaddrinfo.c | 119 else if (req->hostname) in uv__getaddrinfo_done() 120 uv__free(req->hostname); in uv__getaddrinfo_done() 126 req->hostname = NULL; in uv__getaddrinfo_done() 161 if (hostname != NULL) { in uv_getaddrinfo() 162 rc = uv__idna_toascii(hostname, in uv_getaddrinfo() 163 hostname + strlen(hostname), in uv_getaddrinfo() 168 hostname = hostname_ascii; in uv_getaddrinfo() 172 hostname_len = hostname ? strlen(hostname) + 1 : 0; in uv_getaddrinfo() 186 req->hostname = NULL; in uv_getaddrinfo() 202 if (hostname) in uv_getaddrinfo() [all …]
|
/netbsd/external/bsd/libevent/dist/sample/ |
H A D | hostcheck.c | 164 static int hostmatch(const char *hostname, const char *pattern) in hostmatch() argument 171 return Curl_raw_equal(pattern, hostname) ? in hostmatch() 184 return Curl_raw_equal(pattern, hostname) ? in hostmatch() 187 hostname_label_end = strchr(hostname, '.'); in hostmatch() 195 if(hostname_label_end - hostname < pattern_label_end - pattern) in hostmatch() 200 return Curl_raw_nequal(pattern, hostname, prefixlen) && in hostmatch() 206 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) in Curl_cert_hostcheck() argument 209 !hostname || !*hostname) /* sanity check */ in Curl_cert_hostcheck() 212 if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ in Curl_cert_hostcheck() 215 if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) in Curl_cert_hostcheck()
|
H A D | openssl_hostname_validation.c | 65 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { in matches_common_name() argument 96 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) { in matches_common_name() 113 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *… in matches_subject_alternative_name() argument 140 if (Curl_cert_hostcheck(dns_name, hostname) in matches_subject_alternative_name() 165 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) { in validate_hostname() argument 168 if((hostname == NULL) || (server_cert == NULL)) in validate_hostname() 172 result = matches_subject_alternative_name(hostname, server_cert); in validate_hostname() 175 result = matches_common_name(hostname, server_cert); in validate_hostname()
|
/netbsd/usr.sbin/ypserv/common/ |
H A D | localhostname.c | 52 char hostname[MAXHOSTNAMELEN + 1]; in localhostname() local 55 if (gethostname(hostname, sizeof(hostname))) in localhostname() 57 hostname[sizeof(hostname) - 1] = '\0'; in localhostname() 65 if (strchr(hostname, '.')) { in localhostname() 66 strlcpy(buf, hostname, buflen); in localhostname() 77 error = getaddrinfo(hostname, NULL, &hints, &res); in localhostname() 79 errx(1, "getaddrinfo(%s) failed: %s", hostname, in localhostname()
|
/netbsd/external/gpl2/gettext/dist/gettext-tools/src/ |
H A D | hostname.c | 249 DWORD size = sizeof (hostname); in xgethostname() 253 return xstrdup (hostname); in xgethostname() 255 char hostname[MAXHOSTNAMELEN+1]; in xgethostname() 259 hostname[MAXHOSTNAMELEN] = '\0'; in xgethostname() 260 return xstrdup (hostname); in xgethostname() 315 char *hostname; in print_hostname() local 322 hostname = xgethostname (); in print_hostname() 328 printf ("%s\n", hostname); in print_hostname() 333 dot = strchr (hostname, '.'); in print_hostname() 336 printf ("%s\n", hostname); in print_hostname() [all …]
|
/netbsd/external/gpl2/xcvs/dist/lib/ |
H A D | xgethostname.c | 55 char *hostname = NULL; in xgethostname() local 65 hostname = x2realloc (hostname, &size); in xgethostname() 67 hostname[size_1 - 1] = '\0'; in xgethostname() 70 if (gethostname (hostname, size_1) == 0) in xgethostname() 72 if (! hostname[size_1 - 1]) in xgethostname() 80 free (hostname); in xgethostname() 86 return hostname; in xgethostname()
|
/netbsd/external/bsd/ppp/dist/sample/ |
H A D | pap-secrets | 11 #hostname * password 14 #client hostname <password> 192.168.1.1 20 #* hostname "" 22 # other accounts that should not be able to use pppd! Replace hostname 23 # with your local hostname. 24 #guest hostname "*" - 25 #master hostname "*" - 26 #root hostname "*" - 27 #support hostname "*" - 28 #stats hostname "*" -
|
/netbsd/lib/libc/compat/net/ |
H A D | compat_ns_addr.c | 59 char *hostname, *socketname, *cp; in ns_addr() local 73 if ((hostname = strchr(buf, '#')) != NULL) in ns_addr() 76 hostname = strchr(buf, '.'); in ns_addr() 78 ((hostname && cp < hostname) || (hostname == 0))) { in ns_addr() 79 hostname = cp; in ns_addr() 84 if (hostname) in ns_addr() 85 *hostname++ = 0; in ns_addr() 89 if (hostname == 0) in ns_addr() 92 socketname = strchr(hostname, separator); in ns_addr() 98 Field(hostname, addr.x_host.c_host, 6); in ns_addr()
|
/netbsd/external/ibm-public/postfix/dist/src/util/ |
H A D | inet_addr_host.c | 67 int inet_addr_host(INET_ADDR_LIST *addr_list, const char *hostname) in inet_addr_host() argument 88 if (*hostname == 0) { in inet_addr_host() 91 } else if (*hostname == '[' in inet_addr_host() 92 && hostname[(hostnamelen = strlen(hostname)) - 1] == ']') { in inet_addr_host() 93 hname = mystrndup(hostname + 1, hostnamelen - 2); in inet_addr_host() 96 hname = hostname; in inet_addr_host() 109 myname, res->ai_family, hostname); in inet_addr_host() 131 if (hname && hname != hostname) in inet_addr_host()
|
H A D | myaddrinfo.c | 335 if (hostname == 0) { in hostname_to_sockaddr_pf() 359 if ((hp = gethostbyname(hostname)) == 0) in hostname_to_sockaddr_pf() 439 if (!hostname) { in hostname_to_sockaddr_pf() 447 hostname = "::"; in hostname_to_sockaddr_pf() 450 hostname = "0.0.0.0"; in hostname_to_sockaddr_pf() 651 MAI_HOSTNAME_STR *hostname, in sockaddr_to_hostname() argument 673 if (hostname != 0) { in sockaddr_to_hostname() 688 memcpy(hostname->buf, hp->h_name, len + 1); in sockaddr_to_hostname() 717 hostname ? hostname->buf : (char *) 0, in sockaddr_to_hostname() 718 hostname ? sizeof(hostname->buf) : 0, in sockaddr_to_hostname() [all …]
|
/netbsd/lib/libc/net/ |
H A D | ethers.c | 82 ether_ntohost(char *hostname, const struct ether_addr *e) in ether_ntohost() argument 88 _DIAGASSERT(hostname != NULL); in ether_ntohost() 119 ypbuflen = ether_line(ypbuf, &try, hostname); in ether_ntohost() 126 if (ether_line(p, &try, hostname) == 0 && in ether_ntohost() 141 ether_hostton(const char *hostname, struct ether_addr *e) in ether_hostton() argument 147 int hostlen = (int)strlen(hostname); in ether_hostton() 150 _DIAGASSERT(hostname != NULL); in ether_hostton() 170 if (yp_match(ypdom, "ethers.byname", hostname, hostlen, in ether_hostton() 180 if (ether_line(p, e, try) == 0 && strcmp(hostname, try) == 0) in ether_hostton() 194 ether_line(const char *l, struct ether_addr *e, char *hostname) in ether_line() argument [all …]
|
/netbsd/bin/hostname/ |
H A D | hostname.c | 60 char *p, hostname[MAXHOSTNAMELEN + 1]; in main() local 83 if (gethostname(hostname, sizeof(hostname))) in main() 85 hostname[sizeof(hostname) - 1] = '\0'; in main() 86 if (sflag && (p = strchr(hostname, '.'))) in main() 88 (void)printf("%s\n", hostname); in main()
|
/netbsd/crypto/external/bsd/openssh/dist/ |
H A D | auth-rhosts.c | 57 check_rhosts_file(const char *filename, const char *hostname, in check_rhosts_file() argument 153 if (!innetgr(host + 1, hostname, NULL, NULL) && in check_rhosts_file() 156 } else if (strcasecmp(host, hostname) && in check_rhosts_file() 191 auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, in auth_rhosts2() argument 201 client_user, hostname, ipaddr); in auth_rhosts2() 242 if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2() 245 "/etc/hosts.equiv.", hostname, ipaddr); in auth_rhosts2() 248 if (check_rhosts_file(_PATH_SSH_HOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2() 251 "%.100s.", hostname, ipaddr, _PATH_SSH_HOSTS_EQUIV); in auth_rhosts2() 319 if (check_rhosts_file(path, hostname, ipaddr, in auth_rhosts2() [all …]
|
/netbsd/usr.bin/talk/ |
H A D | get_names.c | 56 char hostname[MAXHOSTNAMELEN + 1]; in get_names() local 78 (void)estrlcpy(hostname, cp, sizeof(hostname)); in get_names() 80 if (gethostname(hostname, sizeof(hostname)) == -1) in get_names() 82 hostname[sizeof(hostname) - 1] = '\0'; in get_names() 84 my_machine_name = hostname; in get_names()
|
/netbsd/lib/libutil/ |
H A D | pidlock.c | 52 char hostname[MAXHOSTNAMELEN + 1]; in pidlock() local 66 if (gethostname(hostname, sizeof(hostname))) in pidlock() 68 hostname[sizeof(hostname) - 1] = '\0'; in pidlock() 71 for (p = hostname; *p != '\0'; p++) { in pidlock() 82 (int) getpid(), hostname) >= (int)sizeof(tempfile)) { in pidlock() 96 len = strlen(hostname); in pidlock() 97 if ((size_t)write(f, hostname, len) != len in pidlock() 141 strcmp(s, hostname) == 0) { in pidlock()
|
/netbsd/usr.bin/login/ |
H A D | common.c | 80 char term[64], *envinit[1], *hostname, *tty, *nested; variable 175 hname = (hostname == NULL) ? "?" : hostname; in update_db() 196 } else if (hostname) { in update_db() 247 if (hostname) { in doutmpx() 285 if (hostname) in dolastlogx() 286 (void)strncpy(ll.ll_host, hostname, sizeof(ll.ll_host)); in dolastlogx() 307 if (hostname) in doutmp() 339 if (hostname) in dolastlog() 353 if (hostname) { in badlogin() 355 failures, failures > 1 ? "S" : "", hostname); in badlogin() [all …]
|
/netbsd/external/bsd/openpam/dist/lib/libpam/ |
H A D | pam_start.c | 68 char *hostname = NULL; in pam_start() local 86 if ((hostname = malloc(hostname_size)) == NULL) in pam_start() 88 if (gethostname(hostname, hostname_size) != 0) in pam_start() 89 strlcpy(hostname, "localhost", hostname_size); in pam_start() 90 if ((r = pam_set_item(ph, PAM_HOST, hostname)) != PAM_SUCCESS) in pam_start() 98 free(hostname); in pam_start() 103 free(hostname); in pam_start()
|
/netbsd/external/bsd/ntp/dist/ntpd/ |
H A D | ntp_peer.c | 196 && !strcasecmp(p->hostname, hostname)) in findexistingpeer_name() 523 free(p->hostname); in free_peer() 843 (hostname) in newpeer() 844 ? hostname in newpeer() 851 (hostname) in newpeer() 852 ? hostname in newpeer() 861 (hostname) in newpeer() 862 ? hostname in newpeer() 869 (hostname) in newpeer() 870 ? hostname in newpeer() [all …]
|
/netbsd/external/bsd/am-utils/dist/fsinfo/ |
H A D | fsinfo.c | 58 char hostname[MAXHOSTNAMELEN + 1]; variable 125 xstrlcpy(hostname, optarg, sizeof(hostname)); in fsi_get_args() 232 if (!*hostname && gethostname(hostname, sizeof(hostname)) < 0) { in main() 236 hostname[sizeof(hostname) - 1] = '\0'; in main()
|
/netbsd/usr.sbin/rpc.statd/ |
H A D | statd.c | 242 char hostname[MAXHOSTNAMELEN + 1]; in change_host() local 248 for (ptr = hostname; *ptr; ptr++) in change_host() 252 key.data = hostname; in change_host() 253 key.size = ptr - hostname + 1; in change_host() 277 find_host(char *hostname, HostInfo *hp) in find_host() argument 282 for (ptr = hostname; *ptr; ptr++) in find_host() 286 key.data = hostname; in find_host() 287 key.size = ptr - hostname + 1; in find_host() 559 notify_one_host(const char *hostname) in notify_one_host() argument 574 hostname, our_hostname); in notify_one_host() [all …]
|
/netbsd/crypto/external/bsd/heimdal/dist/lib/krb5/ |
H A D | krbhst.c | 190 char *hostname; member 278 hi->hostname[strcspn(hi->hostname, "/")] = '\0'; in parse_hostspec() 279 strlwr(hi->hostname); in parse_hostspec() 320 memcpy((*to)->hostname, from->hostname, hostnamelen + 1); in _krb5_krbhost_info_move() 333 strcmp(h->hostname, host->hostname) == 0) { in append_host_hostinfo() 371 snprintf(hostname, hostlen, "%s%s%s", proto, host->hostname, portstr); in krb5_krbhst_format_string() 710 if (kd->hostname) in hostnames_get_hosts() 915 free(handle->hostname); in krbhost_dealloc() 1031 char *hostname, in krb5_krbhst_next_as_string() argument 1052 free(handle->hostname); in krb5_krbhst_set_hostname() [all …]
|
/netbsd/usr.sbin/timed/timedc/ |
H A D | cmds.c | 185 hostname, (unsigned long)sec); in daydiff() 198 warnx("%s will not tell us the date", hostname); in daydiff() 243 const char *hostname; in clockdiff() local 263 printf("%s is down\n", hostname); in clockdiff() 267 hostname); in clockdiff() 270 printf("%s is unreachable\n", hostname); in clockdiff() 283 hostname, avg/SECDAY, myname(CACHED)); in clockdiff() 287 hostname, -avg/SECDAY, myname(CACHED)); in clockdiff() 294 hostname, measure_delta, myname(CACHED)); in clockdiff() 297 hostname, myname(CACHED)); in clockdiff() [all …]
|
/netbsd/external/bsd/tmux/usr.bin/tmux/ |
H A D | utempter.c | 60 doutmpx(const char *username, const char *hostname, const char *tty, in doutmpx() argument 69 if (hostname) in doutmpx() 70 (void)strncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); in doutmpx() 82 login_utmpx(const char *username, const char *hostname, const char *tty, in login_utmpx() argument 85 doutmpx(username, hostname, tty, now, USER_PROCESS, getpid()); in login_utmpx() 97 login_utmp(const char *username, const char *hostname, const char *tty, in login_utmp() argument 104 if (hostname) in login_utmp() 105 (void)strncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); in login_utmp()
|