da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
cb174861876aea6950a7ab4ce944aff84b1914cdjoyce mcintosh * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#include <sys/tzfile.h>
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesstatic void *mlsvc_timecheck(void *);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States#define MLSVC_TIMECHECK_INTERVAL (10 * SECSPERMIN) /* 10 minutes */
8d7e41661dc4633488e93b13363137523ce59977jose borrego * All NDR RPC service initialization is invoked from here.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Returns 0 upon success. Otherwise, returns -1.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States pthread_t tid;
29bd28862cfb8abbd3a0f0a4b17e08bbc3652836Alan Wright return (-1);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States smb_quota_init();
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States netdfs_initialize();
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as (void) pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States rc = pthread_create(&tid, &tattr, mlsvc_timecheck, 0);
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as return (rc);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States netdfs_finalize();
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States smb_quota_fini();
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as/*ARGSUSED*/
dc20a3024900c47dd2ee44b9707e6df38f7d62a5asstatic void *
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesmlsvc_timecheck(void *arg)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States smb_domainex_t di;
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as for (;;) {
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States (void) sleep(MLSVC_TIMECHECK_INTERVAL);
380acbbe9da7dc2cbab5b6db169ec6968dd927faGordon Ross if (smb_config_get_secmode() != SMB_SECMODE_DOMAIN)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
380acbbe9da7dc2cbab5b6db169ec6968dd927faGordon Ross /* Avoid interfering with DC discovery. */
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as /*NOTREACHED*/