charset_initialise called too late in rpcclient

Benjamin Kuit bj at it.uts.edu.au
Thu Dec 20 21:30:04 GMT 2001


I found a problem in rpcclient while trying to use the -A authfile
option.

The option -A is processed before charset_initialise(), and options
specified in the authfile is identified with strwicmp, which in
turn uses upper_char_map.

Because charset_initialise() hasn't initialised upper_char_map yet
at the time the file is loaded, toupper(c) == 0 for just about
everything.

So only words of different lengths end up being different, so
strwicmp("username", "password")==0

Bj

-- 
+-------------------------------+--------------------------------------+
|      Benjamin (Bj) Kuit       |  Building 4, 447                     |
|      Systems Programmer       |  Faculty of Information Technology   |
|      Phone: 02 9514 1841      |  University of Technology, Sydney    |
|      Mobile: 0416 184 972     |  Email: bj at it.uts.edu.au             |
+-------------------------------+--------------------------------------+




More information about the samba-technical mailing list