Home
last modified time | relevance | path

Searched refs:hostname (Results 1 – 25 of 1061) sorted by relevance

12345678910>>...43

/netbsd-src/external/bsd/dhcpcd/dist/hooks/
H A D30-hostname1 # Set the hostname from DHCP data if required
3 # A hostname can either be a short hostname or a FQDN.
9 # This could lead to an inconsistent hostname on a DHCPv4 and DHCPv6 network
10 # where the DHCPv4 hostname is short and the DHCPv6 has an FQDN.
11 # DHCPv6 has no hostname option.
12 # RFC4702 section 3.1 says FQDN should be prefered over hostname.
14 # As such, the default is hostname_fqdn=true so that a consistent hostname
18 # If we used to set the hostname, but relinquish control of it, we should
22 # Some systems don't have hostname(1)
26 if [ -r /proc/sys/kernel/hostname ]; then
[all …]
/netbsd-src/external/bsd/ntp/dist/sntp/
H A Dkod_management.c25 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-src/external/mit/libuv/dist/src/unix/
H A Dgetaddrinfo.c103 err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); in uv__getaddrinfo_work()
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()
141 const char* hostname, in uv_getaddrinfo() argument
152 if (req == NULL || (hostname == NULL && service == NULL)) in uv_getaddrinfo()
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()
[all …]
/netbsd-src/external/bsd/libevent/dist/sample/
H A Dhostcheck.c164 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 Dopenssl_hostname_validation.c65 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-src/usr.sbin/ypserv/common/
H A Dlocalhostname.c52 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-src/external/gpl2/gettext/dist/gettext-tools/src/
H A Dhostname.c248 char hostname[MAX_COMPUTERNAME_LENGTH+1]; in xgethostname() local
249 DWORD size = sizeof (hostname); in xgethostname()
251 if (!GetComputerName (hostname, &size)) in xgethostname()
253 return xstrdup (hostname); in xgethostname()
255 char hostname[MAXHOSTNAMELEN+1]; in xgethostname()
257 if (gethostname (hostname, MAXHOSTNAMELEN) < 0) 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()
[all …]
/netbsd-src/external/gpl2/xcvs/dist/lib/
H A Dxgethostname.c55 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-src/external/bsd/ppp/dist/sample/
H A Dpap-secrets11 #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-src/lib/libc/compat/net/
H A Dcompat_ns_addr.c59 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-src/external/ibm-public/postfix/dist/src/util/
H A Dinet_addr_host.c67 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 Dmyaddrinfo.c304 int hostname_to_sockaddr_pf(const char *hostname, int pf, in hostname_to_sockaddr_pf() argument
335 if (hostname == 0) { in hostname_to_sockaddr_pf()
347 if (inet_pton(AF_INET, hostname, (void *) &addr) == 1) { 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()
461 err = getaddrinfo(hostname, service, &hints, res); in hostname_to_sockaddr_pf()
651 MAI_HOSTNAME_STR *hostname, in sockaddr_to_hostname() argument
673 if (hostname != 0) { in sockaddr_to_hostname()
[all …]
/netbsd-src/lib/libc/net/
H A Dethers.c82 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-src/bin/hostname/
H A Dhostname.c60 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-src/crypto/external/bsd/openssh/dist/
H A Dauth-rhosts.c57 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-src/usr.bin/talk/
H A Dget_names.c56 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-src/lib/libutil/
H A Dpidlock.c52 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-src/usr.bin/login/
H A Dcommon.c80 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()
248 (void)strncpy(utmpx.ut_host, hostname, sizeof(utmpx.ut_host)); 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()
308 (void)strncpy(utmp.ut_host, hostname, sizeof(utmp.ut_host)); in doutmp()
339 if (hostname) in dolastlog()
[all …]
/netbsd-src/external/bsd/openpam/dist/lib/libpam/
H A Dpam_start.c68 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-src/external/bsd/am-utils/dist/fsinfo/
H A Dfsinfo.c58 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-src/crypto/external/bsd/heimdal/dist/lib/krb5/
H A Dkrbhst.c163 strlcpy(hi->hostname, rr->u.srv->target, len + 1); in srv_find_realm()
190 char *hostname; member
266 memcpy(hi->hostname, &p[1], q - p - 1); in parse_hostspec()
267 hi->hostname[q - p - 1] = '\0'; in parse_hostspec()
272 } else if(strsep_copy(&p, ":", hi->hostname, strlen(spec) + 1) < 0) { in parse_hostspec()
278 hi->hostname[strcspn(hi->hostname, "/")] = '\0'; in parse_hostspec()
279 strlwr(hi->hostname); in parse_hostspec()
308 size_t hostnamelen = strlen(from->hostname); in _krb5_krbhost_info_move()
320 memcpy((*to)->hostname, from->hostname, hostnamelen + 1); in _krb5_krbhost_info_move()
333 strcmp(h->hostname, host->hostname) == 0) { in append_host_hostinfo()
[all …]
/netbsd-src/usr.sbin/rpc.statd/
H A Dstatd.c242 char hostname[MAXHOSTNAMELEN + 1]; in change_host() local
245 strncpy(hostname, hostnamep, MAXHOSTNAMELEN + 1); in change_host()
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
[all …]
/netbsd-src/usr.sbin/timed/timedc/
H A Dcmds.c131 daydiff(const char *hostname, const struct sockaddr_in *addr) in daydiff() argument
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
249 if ((hostname = getaddr(*argv, &server, port)) == NULL) in clockdiff()
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()
[all …]
/netbsd-src/external/bsd/tmux/usr.bin/tmux/
H A Dutempter.c60 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()
/netbsd-src/usr.sbin/fwctl/
H A Deui64.c97 static int eui64_line(const char *l, struct eui64 *e, char *hostname,
105 eui64_line(const char *l, struct eui64 *e, char *hostname, size_t len) in eui64_line() argument
127 if (strlcpy(hostname, cur, len) <= len) in eui64_line()
225 eui64_ntohost(char *hostname, size_t len, const struct eui64 *id) in eui64_ntohost() argument
262 strcpy(hostname, local_host); in eui64_ntohost()
276 eui64_hostton(const char *hostname, struct eui64 *id) in eui64_hostton() argument
297 if (yp_match(yp_domain, "eui64.byname", hostname, in eui64_hostton()
298 strlen(hostname), &result, &resultlen)) { in eui64_hostton()
308 if (strcmp(hostname, local_host) == 0) { in eui64_hostton()

12345678910>>...43