summaryrefslogtreecommitdiff
path: root/source3/utils
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r14034: Fix Coverity id # 125.Volker Lendecke1-0/+2
Jeremy, you might want to take a look here. Volker (This used to be commit e6e29937e8ccfc84afca0ee440bd3f10a7d10e8a)
2007-10-10r14033: Fix Coverity bug # 126Volker Lendecke1-0/+1
(This used to be commit bb6d678575faac050376607a5c778b8a10805061)
2007-10-10r13968: fix typo, caught by GuentherJim McDonough1-1/+1
(This used to be commit 217d3fbe7923115ae610a39e586ceb93df7683f5)
2007-10-10r13957: Based on patch from Richard Renard <richard.renard@idealx.com>:Jim McDonough1-15/+18
Fix machine accounts (should not have valid shells) and users with no home directory (were getting previous user's directory). (This used to be commit f629f8a7b972f09fe959c68843b9cd5a03abfc76)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison3-0/+13
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. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13864: Some cleanup and the samr set security object function client-side.Günther Deschner1-130/+0
Guenther (This used to be commit 0ae3fddf95a95ec8a2f4d52e1276c1721b33ddfd)
2007-10-10r13861: Avoid "net rpc join" segfaulting when storing the servername in theGünther Deschner1-1/+1
affinity cache. Guenther (This used to be commit b8c07babbd22832132da8f70026aa1816983bc38)
2007-10-10r13846: Take care of system that do not have LDAP librariesSimo Sorce1-0/+5
(This used to be commit ab62c8d93acb432678e301e57aeb86887913ebe6)
2007-10-10r13843: Merge in net sam provision and some pdb_ldap fixesSimo Sorce1-0/+386
(This used to be commit 705d8118081784e9907648fd1daaaa5ec0285972)
2007-10-10r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.Günther Deschner1-2/+2
* Fix a couple of related parsing issues. * in the info3 reply in a samlogon, return the ACB-flags (instead of returning zero) Guenther (This used to be commit 5b89e8bc24f0fdc8b52d5c9e849aba723df34ea7)
2007-10-10r13695: Make code consistent with documentation. :-)Alexander Bokovoy1-5/+8
smbcontrol was sending messages designated for nmbd and winbindd to smbd. Thus, nmbd and winbindd were "unshutdownable". (This used to be commit 52e9b5f89f4889ad97a049eade4957fb15f7b8a5)
2007-10-10r13679: Commiting the rm_primary_group.patch posted on samba-technicalGerald Carter1-59/+24
* ignore the primary group SID attribute from struct samu* * generate the primary group SID strictlky from the Unix primary group when dealing with passdb users * Fix memory leak in original patch caused by failing to free a talloc * * add wrapper around samu_set_unix() to prevent exposing the create BOOL to callers. Wrappers are samu_set_unix() and samu-allic_rid_unix() (This used to be commit bcf269e2ec6630b78d909010fabd3b69dd6dda84)
2007-10-10r13648: Duh.Tim Potter1-1/+1
(This used to be commit 48cd81074e5a7cbba5892eedd62fff4ce0d826b5)
2007-10-10r13641: Finish fix for #3510. Don't use client schannel when toldJeremy Allison1-13/+39
not to, cope with a server that doesn't offer schannel also. Jeremy (This used to be commit 68005f6bdb70883eace0d9067c76c3360a803023)
2007-10-10r13614: First part of the bugfix for #3510 - net join failsJeremy Allison1-14/+21
against server with schannel disabled. Second part will come tomorrow (fixing net_rpc_join_ok()). Jeremy. (This used to be commit 7de1ee18619bf99c5db45692e085d0646e52378f)
2007-10-10r13607: Fix compile - don't ref auto variable in a structure initialization.Jeremy Allison1-1/+1
Fix from Richard Bollinger <rabollinger@gmail.com>. Jeremy. (This used to be commit 02da5189f1c2a07a7ac02cf51e23782f70829f34)
2007-10-10r13594: Got sense of NTSTATUS check reversed.Jeremy Allison1-2/+2
Jeremy. (This used to be commit cd821079893dc6ff486d0c5f0bd756e78caa4e89)
2007-10-10r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()Gerald Carter4-22/+43
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix() (This used to be commit 6f1afa4acc93a07d0ee9940822d7715acaae634f)
2007-10-10r13579: Next try to fix the AIX build. Thanks to Björn for nagging...Volker Lendecke1-22/+20
Volker (This used to be commit 4cf5109c7a1355f0adb42891ff490f03ae677347)
2007-10-10r13576: This is the beginnings of moving the SAM_ACCOUNT data structureGerald Carter4-46/+46
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...... (This used to be commit 19b7593972480540283c5bf02c02e5ecd8d2c3f0)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter5-11/+11
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13553: Fix all our warnings at -O6 on an x86_64 box.Jeremy Allison1-1/+1
Jeremy. (This used to be commit ea82958349a57ef4b7ce9638eec5f1388b0fba2a)
2007-10-10r13530: Fix from William Jojo for #1970. Make nmblookup doJeremy Allison1-7/+6
a node status on all IP's when requested. Jeremy. (This used to be commit 1fcac478cb5ba432282612fbb785caaed4d2f9b8)
2007-10-10r13528: Mention the tools and commandline option names used.Lars Müller1-2/+2
(This used to be commit 5db7e9a42ab27871891be8a1314c32e13620da36)
2007-10-10r13527: Adjust copyright header with information got from the 2.2 cvs tree.Lars Müller1-3/+7
(This used to be commit e00505cc942dd5cf755aa6b5d2f565eeff95629e)
2007-10-10r13525: This is only a cleanup to have the memset() and SAFE_FREE() only oneLars Müller1-8/+9
time in the code. Even if we now have an additional if statement after the free I prefer this solution in opposite to the duplicated code we had before. (This used to be commit 4272419b1146b1c03e070655f3a31d027c00ad20)
2007-10-10r13524: Add -t|--password-from-stdin option to pdbedit as we had with Samba 2.2.Lars Müller3-52/+75
This fixes bug #1386. The initial changes had been made by Carsten Höger <choeger at open-xhange dot com> for Samba 2.2 while being at SuSE. *sigh* To not duplicate code from smbpasswd in pdbedit stdin_new_passwd() and get_pass() are moved from smbpasswd to utils/passwd_util.c. (This used to be commit dbdc5ba497c6010dbad47c9d77fc8bec5557a328)
2007-10-10r13517: Fix typo -- thanks to Karolin Seeger <ks@sernet.de>Volker Lendecke1-1/+1
(This used to be commit d0efb435e51ee4d5454b55aee1596355ecc4a2c6)
2007-10-10r13502: Fix error messages for usershares when smbd is notJeremy Allison2-17/+39
running. More generic error return cleanup in libsmb/ needs doing (everything returning NTSTATUS not BOOL). Jeremy (This used to be commit 654bb9853b450c5d509d182f67ec26ac320fd590)
2007-10-10r13494: Merge the stuff I've done in head the last days.Volker Lendecke2-3/+3
Volker (This used to be commit bb40e544de68f01a6e774753f508e69373b39899)
2007-10-10r13486: Two more -- fix bug 3503Volker Lendecke1-0/+2
(This used to be commit 62b02a68438e0ff1119e68347b1ac3495572fa8a)
2007-10-10r13460: by popular demand....Gerald Carter1-159/+26
* remove pdb_context data structure * set default group for DOMAIN_RID_GUEST user as RID 513 (just like Windows) * Allow RID 513 to resolve to always resolve to a name * Remove auto mapping of guest account primary group given the previous 2 changes (This used to be commit 7a2da5f0cc05c1920c664c9a690a23bdf854e285)
2007-10-10r13382: added server affinity cache stores for 'net rpc join' and trusted ↵Gerald Carter2-0/+9
domain code (This used to be commit 9eb743584d32cdb67e0512ac915c34565bce1c01)
2007-10-10r13368: I must write out 1000 times, "Don't use C++ reserved words..."Jeremy Allison1-5/+5
Jeremy. (This used to be commit b1ebc12b5043a7d7a85378f0d3f1d4f6cb83c411)
2007-10-10r13351: Fix copyrightVolker Lendecke1-1/+1
(This used to be commit 70114f509c821a4bc932ff76d9fc19a7d4ad1e84)
2007-10-10r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)Volker Lendecke2-1/+418
Implement 'net rpc shell account' -- An editor for account policies nt_time_to_unix_abs changed its argument which to me seems wrong, and I could not find a caller that depends on this. So I changed it. Applied some more const in time.c. Volker (This used to be commit fc73690a7000d5a3f0f5ad34461c1f3a87edeac5)
2007-10-10r13337: Attempt to fix the AIX buildVolker Lendecke1-1/+1
(This used to be commit b129b4f94f6ff1d963ac316cf180662f5cecf9f6)
2007-10-10r13316: Let the carnage begin....Gerald Carter20-224/+3453
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r13262: Arrgggg. Fix smbstatus and swat status to ignoreJeremy Allison1-0/+5
bloody placeholder share mode entries (I hate these - I've had to add this filter code now to too many places :-). Jeremy. (This used to be commit 815340e1a413f98c1c36aacc1c34041e9160d0e3)
2007-10-10r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500Derrell Lipman14-14/+14
lp_load() could not be called multiple times to modify parameter settings based on reading from multiple configuration settings. Each time, it initialized all of the settings back to their defaults before reading the specified configuration file. This patch adds a parameter to lp_load() specifying whether the settings should be initialized. It does, however, still force the settings to be initialized the first time, even if the request was to not initialize them. (Not doing so could wreak havoc due to uninitialized values.) (This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
2007-10-10r13148: Fix bug: #3413Simo Sorce1-3/+9
Check that ldap admin dn is defined in smb.conf before setting the ldap password in secrets.tdb Based on patch by William Jojo <jojowil@hvcc.edu> Simo. (This used to be commit c2c004a620ecbd895786dc6f16fb6a616f354a0a)
2007-10-10r13136: Fix handling user sid and user gidSimo Sorce1-2/+4
(This used to be commit 65d5abda68fa0cacbff489ea1e4bfeffd58c83cb)
2007-10-10r13133: patch from Makr Proehl <m.proehl@science-computing.de> for dumping ↵Gerald Carter1-1/+1
server role when calling 'testparm -s' (BUG 1336) (This used to be commit a4c6eceaaeeeaa6f0af2ae0689631710d36dbd59)
2007-10-10r13091: Fix gcc warning about using '0' with %s.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 5f5f87584fec7fdeefeb54de0cb72ae5b1ac9dd4)
2007-10-10r13083: patch suggested by Adam Nielsen for better smbstatus formattingGerald Carter1-4/+4
(This used to be commit ef69cf96145516ddca44fdb4faddfead26591345)
2007-10-10r13082: revert an accidentally commited patch (still in progress)Gerald Carter1-4/+4
(This used to be commit e43775fb3156bf29e4e412f01ad2d731aa866323)
2007-10-10r13081: correct fix for the segv in nmbd caused by a double free on namerec.Gerald Carter1-4/+4
(This used to be commit c908dbc4b260bac72cbc6d25f4728359a6ec8259)
2007-10-10r12986: Use d_fprintf(stderr, ...) for any error message in net.Lars Müller16-255/+278
All 'usage' messages are still printed to stdout. Fix some compiler warnings for system() calls where we didn't used the return code. Add appropriate error messages and return with the error code we got from system() or NT_STATUS_UNSUCCESSFUL. (This used to be commit f650e3bdafc4c6bcd7eb4bcf8b6b885b979919eb)
2007-10-10r12870: fixing net rpc registry enumerate from overwritnig the open subkey ↵Gerald Carter1-1/+0
handle (This used to be commit cc2e7052bd05a15f43268ce87dc29506bb5bb5bf)
2007-10-10r12840: Add -W to smbpasswd. Thanks to William Jojo <jojowil@hvcc.edu>.Volker Lendecke1-1/+9
Volker (This used to be commit 2942f3594ba39748dca0238f1e1a5c744a7afffb)