endianness and IVAL() et al

Matt Garretson garrem at alum.rpi.edu
Tue Jan 30 20:23:42 GMT 2001

Hi, i just joined this list to ask a quick question regarding
Samba 2.0.7 which i couldn't find addressed in the archives.
Apologies in advance if it's a dumb or inappropriate question...

Do the little-endian byteorder.h macros such as IVAL() depend
upon the system architecture actually being little-endian?
Specifically i am interested in line 690 of chgpasswd.c,

  new_pw_len = IVAL(lmdata, 512);

This is on AIX 4.3.3 RS/6000, a big-endian machine.  When
Windows users attempt to change their network passwords, it
fails and the following debug message occurs:

Jan 30 13:28:49 58h smbd[8376]: [2001/01/30 13:28:49, 0] smbd/chgpasswd.c:check_oem_password(693) 
Jan 30 13:28:49 58h smbd[8376]:   check_oem_password: incorrect password length (296464145). 

The funky password length in the error message makes me wonder
if the use of IVAL here is correct in a big-endian environment.
Am i way off base?

Thanks in advance for any info,

More information about the samba-technical mailing list