RIP BOOL. Convert BOOL -> bool. I found a few interesting
[nivanova/samba-autobuild/.git] / source3 / utils / net_util.c
index 805104cefa11f4f35ecadfb78790852da9b80f7e..c08eae3337514ee7519f78af540ff06ff3bbc8dc 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,
  *  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"
 #include "utils/net.h"
 
-BOOL is_valid_policy_hnd(const POLICY_HND *hnd)
+bool is_valid_policy_hnd(const POLICY_HND *hnd)
 {
        POLICY_HND tmp;
        ZERO_STRUCT(tmp);
@@ -32,14 +31,14 @@ BOOL is_valid_policy_hnd(const POLICY_HND *hnd)
 NTSTATUS net_rpc_lookup_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
                             const char *name, const char **ret_domain,
                             const char **ret_name, DOM_SID *ret_sid,
-                            enum SID_NAME_USE *ret_type)
+                            enum lsa_SidType *ret_type)
 {
        struct rpc_pipe_client *lsa_pipe;
        POLICY_HND pol;
        NTSTATUS result = NT_STATUS_OK;
        const char **dom_names;
        DOM_SID *sids;
-       uint32_t *types;
+       enum lsa_SidType *types;
 
        ZERO_STRUCT(pol);
 
@@ -59,7 +58,7 @@ NTSTATUS net_rpc_lookup_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
        }
 
        result = rpccli_lsa_lookup_names(lsa_pipe, mem_ctx, &pol, 1,
-                                        &name, &dom_names, &sids, &types);
+                                        &name, &dom_names, 1, &sids, &types);
 
        if (!NT_STATUS_IS_OK(result)) {
                /* This can happen easily, don't log an error */
@@ -81,7 +80,7 @@ NTSTATUS net_rpc_lookup_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
 
  done:
        if (is_valid_policy_hnd(&pol)) {
-               rpccli_lsa_close(lsa_pipe, mem_ctx, &pol);
+               rpccli_lsa_Close(lsa_pipe, mem_ctx, &pol);
        }
        cli_rpc_pipe_close(lsa_pipe);