r23779: Change from v2 or later to v3 or later.
[samba.git] / source3 / web / diagnose.c
index f4b022cf587d13a4579b90d0ba6f2c8b5e31fdc4..ae0103684ece6673c941cd1ed9c329eae6770aa9 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -25,10 +25,6 @@ extern struct in_addr loopback_ip;
 
 #ifdef WITH_WINBIND
 
-NSS_STATUS winbindd_request(int req_type,
-                       struct winbindd_request *request,
-                       struct winbindd_response *response);
-
 /* check to see if winbind is running by pinging it */
 
 BOOL winbindd_running(void)
@@ -64,16 +60,18 @@ BOOL nmbd_running(void)
    then closing it */
 BOOL smbd_running(void)
 {
-       static struct cli_state cli;
+       NTSTATUS status;
+       struct cli_state *cli;
 
-       if (!cli_initialise(&cli))
+       if ((cli = cli_initialise()) == NULL)
                return False;
 
-       if (!cli_connect(&cli, global_myname(), &loopback_ip)) {
-               cli_shutdown(&cli);
+       status = cli_connect(cli, global_myname(), &loopback_ip);
+       if (!NT_STATUS_IS_OK(status)) {
+               cli_shutdown(cli);
                return False;
        }
 
-       cli_shutdown(&cli);
+       cli_shutdown(cli);
        return True;
 }