The branch, v4-0-test has been updated
       via  a0b2440c70a3f453c22159a02ff4a82fe6439cad (commit)
       via  2813882ef3cc3609a74ad83bcee6be0c2cd53494 (commit)
       via  a516bc9a2d4ce86244d0e2fbfacf6fda5e12e987 (commit)
      from  f10c9ca3612d7bdc4c2c221e959f8c48ec2f9349 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit a0b2440c70a3f453c22159a02ff4a82fe6439cad
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Fri Jun 27 13:21:42 2008 +0200

    ntlm_auth: eliminate "cast pointer from integer of different size" warnings 
on 64bit.
    
    Michael

commit 2813882ef3cc3609a74ad83bcee6be0c2cd53494
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Fri Jun 27 12:42:07 2008 +0200

    ntlmssp: get rid of "cast to pointer from integer of different size" 
warning on 64 bit
    
    Not sure if this check is actually necessary, though:
    the second should be sufficient.
    
    Michael

commit a516bc9a2d4ce86244d0e2fbfacf6fda5e12e987
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Fri Jun 27 08:23:26 2008 +0200

    tdb_unpack: Eliminate "cast to pointer from integer of different size" 
warning on 64bit.
    
    The 'p' type is just a flag to mark the presence of a pointer,
    not a real pointer itself.
    
    The code is now the same as in Samba3's tdb_unpack.
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 source/auth/ntlmssp/ntlmssp_parse.c |    6 +++---
 source/lib/util/util_tdb.c          |    8 +++++++-
 source/utils/ntlm_auth.c            |    4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/ntlmssp/ntlmssp_parse.c 
b/source/auth/ntlmssp/ntlmssp_parse.c
index 8e31d81..e1c1e7c 100644
--- a/source/auth/ntlmssp/ntlmssp_parse.c
+++ b/source/auth/ntlmssp/ntlmssp_parse.c
@@ -241,7 +241,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        ret = false;
                                        goto cleanup;
                                }
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t 
*)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;
@@ -276,7 +276,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        goto cleanup;
                                }
 
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t 
*)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;
@@ -311,7 +311,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        goto cleanup;
                                }
 
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t 
*)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;
diff --git a/source/lib/util/util_tdb.c b/source/lib/util/util_tdb.c
index 77ad4eb..e4219df 100644
--- a/source/lib/util/util_tdb.c
+++ b/source/lib/util/util_tdb.c
@@ -482,7 +482,13 @@ int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, 
const char *fmt, ...)
                        p = va_arg(ap, void **);
                        if (bufsize < len)
                                goto no_space;
-                       *p = (void *)IVAL(buf, 0);
+
+                       /*
+                        * This isn't a real pointer - only a token (1 or 0)
+                        * to mark the fact a pointer is present.
+                        */
+
+                       *p = (void *)(IVAL(buf, 0) ? (void *)1 : NULL);
                        break;
                case 'P':
                        /* Return a malloc'ed string. */
diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c
index 6d62968..6a63028 100644
--- a/source/utils/ntlm_auth.c
+++ b/source/utils/ntlm_auth.c
@@ -328,7 +328,7 @@ static const char *get_password(struct cli_credentials 
*credentials)
        char *password = NULL;
        
        /* Ask for a password */
-       mux_printf((unsigned int)credentials->priv_data, "PW\n");
+       mux_printf((unsigned int)(uintptr_t)credentials->priv_data, "PW\n");
        credentials->priv_data = NULL;
 
        manage_squid_request(cmdline_lp_ctx, NUM_HELPER_MODES /* bogus */, 
manage_gensec_get_pw_request, (void **)&password);
@@ -506,7 +506,7 @@ static void manage_gensec_request(enum stdio_helper_mode 
stdio_helper_mode,
                        cli_credentials_set_password(creds, 
state->set_password, CRED_SPECIFIED);
                } else {
                        cli_credentials_set_password_callback(creds, 
get_password);
-                       creds->priv_data = (void*)mux_id;
+                       creds->priv_data = (void*)(uintptr_t)mux_id;
                }
                if (opt_workstation) {
                        cli_credentials_set_workstation(creds, opt_workstation, 
CRED_SPECIFIED);


-- 
Samba Shared Repository

Reply via email to