[RFC] auth + helper final cleanups

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 14 Oct 2010 17:25:11 +1300

While working on other bugs I found the basic auth MSNT helper had been
missed from the C++ conversion. Henrik also commented after the last
helper changes that I should perhaps have left smblib as a separate library.

What these shuffles do is...

Samba smblib/rfcnb code:
  * Import the latest copy which I could find a download link to. This
source is from 1997 so I suspect there is something even newer we should
be using. Time was tight is the only excuse for using these sources. Our
originals were from 1995 and 1996 depending on the helper using it, with
a mix of patches.

  * These two directories are in ours sources as lib/smblib and
lib/rfcnb. Each has its own convenience library. Kept separate with
original filenames to simplify future upgrades or removal.

  * Samba sources have been diffed and compared function by function
against the copies previously in our sources. Functionality extensions
we use have been grafted back on top of the new(er) Samba sources.
   - this was mostly around passing extra Unicode, DC hints and
pre-crypted passwords to the login checks.
   - some files from libntlmauth have yet to be compared in fine detail,
that will be completed today before merge.
   - some basic API function and struct definitions had to be moved to
the API headers to prevent needing to include the *-priv.h private
definitions externally to the library.

  * the Samba API headers have been wrapped with #ifndef safety wrappers

  * compile errors and include changes required to compile have been
made (code stays C)

  * duplicate code in helpers/basic_auth/MSNT/* and libntlmauth/* is
removed.

  * abuse of the smblib-priv.h and rfcnb-priv.h headers and all local
re-definitions has been erased from our code. Replaced by includes of
the library API headers: rfcnb/rfcnb.h smblib/smblib.h

libntlmauth:
  * smblib/rfcnb bits erased
  * moved to lib/ntlmauth in its much reduced form
  * built as a convenience library instead of full library

One interesting thing noted during this work is that MSNT_auth helper
configuration file includes the per-user PDC. If that does what I
suspect then this MSNT helper is an easier to use and more extensible
version of the MSNT-multi-domain helper and multi-DC proposals we get
occasionally.
  This bears further examination with an eye on obsoleting more helpers
and task duplication.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.8
   Beta testers wanted for 3.2.0.2
Received on Thu Oct 14 2010 - 04:25:16 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 14 2010 - 12:00:04 MDT