summaryrefslogtreecommitdiffstats
path: root/source/smbd/lanman.c
Commit message (Collapse)AuthorAgeFilesLines
* r22650: sync up with SMABA_3_0_25 as of svn r22649Gerald Carter2007-05-031-1/+5
|
* r22138: * Sync up with the SAMBA_3_0_25 as of svn r22132.Gerald Carter2007-04-091-283/+641
| | | | | * Set VERSION to 3.0.25rc1 * Update release notes.
* r21585: Start syncing the monster that will become 3.0.25pre1Gerald Carter2007-02-281-16/+35
| | | | | | | | Still todo: * release notes * few minor outstanding patches * additional idmap man pages
* r17913: saturn fixes from SAMBA_3_0_23Gerald Carter2006-08-291-6/+2
|
* r16254: pulling klocwork fixes for 3.0.23rc3 (current up to r16251)Gerald Carter2006-06-151-5/+9
|
* r13983: Fix Coverity bug # 111Volker Lendecke2006-03-071-0/+1
|
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-10/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()Gerald Carter2006-02-211-2/+2
| | | | * replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
* r13576: This is the beginnings of moving the SAM_ACCOUNT data structure Gerald Carter2006-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | to make full use of the new talloc() interface. Discussed with Volker and Jeremy. * remove the internal mem_ctx and simply use the talloc() structure as the context. * replace the internal free_fn() with a talloc_destructor() function * remove the unnecessary private nested structure * rename SAM_ACCOUNT to 'struct samu' to indicate the current an upcoming changes. Groups will most likely be replaced with a 'struct samg' in the future. Note that there are now passbd API changes. And for the most part, the wrapper functions remain the same. While this code has been tested on tdb and ldap based Samba PDC's as well as Samba member servers, there are probably still some bugs. The code also needs more testing under valgrind to ensure it's not leaking memory. But it's a start......
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-2/+2
| | | | macro which sets the freed pointer to NULL.
* r13443: Fix the build.Günther Deschner2006-02-101-2/+2
| | | | Guenther
* r13316: Let the carnage begin....Gerald Carter2006-02-031-1240/+1450
| | | | Sync with trunk as off r13315
* r12163: Change lookup_sid and lookup_name to return const char * instead of ↵Volker Lendecke2005-12-101-1/+1
| | | | | | | | char *, use a temporary talloc_ctx for clarity. Volker
* r12051: Merge across the lookup_name and lookup_sid work. Lets see how the ↵Volker Lendecke2005-12-031-5/+5
| | | | | | | | build farm reacts :-) Volker
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2005-11-051-314/+353
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2005-10-181-2/+2
| | | | | x86_64 box. Jeremy.
* r9290: Some error path cleanups found by Coverity. Whitespace reformatting.Jeremy Allison2005-08-131-232/+277
| | | | | This file need a lot of error path cleanup. Jeremy.
* r9288: Whitespace cleanup and memory leak on error path fix found by Coverity.Jeremy Allison2005-08-121-55/+60
| | | | Jeremy.
* r6279: Convert the RAP enum functions to the pdb_search API. Who is using thisVolker Lendecke2005-04-101-45/+56
| | | | | | nowadays? This looks rather broken, but survives basic tests with 'net'. Volker
* r6225: get rid of warnings from my compiler about nested externsHerb Lewis2005-04-061-3/+3
|
* r5165: BUG 2295: always use get_local_machine_name() rather than digging in ↵Gerald Carter2005-02-011-6/+4
| | | | the gloval variable 'local_machine'
* r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries(). Günther Deschner2005-01-191-1/+1
| | | | | | | | | | | | | | | | | This allows the ldap-backend to search much more effeciently. Machines will be searched in the ldap_machine_suffix and users in the ldap_users_suffix. (Note that we already use the ldap_group_suffix in ldapsam_setsamgrent for quite some time). Using the specific ldap-bases becomes notably important in large domains: On my testmachine "net rpc trustdom list" has to search through 40k accounts just to list 3 interdomain-trust-accounts, similiar effects show up the non-user query_dispinfo-calls, etc. Also renamed all_machines to only_machines in load_sampwd_entries() since that reflects better what is really meant. Guenther
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-65/+64
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r4083: consolidate printer searches to use find_service rather than for loopsGerald Carter2004-12-061-35/+17
|
* r3848: Fix for bug 2057. Only partially applied the patch, the second part ↵Volker Lendecke2004-11-181-0/+7
| | | | | | | | | | | seems not necessary. I'm using gcc 3.4.1, this does not detect the possibly uninitialized variable. Does anybody know how to get 3.4.1 to warn me? Volker
* r3824: Fix crash in api_RNetShareEnum. ServicePtrs[] may contain invalidVolker Lendecke2004-11-171-0/+4
| | | | | | entries. Happened after rev3708 removed non-existing cups printers. Volker
* r3705: Nobody has commented, so I'll take this as an ack...Volker Lendecke2004-11-121-23/+22
| | | | | | | | | | | | | | | | | abartlet, I'd like to ask you to take a severe look at this! We have solved the problem to find the global groups a user is in twice: Once in auth_util.c and another time for the corresponding samr call. The attached patch unifies these and sends them through the passdb backend (new function pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further optimize the corresponding call if the samba and posix accounts are unified by issuing a specialized ldap query. The parameter to activate this ldapsam behaviour is ldapsam:trusted = yes Volker
* r3682: fix seg fault in lanman printing code caused by uninitialized variableGerald Carter2004-11-111-0/+6
|
* r3049: fixing some calls in the printing code to stanard_sub_basic(); fix ↵Gerald Carter2004-10-181-7/+10
| | | | standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced()
* r2768: BUG 1519: save the hostname used in the open_printer_ex() for later ↵Gerald Carter2004-10-011-3/+2
| | | | reuse when filling in the spolss replies (also gets rid of get_called_name()
* r2697: Fix for bugzilla #1732, patch by Satoh Fumiyasu, fumiya@samba.gr.jpJim McDonough2004-09-271-3/+8
| | | | | Limit share names returned by RAP based on windows character width, not unix character width.
* r931: Ensure we push 16 bytes (including null termination)Jeremy Allison2004-05-281-2/+2
| | | | not 15.
* r4: merge in the SAMBA_3_0 branch from cvsCVS Import User2004-04-041-69/+69
| | | | | | | | to checkout try this: svn co svn+ssh://svn.samba.org/home/svn/samba/branches/SAMBA_3_0 samba-3_0-work metze
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+3619
metze