s3-svcctl: use pidl based struct SERVICE_STATUS.
[metze/samba/wip.git] / source3 / services / svc_netlogon.c
index ec379371f0be1988ec91f1909061c05c43c22bd1..2745695a1604bf01762e8fc5fce34106ecf1ddd9 100644 (file)
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *  
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "includes.h"
 /*********************************************************************
 *********************************************************************/
 
-static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_status )
+static WERROR netlogon_status( const char *service, struct SERVICE_STATUS *service_status )
 {
        ZERO_STRUCTP( service_status );
 
         service_status->type              = 0x20;
         service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
 
-       if ( share_defined("NETLOGON") ) {
+       if ( lp_servicenumber("NETLOGON") != -1 ) {
                service_status->state              = SVCCTL_RUNNING;
                service_status->win32_exit_code    = WERR_SERVICE_NEVER_STARTED;
        }
@@ -45,7 +44,7 @@ static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_stat
 /*********************************************************************
 *********************************************************************/
 
-static WERROR netlogon_stop( const char *service, SERVICE_STATUS *service_status )
+static WERROR netlogon_stop( const char *service, struct SERVICE_STATUS *service_status )
 {
        netlogon_status( service, service_status );
 
@@ -57,7 +56,7 @@ static WERROR netlogon_stop( const char *service, SERVICE_STATUS *service_status
 
 static WERROR netlogon_start( const char *service )
 {
-       if ( !share_defined("NETLOGON") )
+       if ( lp_servicenumber("NETLOGON") == -1 )
                return WERR_SERVICE_DISABLED;
 
        return WERR_ACCESS_DENIED;