Print this page
1575 untangle libmlrpc from SMB server
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
NEX-15558 SMB logon fails during 1st second after service start
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-15558 SMB logon fails during 1st second after service start
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-2225 Unable to join NexentaStor to 2008 AD
re #12435 rb3958 r10 is added 2 times to panic info
re #12393 rb3935 Kerberos and smbd disagree about who is our AD server


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #include <sys/errno.h>
  27 #include <sys/tzfile.h>
  28 #include <stdlib.h>
  29 #include <unistd.h>
  30 #include <strings.h>
  31 #include <string.h>
  32 #include <rpc/xdr.h>
  33 #include <synch.h>
  34 #include <pthread.h>
  35 #include <smbsrv/libsmb.h>
  36 #include <smbsrv/libmlsvc.h>
  37 #include <mlsvc.h>
  38 
  39 static void *mlsvc_timecheck(void *);
  40 
  41 #define MLSVC_TIMECHECK_INTERVAL        (10 * SECSPERMIN) /* 10 minutes */
  42 
  43 /*


  87         smb_logon_fini();
  88         spoolss_finalize();
  89         svcctl_finalize();
  90         logr_finalize();
  91         netdfs_finalize();
  92         smb_quota_fini();
  93 }
  94 
  95 /*ARGSUSED*/
  96 static void *
  97 mlsvc_timecheck(void *arg)
  98 {
  99         smb_domainex_t di;
 100 
 101         for (;;) {
 102                 (void) sleep(MLSVC_TIMECHECK_INTERVAL);
 103 
 104                 if (smb_config_get_secmode() != SMB_SECMODE_DOMAIN)
 105                         continue;
 106 
 107                 /* Avoid interfering with DC discovery. */
 108                 if (smb_ddiscover_wait() != 0)
 109                         continue;
 110 
 111                 if (!smb_domain_getinfo(&di))
 112                         continue;
 113 
 114                 ndr_srvsvc_timecheck(di.d_dci.dc_name,
 115                     di.d_primary.di_nbname);
 116         }
 117 
 118         /*NOTREACHED*/
 119         return (NULL);
 120 }


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #include <sys/errno.h>
  27 #include <sys/tzfile.h>
  28 #include <stdlib.h>
  29 #include <unistd.h>
  30 #include <strings.h>
  31 #include <string.h>
  32 #include <rpc/xdr.h>
  33 #include <synch.h>
  34 #include <pthread.h>
  35 #include <smbsrv/libsmb.h>
  36 #include <smbsrv/libmlsvc.h>
  37 #include <mlsvc.h>
  38 
  39 static void *mlsvc_timecheck(void *);
  40 
  41 #define MLSVC_TIMECHECK_INTERVAL        (10 * SECSPERMIN) /* 10 minutes */
  42 
  43 /*


  87         smb_logon_fini();
  88         spoolss_finalize();
  89         svcctl_finalize();
  90         logr_finalize();
  91         netdfs_finalize();
  92         smb_quota_fini();
  93 }
  94 
  95 /*ARGSUSED*/
  96 static void *
  97 mlsvc_timecheck(void *arg)
  98 {
  99         smb_domainex_t di;
 100 
 101         for (;;) {
 102                 (void) sleep(MLSVC_TIMECHECK_INTERVAL);
 103 
 104                 if (smb_config_get_secmode() != SMB_SECMODE_DOMAIN)
 105                         continue;
 106 




 107                 if (!smb_domain_getinfo(&di))
 108                         continue;
 109 
 110                 srvsvc_timecheck(di.d_dci.dc_name,
 111                     di.d_primary.di_nbname);
 112         }
 113 
 114         /*NOTREACHED*/
 115         return (NULL);
 116 }