RIP BOOL. Convert BOOL -> bool. I found a few interesting
[nivanova/samba-autobuild/.git] / source3 / utils / net_rpc_audit.c
index 5c81fe24d0985d39ba0888965f5ffd9c9f5398fb..b7fda2b8e379b3f5d1c19f6c82a2eb575f5c56f9 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,
@@ -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"
 #include "utils/net.h"
@@ -44,6 +43,13 @@ static void print_auditing_category(const char *policy, const char *value)
        fstring padding;
        int pad_len, col_len = 30;
 
+       if (policy == NULL) {
+               policy = "Unknown";
+       }
+       if (value == NULL) {
+               value = "Invalid";
+       }
+
        /* calculate padding space for d_printf to look nicer */
        pad_len = col_len - strlen(policy);
        padding[pad_len] = 0;
@@ -211,7 +217,7 @@ static NTSTATUS rpc_audit_enable_internal_ext(struct rpc_pipe_client *pipe_hnd,
                                              TALLOC_CTX *mem_ctx,
                                              int argc,
                                              const char **argv,
-                                             BOOL enable)
+                                             bool enable)
 {
        POLICY_HND pol;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;