2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * CDDL HEADER START
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * The contents of this file are subject to the terms of the
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Common Development and Distribution License (the "License").
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * You may not use this file except in compliance with the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * See the License for the specific language governing permissions
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * and limitations under the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * When distributing Covered Code, include this CDDL HEADER in each
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * If applicable, add the following below this CDDL HEADER, with the
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * fields enclosed by brackets "[]" replaced with your own identifying
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * information: Portions Copyright [yyyy] [name of copyright owner]
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * CDDL HEADER END
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster#define SMBD_DC_MONITOR_RETRY_INTERVAL 3 /* seconds */
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster#define SMBD_DC_MONITOR_INTERVAL 60 /* seconds */
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterstatic void *smbd_dc_monitor(void *);
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterstatic void smbd_dc_update(void);
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster/* Todo: static boolean_t smbd_set_netlogon_cred(void); */
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterstatic void smbd_join_workgroup(smb_joininfo_t *, smb_joinres_t *);
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterstatic void smbd_join_domain(smb_joininfo_t *, smb_joinres_t *);
smb_ads_init();
NULL);
return (rc);
while (smbd_online()) {
if (ds_cfg_changed) {
goto rediscover;
goto rediscover;
goto rediscover;
for (i = 0; i < SMBD_DC_MONITOR_ATTEMPTS; ++i) {
if (ds_not_responding) {
return (NULL);
case AF_INET: {
case AF_INET6: {
sizeof (in6_addr_t));
if (sock < 0)
return (errno);
if (rc < 0)
return (rc);
sizeof (nb_domain));
(void) smb_config_refresh_idmap();