summaryrefslogtreecommitdiffstats
path: root/source/libsmb/asn1.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove pstrings from asn1.c.Jeremy Allison2007-11-271-11/+28
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-23/+23
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r21460: Fix for server-side processing of SPNEGO authJeremy Allison2007-10-101-0/+8
| | | | | | | fragmented into "max xmit" size security blob chunks. Bug #4400. Needs limits adding, and also a client-side version. Jeremy.
* r19070: If there's an error in the data struct, there's no point to continue ↵Volker Lendecke2007-10-101-0/+4
| | | | | | | | with asn1_pop_tag. Volker
* r17060: Some c++ warningsVolker Lendecke2007-10-101-3/+4
|
* r16306: Error handling in this asn1 code *sucks*. Fix a genericJeremy Allison2007-10-101-5/+15
| | | | | | | class of memory leak bugs on error found by Klocwork (#123). Many of these functions didn't free allocated memory on error exit. Jeremy.
* r16207: Ensure we don't allocate an OID string unlessJeremy Allison2007-10-101-3/+11
| | | | | we know we don't have an error. Klocwork #6. Jeremy.
* r16202: Fix Klocwork #3. Strange - was already fixed in HEAD.Jeremy Allison2007-10-101-2/+7
| | | | Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r7954: Fix from tridge from Samba4 (same code exists here) :Jeremy Allison2007-10-101-1/+10
| | | | | fixed handling of ASN.1 objects bigger than 64k Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-5/+5
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2355: Now we've shipped 3.0.7, add in the DOS fix.Jeremy Allison2007-10-101-0/+6
| | | | Jeremy.
* r1240: Ensure we don't shadow Heimdal globals.Jeremy Allison2007-10-101-6/+6
| | | | Jeremy.
* More paranoia checks.Jeremy Allison2004-02-111-0/+5
| | | | Jeremy.
* Paranoia fixes :-).Jeremy Allison2004-02-111-0/+8
| | | | Jeremy.
* convert snprintf() calls using pstrings & fstringsGerald Carter2003-07-231-3/+3
| | | | | | to pstr_sprintf() and fstr_sprintf() to try to standardize. lots of snprintf() calls were using len-1; some were using len. At least this helps to be consistent.
* Merge minor library fixes from HEAD to 3.0.Andrew Bartlett2003-02-191-5/+16
| | | | | | | | | | | | | | - setenv() replacement - mimir's ASN1/SPNEGO typo fixes - (size_t)-1 fixes for push_* returns - function argument signed/unsigned correction - ASN1 error handling (ensure we don't use initiailsed data) - extra net ads join error checking - allow 'set security discriptor' to fail - escape ldap strings in libads. - getgrouplist() correctness fixes (include primary gid) Andrew Bartlett
* merging some rpcclient and net functionality from HEADGerald Carter2003-01-151-1/+1
|
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-1/+1
| | | | | | warnings. (Adds a lot of const). Andrew Bartlett
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-6/+15
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* fixed another DATA_BLOB constructorAndrew Tridgell2002-01-051-6/+1
|
* add asn1 integer handling ready for the ldap netjoin codeAndrew Tridgell2001-11-201-0/+26
|
* Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison2001-11-031-11/+18
| | | | | Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy.
* the beginnings of kerberos support in smbd. It doesn't work yet, butAndrew Tridgell2001-10-181-0/+18
| | | | | it should give something for others to hack on and possibly find what I'm doing wrong.
* added basic NTLMSSP support in smbd. This is still quite rough, andAndrew Tridgell2001-10-171-6/+22
| | | | | | loses things like username mapping. I wanted to get this in then discuss it a bit to see how we want to split up the existing session setup code
* minor Realloc() fix - pedanticAndrew Tridgell2001-10-141-2/+5
|
* added NTLMSSP authentication to libsmb. It seems to work well so I have ↵Andrew Tridgell2001-10-121-0/+27
| | | | enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM
* added a ASN.1 parser, so now I can properly parse the negTokenInitAndrew Tridgell2001-10-111-18/+168
| | | | | | | | | packet which means I can extract the service and realm, so we should now work with realms other than the local realm. it also means we now check the list of OIDs given by the server just in case it says that it doesn't support kerberos. In that case we should fall back to NTLMSSP but that isn't written yet.
* fixed some memory leaks, started adding asn1 decoder for server sideAndrew Tridgell2001-10-111-8/+36
|
* initial kerberos/ADS/SPNEGO support in libsmb and smbclient. ToAndrew Tridgell2001-10-111-0/+139
activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth