]> git.ipfire.org Git - thirdparty/squid.git/commit - src/auth/basic/SMB_LM/msntauth.cc
Some rewriting inspired by suggestions of overflow bugs and other problems
authorwessels <>
Thu, 20 Jun 2002 04:53:56 +0000 (04:53 +0000)
committerwessels <>
Thu, 20 Jun 2002 04:53:56 +0000 (04:53 +0000)
commiteb073b3b4c983650947bd0cb3cf3f86d9f72ded8
tree8b47563599c4a03fd53e0e7606edbada4f2f9074
parentbb73f68e0ad0a84ffa0494ec90088329a2dd3963
Some rewriting inspired by suggestions of overflow bugs and other problems
with this code.

denyusers.c and allowusers.c have a fair amount of nearly identical code.
I moved these functions to a new file, called usersfile.[ch].  I didn't
really want to add another source file, but....

The list of allowed/denied users were formerly stored as whitespace
separated tokens in a single char buffer.  The code used strstr() to
search for matches.  This was awkward because the search key had to
be surrounded by space characters.  The new code uses and array
of char buffers -- one for each name.  The new code uses qsort() and
bsearch().

The old code was more robust with the input file.  You could put multiple
names on a single line.  Due to the way the names were stored, it didn't
matter.  The new code is less robust.  It requires one name per line,
and no leading whitespace.

Names longer than NAMELEN are now truncated.

Added an openlog() call and Removed LOG_USER from syslog() calls.

No longer use scanf() in some places.

There is some weird logic about what to do if an allow/deny file
does not exist, or exists but cannot be read, or was read once but
cannot be read later.  I hope it still works the same.

replaced some strcpy() calls with memset() and strncpy().

Fixed a strange usage of ServerArray[] that started at index 1?

#ifdefd-out some debugging code that included fprintfs to stderr, but
was apparently never called.

Rewrote some signal handling stuff to use sigaction() (and fall back
to signal()) and removed calls to sigvec().
helpers/basic_auth/MSNT/Makefile.am
helpers/basic_auth/MSNT/Makefile.in
helpers/basic_auth/MSNT/allowusers.c
helpers/basic_auth/MSNT/confload.c
helpers/basic_auth/MSNT/denyusers.c
helpers/basic_auth/MSNT/msntauth.c
helpers/basic_auth/MSNT/rfcnb-io.c
helpers/basic_auth/MSNT/rfcnb-util.c