Bug 2535 - rpc_client/cli_samr.c: incompatible types on new_lm_password and new_nt_password
Summary: rpc_client/cli_samr.c: incompatible types on new_lm_password and new_nt_password
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.12
Hardware: SGI IRIX
: P4 normal
Target Milestone: none
Assignee: James Peach
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 07:08 UTC by Jason Mader (mail bounces back)
Modified: 2006-06-14 06:09 UTC (History)
0 users

See Also:


Attachments
changes type on new_nt_password, new_lm_password to char (1.06 KB, patch)
2005-03-23 07:16 UTC, Jason Mader (mail bounces back)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader (mail bounces back) 2005-03-23 07:08:56 UTC
Compiling rpc_client/cli_samr.c
cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1459
  Argument of type "unsigned char *" is incompatible with parameter of type
          "char *".

                encode_pw_buffer(new_lm_password, newpassword, STR_UNICODE);
                                 ^

cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1468
  Argument of type "unsigned char *" is incompatible with parameter of type
          "char *".

        encode_pw_buffer(new_nt_password, newpassword, STR_UNICODE);
                         ^

cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1481
  Argument of type "unsigned char *" is incompatible with parameter of type
          "const char *".

                                   new_nt_password,
                                   ^

cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1483
  Argument of type "unsigned char *" is incompatible with parameter of type
          "const char *".

                                   new_lm_password,
                                   ^
Comment 1 Jason Mader (mail bounces back) 2005-03-23 07:14:48 UTC
Just changing new_lm_password and new_nt_password to char (which seems to be the
convention on password variables), leads to this type mismatch:

cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1461
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

                SamOEMhash( new_lm_password, old_nt_hash, 516);
                            ^

cc-1164 cc: WARNING File = rpc_client/cli_samr.c, Line = 1470
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

        SamOEMhash( new_nt_password, old_nt_hash, 516);
                    ^

Other uses of SamOEMhash() on passwords cast the password argument to (uchar *).
Comment 2 Jason Mader (mail bounces back) 2005-03-23 07:16:30 UTC
Created attachment 1092 [details]
changes type on new_nt_password, new_lm_password to char
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-03-24 06:26:21 UTC
lowering priority
Comment 4 James Peach 2005-07-30 22:46:12 UTC
Reassign IRIX bugs to me.
Comment 5 Jason Mader (mail bounces back) 2006-06-14 06:09:21 UTC
Compiler warning is not in 3.0.23rc2