summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-16 03:29:54 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-16 03:29:54 +0000
commitd92b21280edba86b69d3da38bc87d0390c0a3e7f (patch)
tree1daef00fff482fa097b846d54ec045046261244f /source3/web
parente4af5eaca6f0fc681733f618562d58c26745978f (diff)
downloadsamba-d92b21280edba86b69d3da38bc87d0390c0a3e7f.tar.gz
samba-d92b21280edba86b69d3da38bc87d0390c0a3e7f.tar.bz2
samba-d92b21280edba86b69d3da38bc87d0390c0a3e7f.zip
Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder. The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for use with Squid. Unfortunetly the squid side doesn't quite support what we need yet. Changes to winbind to get us the info we need, and a couple of consequential changes/cleanups in the rest of the code. Andrew Bartlett (This used to be commit fe50ca8f54ded2e119bde08831785fbe0db2ee99)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 018dd3602f..35f3266283 100644
--- a/source3/web/cgi.c
+++ b/source3/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