Lines Matching refs:domain
53 #define SMB_IS_FQDN(domain) (strchr(domain, '.') != NULL)
79 * get the discovered DC and/or domain information.
102 * This is the entry point for discovering a domain controller for the
103 * specified domain. Called during join domain, and then periodically
110 * domain - domain to be discovered (can either be NetBIOS or DNS domain)
113 * dp - on success, dp will be filled with the discovered DC and domain
116 * Returns B_TRUE if the DC/domain info is available.
119 smb_locate_dc(char *domain, smb_domainex_t *dp)
126 if (domain == NULL || *domain == '\0') {
134 if (strcmp(smb_dclocator.sdl_domain, domain)) {
135 (void) strlcpy(smb_dclocator.sdl_domain, domain,
138 syslog(LOG_DEBUG, "smb_locate_dc new dom=%s", domain);
139 smb_set_krb5_realm(domain);
177 * Tell the domain discovery service to run again now,
256 * If domain discovery is running, wait for it to finish.
286 * This is the domain and DC discovery service: it gets woken up whenever
287 * there is need to locate a domain controller.
289 * Upon success, the SMB domain cache will be populated with the discovered
290 * DC and domain info.
318 "not a domain member");
391 * Discovers a domain controller for the specified domain via DNS.
392 * After the domain controller is discovered successfully primary and
393 * trusted domain infromation will be queried using RPC queries.
399 smb_ddiscover_main(char *domain, smb_domainex_t *dxi)
403 if (domain[0] == '\0') {
404 syslog(LOG_DEBUG, "smb_ddiscover_main NULL domain");
413 status = smb_ads_lookup_msdcs(domain, &dxi->d_dci);
420 status = smb_ddiscover_qinfo(domain, dxi->d_dci.dc_name, dxi);
423 "smb_ddiscover_main can't get domain info (%s)",
433 /* Don't need the trusted domain list anymore. */
440 * Obtain primary and trusted domain information using LSA queries.
442 * domain - either NetBIOS or fully-qualified domain name
445 smb_ddiscover_qinfo(char *domain, char *server, smb_domainex_t *dxi)
450 ret = lsa_query_dns_domain_info(server, domain, &dxi->d_primary);
453 tmp = smb_ddiscover_use_config(domain, dxi);
456 tmp = lsa_query_primary_domain_info(server, domain, &dxi->d_primary);
464 smb_ddiscover_enum_trusted(domain, server, dxi);
471 * domain - either NetBIOS or fully-qualified domain name.
474 smb_ddiscover_enum_trusted(char *domain, char *server, smb_domainex_t *dxi)
480 status = lsa_enum_trusted_domains_ex(server, domain, list);
482 (void) lsa_enum_trusted_domains(server, domain, list);
486 * If the domain to be discovered matches the current domain (i.e the
487 * value of either domain or fqdn configuration), then get the primary
488 * domain information from SMF.
491 smb_ddiscover_use_config(char *domain, smb_domainex_t *dxi)
505 if (SMB_IS_FQDN(domain))
506 use = (smb_strcasecmp(dinfo->di_fqname, domain, 0) == 0);
508 use = (smb_strcasecmp(dinfo->di_nbname, domain, 0) == 0);
526 smb_set_krb5_realm(char *domain)
530 if (domain == NULL || domain[0] == '\0') {
536 (void) strlcpy(realm, domain, sizeof (realm));