diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-01-28 12:07:02 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-01-28 12:07:02 +0000 |
commit | fbb46da79cf322570a7e3318100c304bbf33409e (patch) | |
tree | 184ec1c8f2f9990840cfca0329d8fa97225e84f8 /source/web/cgi.c | |
parent | b741abd496621586040081c04674ae53cb5db47c (diff) | |
download | samba-fbb46da79cf322570a7e3318100c304bbf33409e.tar.gz samba-fbb46da79cf322570a7e3318100c304bbf33409e.tar.xz samba-fbb46da79cf322570a7e3318100c304bbf33409e.zip |
Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor.
- also consequential changes to the NTLMSSP and SPNEGO parsing functions
- and the client code that uses the same functions
- Add ntlm_auth, a NTLMSSP authentication interface for use by applications
like Squid and Apache.
- also consquential changes to use common code for base64 encode/decode.
- Winbind changes to support ntlm_auth (I don't want this program to need
to read smb.conf, instead getting all it's details over the pipe).
- nmbd changes for fstrcat() instead of fstrcpy().
Andrew Bartlett
Diffstat (limited to 'source/web/cgi.c')
-rw-r--r-- | source/web/cgi.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c index 018dd3602fd..35f32662833 100644 --- a/source/web/cgi.c +++ b/source/web/cgi.c @@ -291,37 +291,6 @@ static void cgi_web_auth(void) passwd_free(&pwd); } -/*************************************************************************** -decode a base64 string in-place - simple and slow algorithm - ***************************************************************************/ -static void base64_decode(char *s) -{ - const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - int bit_offset, byte_offset, idx, i, n; - unsigned char *d = (unsigned char *)s; - char *p; - - n=i=0; - - while (*s && (p=strchr_m(b64,*s))) { - idx = (int)(p - b64); - byte_offset = (i*6)/8; - bit_offset = (i*6)%8; - d[byte_offset] &= ~((1<<(8-bit_offset))-1); - if (bit_offset < 3) { - d[byte_offset] |= (idx << (2-bit_offset)); - n = byte_offset+1; - } else { - d[byte_offset] |= (idx >> (bit_offset-2)); - d[byte_offset+1] = 0; - d[byte_offset+1] |= (idx << (8-(bit_offset-2))) & 0xFF; - n = byte_offset+2; - } - s++; i++; - } - /* null terminate */ - d[n] = 0; -} /*************************************************************************** handle a http authentication line |