r5961: final round of compiler warning fixes based on feedback from Jason Mader
authorGerald Carter <jerry@samba.org>
Tue, 22 Mar 2005 18:07:58 +0000 (18:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:13 +0000 (10:56 -0500)
source/configure.in
source/lib/util_str.c
source/libsmb/smbencrypt.c
source/rpc_server/srv_samr_nt.c
source/rpcclient/cmd_shutdown.c
source/smbd/chgpasswd.c

index e1c9ea0614e007cb132f8d0cc091df38446bed67..7afc9fd239e3d9687f62039c7b9fe004d70c0191 100644 (file)
@@ -688,8 +688,10 @@ AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h)
-AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
-AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
+AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h)
+## These fail to compile on IRIX so just check for their presence
+AC_CHECK_HEADERS(rpcsvc/yp_prot.h, sys/mode.h, [], [] -)
+AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
 AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
@@ -725,7 +727,8 @@ AC_CHECK_HEADERS(nss.h nss_common.h nsswitch.h ns_api.h sys/security.h security/
 AC_CHECK_HEADERS(stropts.h poll.h)
 AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h)
 AC_CHECK_HEADERS(sys/acl.h sys/attributes.h attr/xattr.h sys/xattr.h sys/cdefs.h glob.h)
-# These faile to compile on Solaris so just check for their presence
+
+## These faile to compile on Solaris so just check for their presence
 AC_CHECK_HEADERS(security/pam_modules.h net/if.h netinet/ip.h, [], [], -)
 
 # For experimental utmp support (lastlog on some BSD-like systems)
index 86015b355ae45db7d71248ac5271faa147d69148..8acdab355a95c4a633aaa134b13c12a4e6ce4b36 100644 (file)
@@ -799,7 +799,7 @@ DATA_BLOB strhex_to_data_blob(const char *strhex)
 {
        DATA_BLOB ret_blob = data_blob(NULL, strlen(strhex)/2+1);
 
-       ret_blob.length = strhex_to_str(ret_blob.data,  
+       ret_blob.length = strhex_to_str((char*)ret_blob.data,   
                                        strlen(strhex), 
                                        strhex);
 
index d4b05574118a1337285e9c9eadbc2333c8c33890..55e06ffe9720335213ac401d71132a6e637b394f 100644 (file)
@@ -513,7 +513,7 @@ BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags)
  *new_pw_len is the length in bytes of the possibly mulitbyte
  returned password including termination.
 ************************************************************/
-BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd,
+BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
                      int new_pwrd_size, uint32 *new_pw_len,
                      int string_flags)
 {
index b96e160156be3c55c2037d7f8f9f5751b705d895..19989838c79fecda43759c60a5cb98b25728ca58 100644 (file)
@@ -2899,7 +2899,7 @@ static BOOL set_user_info_23(SAM_USER_INFO_23 *id23, SAM_ACCOUNT *pwd)
 
        acct_ctrl = pdb_get_acct_ctrl(pwd);
 
-       if (!decode_pw_buffer((char*)id23->pass, plaintext_buf, 256, &len, STR_UNICODE)) {
+       if (!decode_pw_buffer(id23->pass, plaintext_buf, 256, &len, STR_UNICODE)) {
                pdb_free_sam(&pwd);
                return False;
        }
@@ -2950,7 +2950,7 @@ static BOOL set_user_info_23(SAM_USER_INFO_23 *id23, SAM_ACCOUNT *pwd)
  set_user_info_pw
  ********************************************************************/
 
-static BOOL set_user_info_pw(char *pass, SAM_ACCOUNT *pwd)
+static BOOL set_user_info_pw(uint8 *pass, SAM_ACCOUNT *pwd)
 {
        uint32 len;
        pstring plaintext_buf;
@@ -3096,7 +3096,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE
 
                        dump_data(100, (char *)ctr->info.id24->pass, 516);
 
-                       if (!set_user_info_pw((char *)ctr->info.id24->pass, pwd))
+                       if (!set_user_info_pw(ctr->info.id24->pass, pwd))
                                r_u->status = NT_STATUS_ACCESS_DENIED;
                        break;
 
index e42ec30ac13103d742771b1294e577cea0f9bba9..b0b92949c2a91254dd84fbadbc967fcff30fe7ba 100644 (file)
@@ -24,6 +24,9 @@
 #include "includes.h"
 #include "rpcclient.h"
 
+#if 0  /* don't uncomment this unless you remove the getopt() calls */
+       /* use net rpc shutdown instead */
+
 /****************************************************************************
 nt shutdown init
 ****************************************************************************/
@@ -96,6 +99,7 @@ static NTSTATUS cmd_shutdown_abort(struct cli_state *cli,
 
        return result;
 }
+#endif
 
 
 /* List of commands exported by this module */
@@ -103,10 +107,12 @@ struct cmd_set shutdown_commands[] = {
 
        { "SHUTDOWN"  },
 
+#if 0
        { "shutdowninit", RPC_RTYPE_NTSTATUS, cmd_shutdown_init, NULL, PI_SHUTDOWN, "Remote Shutdown (over shutdown pipe)",
                                "syntax: shutdown [-m message] [-t timeout] [-r] [-h] [-f] (-r == reboot, -h == halt, -f == force)" },
                                
        { "shutdownabort", RPC_RTYPE_NTSTATUS, cmd_shutdown_abort, NULL, PI_SHUTDOWN, "Abort Shutdown (over shutdown pipe)",
                                "syntax: shutdownabort" },
+#endif
        { NULL }
 };
index 989fc4d68c659ca81b23e8bb823ddb82d587aa96..d0e0f6e143a7ac083d50359c26c97e125a59db79 100644 (file)
@@ -747,8 +747,8 @@ static NTSTATUS check_oem_password(const char *user,
        static uchar null_pw[16];
        static uchar null_ntpw[16];
        SAM_ACCOUNT *sampass = NULL;
-       char *password_encrypted;
-       const char *encryption_key;
+       uint8 *password_encrypted;
+       const uint8 *encryption_key;
        const uint8 *lanman_pw, *nt_pw;
        uint16 acct_ctrl;
        uint32 new_pw_len;