Home
last modified time | relevance | path

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

12345678910>>...24

/freebsd/crypto/heimdal/appl/login/
H A Dutmp_login.c42 shrink_hostname (const char *hostname, in shrink_hostname() argument
50 if (strlen(hostname) < dst_sz) { in shrink_hostname()
51 strlcpy (dst, hostname, dst_sz); in shrink_hostname()
55 hd = strchr (hostname, '.'); in shrink_hostname()
58 && hd - hostname < dst_sz) { in shrink_hostname()
59 strlcpy (dst, hostname, dst_sz); in shrink_hostname()
60 dst[hd - hostname] = '\0'; in shrink_hostname()
66 strncpy (dst, hostname, dst_sz); in shrink_hostname()
75 strncpy (dst, hostname, dst_sz); in shrink_hostname()
100 if (hostname[0]) { in prepare_utmp()
[all …]
/freebsd/usr.sbin/bsdconfig/networking/share/
H A Dhostname.subr43 # f_dialog_hnerror $error $hostname
64 # f_dialog_validate_hostname $hostname
93 # Edits the current hostname.
98 local hostname="$( f_sysrc_get 'hostname:-$(hostname)' )"
112 f_dialog_input hostname "$msg" "$hostname" \
119 # Save hostname only if the user changed the hostname.
124 'f_sysrc_set hostname "%s"' "$hostname"
136 if [ "$( hostname )" != "$( f_sysrc_get hostname )" ]; then
146 "$( hostname )" "$hostname"
149 "$( hostname )" "$hostname" \
[all …]
/freebsd/etc/mail/
H A Dvirtusertable.sample2 # Map one or all usernames at a source hostname to a specific (or the same)
3 # username at another target hostname. Remember to add the source hostname
5 # source hostname.
7 username@a.sample.hostname localuser
8 username@a.sample.hostname specificuser@a.possibly.different.hostname
9 @another.sample.hostname specificuser@a.possibly.different.hostname
10 @yet.another.sample.hostname %1@a.possibly.different.hostname
/freebsd/contrib/ntp/sntp/
H A Dkod_management.c23 const char *hostname, in search_entry() argument
30 if (!strcmp(kod_db[a]->hostname, hostname)) in search_entry()
42 if (!strcmp(kod_db[a]->hostname, hostname)) { in search_entry()
53 const char * hostname, in add_entry() argument
64 strlcpy(pke->hostname, hostname, sizeof(pke->hostname)); in add_entry()
70 if (strcmp(kod_db[n]->hostname, pke->hostname) >= 0) in add_entry()
74 0 == strcmp(kod_db[n]->hostname, pke->hostname)) { in add_entry()
91 const char * hostname, in delete_entry() argument
98 if (!strcmp(kod_db[a]->hostname, hostname) in delete_entry()
168 kod_db[a]->hostname); in write_kod_db()
[all …]
/freebsd/contrib/libevent/sample/
H A Dhostcheck.c163 static int hostmatch(const char *hostname, const char *pattern) in hostmatch() argument
170 return Curl_raw_equal(pattern, hostname) ? in hostmatch()
183 return Curl_raw_equal(pattern, hostname) ? in hostmatch()
186 hostname_label_end = strchr(hostname, '.'); in hostmatch()
194 if(hostname_label_end - hostname < pattern_label_end - pattern) in hostmatch()
199 return Curl_raw_nequal(pattern, hostname, prefixlen) && in hostmatch()
205 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) in Curl_cert_hostcheck() argument
208 !hostname || !*hostname) /* sanity check */ in Curl_cert_hostcheck()
211 if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ in Curl_cert_hostcheck()
214 if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) in Curl_cert_hostcheck()
H A Dopenssl_hostname_validation.c64 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { in matches_common_name() argument
95 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) { in matches_common_name()
112 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *… in matches_subject_alternative_name() argument
139 if (Curl_cert_hostcheck(dns_name, hostname) in matches_subject_alternative_name()
164 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) { in validate_hostname() argument
167 if((hostname == NULL) || (server_cert == NULL)) in validate_hostname()
171 result = matches_subject_alternative_name(hostname, server_cert); in validate_hostname()
174 result = matches_common_name(hostname, server_cert); in validate_hostname()
/freebsd/contrib/ntp/sntp/libevent/sample/
H A Dhostcheck.c163 static int hostmatch(const char *hostname, const char *pattern) in hostmatch() argument
170 return Curl_raw_equal(pattern, hostname) ? in hostmatch()
183 return Curl_raw_equal(pattern, hostname) ? in hostmatch()
186 hostname_label_end = strchr(hostname, '.'); in hostmatch()
194 if(hostname_label_end - hostname < pattern_label_end - pattern) in hostmatch()
199 return Curl_raw_nequal(pattern, hostname, prefixlen) && in hostmatch()
205 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) in Curl_cert_hostcheck() argument
208 !hostname || !*hostname) /* sanity check */ in Curl_cert_hostcheck()
211 if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ in Curl_cert_hostcheck()
214 if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) in Curl_cert_hostcheck()
H A Dopenssl_hostname_validation.c64 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { in matches_common_name() argument
95 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) { in matches_common_name()
112 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *… in matches_subject_alternative_name() argument
139 if (Curl_cert_hostcheck(dns_name, hostname) in matches_subject_alternative_name()
164 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) { in validate_hostname() argument
167 if((hostname == NULL) || (server_cert == NULL)) in validate_hostname()
171 result = matches_subject_alternative_name(hostname, server_cert); in validate_hostname()
174 result = matches_common_name(hostname, server_cert); in validate_hostname()
/freebsd/contrib/ofed/infiniband-diags/src/
H A Drdma-ndd.c88 const char *device, const char *hostname) in build_node_desc() argument
101 field = hostname; in build_node_desc()
297 update_node_desc(device, hostname, 1); in process_udev_event()
305 char hostname[128]; in monitor() local
337 if (read_hostname(hn_fd, hostname, sizeof(hostname)) != 0) in monitor()
338 hostname[0] = '\0'; in monitor()
344 process_udev_event(ud_fd, hostname); in monitor()
385 char hostname[128]; in main() local
423 if (read_hostname(fd, hostname, sizeof(hostname)) != 0) in main()
424 hostname[0] = '\0'; in main()
[all …]
/freebsd/usr.sbin/bsdconfig/share/media/
H A Dhttp.subr240 hostname="${hostname#\[}"
244 hostname="${hostname%%\]:*}"
248 hostname="${hostname#\[}"
251 hostname="${hostname%%\]:*}"
255 hostname="${hostname#\[}"
257 hostname="${hostname%%\]*}"
261 hostname="${hostname#\[}"
262 hostname="${hostname%\]}"
273 hostname="${hostname%%:*}"
279 hostname="${hostname%%:*}"
[all …]
/freebsd/usr.sbin/rpc.statd/
H A Dfile.c77 HostInfo *find_host(char *hostname, int create) in find_host() argument
86 if (getaddrinfo(hostname, NULL, NULL, &ai1) != 0) in find_host()
90 if (!strncasecmp(hostname, hp->hostname, SM_MAXSTRLEN)) in find_host()
95 if (hp->hostname[0] != '\0' && in find_host()
96 getaddrinfo(hp->hostname, NULL, NULL, &ai2) != 0) in find_host()
155 strncpy(spare_slot->hostname, hostname, SM_MAXSTRLEN); in find_host()
254 static int notify_one_host(char *hostname, int verbose) in notify_one_host() argument
269 cli = clnt_create(hostname, SM_PROG, SM_VERS, "udp"); in notify_one_host()
272 syslog(LOG_ERR, "Failed to contact host %s%s", hostname, in notify_one_host()
282 syslog(LOG_ERR, "Failed to contact rpc.statd at host %s", hostname); in notify_one_host()
[all …]
/freebsd/libexec/rc/rc.d/
H A Dhostname53 if [ -z "${hostname}" -a \
55 hostname=`/bin/kenv dhcp.host-name`
61 if [ -z "${hostname}" ]; then
74 startmsg -n "Setting hostname: ${hostname}"
75 /bin/hostname "${hostname}"
/freebsd/crypto/openssh/
H A Dauth-rhosts.c58 check_rhosts_file(const char *filename, const char *hostname, in check_rhosts_file() argument
154 if (!innetgr(host + 1, hostname, NULL, NULL) && in check_rhosts_file()
157 } else if (strcasecmp(host, hostname) && in check_rhosts_file()
192 auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, in auth_rhosts2() argument
202 client_user, hostname, ipaddr); in auth_rhosts2()
243 if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2()
246 "/etc/hosts.equiv.", hostname, ipaddr); in auth_rhosts2()
249 if (check_rhosts_file(_PATH_SSH_HOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2()
252 "%.100s.", hostname, ipaddr, _PATH_SSH_HOSTS_EQUIV); in auth_rhosts2()
320 if (check_rhosts_file(path, hostname, ipaddr, in auth_rhosts2()
[all …]
H A Ddns.c166 is_numeric_hostname(const char *hostname) in is_numeric_hostname() argument
174 if (hostname == NULL) { in is_numeric_hostname()
183 if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) { in is_numeric_hostname()
196 verify_host_key_dns(const char *hostname, struct sockaddr *address, in verify_host_key_dns() argument
218 if (is_numeric_hostname(hostname)) { in verify_host_key_dns()
223 result = getrrsetbyname(hostname, DNS_RDATACLASS_IN, in verify_host_key_dns()
305 export_dns_rr(const char *hostname, struct sshkey *key, FILE *f, int generic, in export_dns_rr() argument
323 hostname, DNS_RDATATYPE_SSHFP, in export_dns_rr()
327 fprintf(f, "%s IN SSHFP %d %d ", hostname, in export_dns_rr()
/freebsd/tools/test/stress2/testcases/udp/
H A Dudp.c61 const char *hostname; in test() local
75 hostname = "localhost"; in test()
77 hostname = getenv("BLASTHOST"); in test()
78 host = gethostbyname(hostname); in test()
84 sock_in.sin_addr.s_addr = inet_addr(hostname); in test()
86 err(1, "host: %s", hostname); in test()
98 printf("udp %s:9 with %d bytes\n", hostname, bufsize); in test()
/freebsd/usr.sbin/rpc.umntall/
H A Drpc.umntall.c169 do_umntall(char *hostname) { in do_umntall() argument
176 clp = clnt_create_timed(hostname, MOUNTPROG, MOUNTVERS, "udp", in do_umntall()
179 warnx("%s: %s", hostname, clnt_spcreateerror("MOUNTPROG")); in do_umntall()
187 warnx("%s: %s", hostname, clnt_sperror(clp, "MOUNTPROC_UMNTALL")); in do_umntall()
197 do_umount(char *hostname, char *dirp) { in do_umount() argument
204 clp = clnt_create_timed(hostname, MOUNTPROG, MOUNTVERS, "udp", in do_umount()
207 warnx("%s: %s", hostname, clnt_spcreateerror("MOUNTPROG")); in do_umount()
214 warnx("%s: %s", hostname, clnt_sperror(clp, "MOUNTPROC_UMNT")); in do_umount()
224 is_mounted(char *hostname, char *dirp) { in is_mounted() argument
230 if (strlen(hostname) + strlen(dirp) >= MNAMELEN) in is_mounted()
[all …]
/freebsd/bin/hostname/
H A Dhostname.c46 char hostname[MAXHOSTNAMELEN], *hostp, *p; in main() local
79 hostp = hostname; in main()
80 if (gethostname(hostname, (int)sizeof(hostname))) in main()
83 p = strchr(hostname, '.'); in main()
87 p = strchr(hostname, '.'); in main()
/freebsd/contrib/openpam/lib/libpam/
H A Dpam_start.c68 char hostname[HOST_NAME_MAX + 1]; in pam_start() local
77 if (gethostname(hostname, sizeof hostname) != 0) in pam_start()
78 strlcpy(hostname, "localhost", sizeof hostname); in pam_start()
79 if ((r = pam_set_item(ph, PAM_HOST, hostname)) != PAM_SUCCESS) in pam_start()
/freebsd/contrib/ntp/ntpd/
H A Dntp_peer.c194 && !strcasecmp(p->hostname, hostname)) in findexistingpeer_name()
521 free(p->hostname); in free_peer()
841 (hostname) in newpeer()
842 ? hostname in newpeer()
849 (hostname) in newpeer()
850 ? hostname in newpeer()
859 (hostname) in newpeer()
860 ? hostname in newpeer()
867 (hostname) in newpeer()
868 ? hostname in newpeer()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dkrbhst.c245 hi->hostname[strcspn(hi->hostname, "/")] = '\0'; in parse_hostspec()
246 strlwr(hi->hostname); in parse_hostspec()
290 memcpy((*to)->hostname, from->hostname, hostnamelen + 1); in _krb5_krbhost_info_move()
303 strcmp(h->hostname, host->hostname) == 0) { in append_host_hostinfo()
341 snprintf(hostname, hostlen, "%s%s%s", proto, host->hostname, portstr); in krb5_krbhst_format_string()
384 char *hostname = host->hostname; in krb5_krbhst_get_addrinfo() local
408 if (strchr(hostname, '.') && hostname[strlen(hostname) - 1] != '.') { in krb5_krbhst_get_addrinfo()
409 ret = asprintf(&hostname, "%s.", host->hostname); in krb5_krbhst_get_addrinfo()
415 if (hostname != host->hostname) in krb5_krbhst_get_addrinfo()
416 free(hostname); in krb5_krbhst_get_addrinfo()
[all …]
/freebsd/lib/libc/net/
H A Dether_addr.c67 ether_line(const char *l, struct ether_addr *e, char *hostname) in ether_line() argument
72 &o[4], &o[5], hostname); in ether_line()
138 ether_ntohost(char *hostname, const struct ether_addr *e) in ether_ntohost() argument
174 strcpy(hostname, local_host); in ether_ntohost()
188 ether_hostton(const char *hostname, struct ether_addr *e) in ether_hostton() argument
209 if (yp_match(yp_domain, "ethers.byname", hostname, in ether_hostton()
210 strlen(hostname), &result, &resultlen)) { in ether_hostton()
219 if (!strcmp(hostname, local_host)) { in ether_hostton()
/freebsd/sys/contrib/openzfs/contrib/initramfs/hooks/
H A Dzfs.in55 hostname="$(mktemp -t hostname.XXXXXXXXXX)"
56 hostname > "$hostname"
57 copy_file config "$hostname" "/etc/hostname"
58 rm -f "$hostname"
/freebsd/contrib/sendmail/contrib/
H A DAuthRealm.p011 + result = reset_saslconn(&conn, hostname, remoteip, \
17 hostname = macvalue('j', e);
20 - AuthRealm = hostname;
30 + result = sasl_server_new("smtp", hostname, AuthRealm, NULL,
39 - result = sasl_server_new("smtp", hostname, NULL, NULL, NULL,
40 + result = sasl_server_new("smtp", hostname, AuthRealm, NULL, NULL,
/freebsd/libexec/bootpd/
H A Dlookup.c29 lookup_hwa(char *hostname, int htype) in lookup_hwa() argument
40 if (ether_hostton(hostname, &ea)) { in lookup_hwa()
42 hostname); in lookup_hwa()
63 lookup_ipa(char *hostname, u_int32 *result) in lookup_ipa() argument
66 hp = gethostbyname(hostname); in lookup_ipa()
/freebsd/contrib/smbfs/smbutil/
H A Dlookup.c63 char *hostname; in cmd_lookup() local
92 hostname = argv[argc - 1]; in cmd_lookup()
94 error = nbns_resolvename(hostname, ctx, &sap); in cmd_lookup()
96 smb_error("unable to resolve %s", error, hostname); in cmd_lookup()
100 printf("IP address of %s: %s\n", hostname, inet_ntoa(((struct sockaddr_in*)sap)->sin_addr)); in cmd_lookup()

12345678910>>...24