summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_samsync.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as anVolker Lendecke1-6/+4
argument. Volker (This used to be commit 873a5a1211d185fd50e7167d88cbc869f70dfd3f)
2007-10-10r17375: If a field containts only whitespace, we need to do base64 as well.Volker Lendecke1-2/+20
Volker (This used to be commit 795d06f427061536c6e3a3eb5b5d60a27f5ec70d)
2007-10-10r17374: Get rid of a silly "System User" default for "description", also ↵Volker Lendecke1-5/+9
fetch the sambaProfilePath. Volker (This used to be commit 61e7ed593b944fa14330729e585d1f790af93a7b)
2007-10-10r17356: Also transfer the sambaHomePath attribute.Volker Lendecke1-0/+4
Volker (This used to be commit 49ad0d4d0eea85ef133e1a5c055305e06de109de)
2007-10-10r17335: Some more fixes to net rpc vampire ldif. Still not good though :-(Volker Lendecke1-8/+14
Volker (This used to be commit e947f4bd91fcfa0dd27d12e8188ada381da541ff)
2007-10-10r17313: Non-Ascii attribute values need to be encoded as base64, with an ↵Volker Lendecke1-15/+60
attribute name attr:: instead of attr: German domains tend to have umlauts in group names. More to come tomorrow. Volker (This used to be commit 94cdd5d64cfaa5228209eebbb76244da0bf4b518)
2007-10-10r17312: Do some reformatting on net rpc samsync ldif. Not doing this checkin ↵Volker Lendecke1-135/+152
easily, as this puts me into svn blame in places I'm not sure I want my name to show up.... Volker (This used to be commit d00e73c49b5227db61d41a017eb9b71d9e7e2620)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-11/+19
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16429: Fix final 4 Klocwork bugs we're going to fix beforeJeremy Allison1-1/+1
release - #785, #786, #787, #788. Jeremy. (This used to be commit 9017547cccadeecb80f3db58a43838dc656fce2f)
2007-10-10r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607Volker Lendecke1-1/+9
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749 in net_rpc_audit.c: 754 755 756 in net_rpc_join.c: 757 in net_rpc_registry: 766 767 in net_rpc_samsync.c: 771 773 in net_sam.c: 797 798 Volker (This used to be commit 3df0bf7d6050fd7c9ace72487d4f74d92e30a584)
2007-10-10r15608: Fix a couple of Coverity errorsVolker Lendecke1-0/+9
(This used to be commit 696e210bf6688e8b2f408559768173b4bdbda979)
2007-10-10r15566: Fix Coverity bug # 284. The lp_ldap_xx_suffix function only return ↵Volker Lendecke1-7/+16
NULL if talloc fails. Volker (This used to be commit 0ece5b32f97f162be0af2ea3354a597c56ed4373)
2007-10-10r14743: Fix coverity bug #227. Possible deref of null pointerJeremy Allison1-5/+10
in error code path. Jeremy. (This used to be commit 9117713c5ee220331106d291425703aec4d7dd2c)
2007-10-10r14683: Get rid of hardcoded output file. With no arg, print to stdout,Jim McDonough1-75/+59
otherwise append to output file specified. (This used to be commit b4ec93f5a26442d30ba2b8c91d03f3190975efd0)
2007-10-10r14681: Get rid of hardcoded /tmp/add.ldif and /tmp/mod.ldif files. Is there aJim McDonough1-14/+19
different directory the temp files should be in, or is /tmp ok? Still have to get rid of the output file hardcoding, but that is to come, because I need to cleanup stdout. (This used to be commit 0d4bd93a5ca4025bbdeb507f4a2d6217cfb39c79)
2007-10-10r14156: Fix coverity #114: free storage alloc'ed by sstring_sub()Jim McDonough1-5/+6
(This used to be commit 655fb66b289bdd19c4432eea00fac935184f25c9)
2007-10-10r14155: Fix coverity #115: free storage alloc'ed by sstring_sub()Jim McDonough1-0/+2
(This used to be commit a197b8c5cb02c8a5fac3882e7b76bcd7abb0279c)
2007-10-10r14153: Fix coverity #116: free storage alloc'ed by sstring_sub()Jim McDonough1-0/+2
(This used to be commit dbc0ff5544f2d15b1d1bc41319c76274b79d92b4)
2007-10-10r14152: Fix coverity #117: free storage alloc'ed by sstring_subJim McDonough1-0/+1
(This used to be commit cf36f5949f8ac5ea020fcaa796ad92852df25ae7)
2007-10-10r14150: Fix coverity #118: not freeing alloc'ed storage returned fromJim McDonough1-1/+3
sstring_sub(). (This used to be commit 6ff849f35ae3394d6557f79c73b0fe54fbb86d0f)
2007-10-10r14147: Fix coverity #119. alloc'ed memory returned not saved, so not freed.Jim McDonough1-4/+8
Need to go back and correct the assumption that an "ldap xxx suffix" parm must have an OU. (This used to be commit 2d7ba11ffbe17af12257a91638be95d09c0c34c5)
2007-10-10r14135: Fix for Coverity #123: resource leak. Also rework much of the code toJim McDonough1-27/+44
make it cleaner. There's still more to do on this... (This used to be commit f75dad0325aec93cc604ddfbef40d29979d07275)
2007-10-10r14053: Implement Simo's suggestion: don't use /dev/null for a 'bad' path forJim McDonough1-2/+2
users/workstations (This used to be commit 2690f015be1f7eb9802f652810e73ff5f5688304)
2007-10-10r14036: Ok, the last one generated a const warning. Also fix Coverity # 119.Volker Lendecke1-6/+13
net rpc vampire is ugly.... Volker (This used to be commit c1ea48949d2692c839f6ced68165cabd76b580ea)
2007-10-10r14035: Fix Coverity bug # 124Volker Lendecke1-0/+1
(This used to be commit 9fe21fd0326e67a4b1006d2b4a24e39e2d57d796)
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 Allison1-0/+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. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()Gerald Carter1-5/+5
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix() (This used to be commit 6f1afa4acc93a07d0ee9940822d7715acaae634f)
2007-10-10r13576: This is the beginnings of moving the SAM_ACCOUNT data structureGerald Carter1-9/+9
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-10r13494: Merge the stuff I've done in head the last days.Volker Lendecke1-1/+1
Volker (This used to be commit bb40e544de68f01a6e774753f508e69373b39899)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-140/+1
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r12986: Use d_fprintf(stderr, ...) for any error message in net.Lars Müller1-9/+24
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-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-111/+72
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r8786: Fix amazing and long-standing bug where user-accounts are just crippledGünther Deschner1-2/+1
accounts (accounts without AcctCtrl set) after a vampire-process. New Accounts tend to hace no acb_info at all which means "0" (ACB_NORMAL). Unless 0 becomes not 0 we don't do anything and set *no* acctrl for normal users at all (!). Those crippled users now don't show up in usrmgr since 3.0.20somethings ldap-routines now finally test if the attribute is there. Guenther (This used to be commit c270ae79b5ef6d27a2a9e5a2d4f6bb20f7107b16)
2007-10-10r8396: fix some compile warnings.Günther Deschner1-8/+11
Guenther (This used to be commit af1aa09cde91078496a29f3a73c69a65ca2c3f6a)
2007-10-10r8189: commit vampire ldif patch, mostly from Don Watson ↵Jim McDonough1-3/+1002
(dwatson@us.ibm.com). Yes, that's my copyright...that's just how we have to do things at big blue. Adds subcommand to vampire to allow data to be put into an ldif file instead of actually writing to the passdb. See "net rpc help vampire" for usage info. This should be added to docs as well. (This used to be commit cb5634a305256a70daa2fcbd85d9a5459b4aeaa3)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-4/+4
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r7130: remove 'winbind enable local accounts' code from the 3.0 treeGerald Carter1-7/+1
(This used to be commit 318c3db4cb1c85be40b2f812f781bcf5f1da5c19)
2007-10-10r6263: Get rid of generate_wellknown_sids, they are const static and ↵Volker Lendecke1-2/+0
initializable statically. Volker (This used to be commit 3493d9f383567d286e69c0e60c0708ed400a04d9)
2007-10-10r5909: Remove some unecessary casts. Patch from Jason Mader for bugzill #2468.Tim Potter1-1/+1
(This used to be commit ede9fd08cf0ce04528f73c74e2345ba46d26f1e2)
2007-10-10r5349: After talking with Jerry, reverted the addition of account policies toGünther Deschner1-9/+9
passdb in 3_0 (they are still in trunk). Guenther (This used to be commit fdf9bdbbac1d8d4f3b3e1fc7e49c1e659b9301b1)
2007-10-10r5264: Log with loglevel 0 when account-administration scripts fail.Günther Deschner1-1/+1
Guenther (This used to be commit 3d391ef149639750db376b05528a27422f8a3321)
2007-10-10r4925: Migrate Account Policies to passdb (esp. replicating ldapsam).Günther Deschner1-9/+9
Does automated migration from account_policy.tdb v1 and v2 and offers a pdbedit-Migration interface. Jerry, please feel free to revert that if you have other plans. Guenther (This used to be commit 75af83dfcd8ef365b4b1180453060ae5176389f5)
2007-10-10r4877: When vampiring account policy AP_LOCK_ACCOUNT_DURATION honour "LockoutGünther Deschner1-1/+4
Duration: Forever". Guenther (This used to be commit aecacf4d9cc5e2aa69b358292b9d591ade696500)
2007-10-10r4538: Fix bugzilla 2198, accounts which have password last set to 0 are gettingJim McDonough1-0/+3
no passwords after vampire. Set password last set field to now. (This used to be commit 60c3a638e4e63d009728c2ce7a6264c3c120a9e5)
2007-10-10r4353: Finally get length of munged_dial correct.Günther Deschner1-1/+1
Guenther (This used to be commit b209f97f246cd65719f1000c7de368babec26d47)
2007-10-10r4352: Base64-encode munged-dial with correct length in 'net rpc vampire'.Günther Deschner1-1/+4
Guenther (This used to be commit 98f3e3353df988e819bc41d145b13c76e1b86b55)
2007-10-10r4351: Vampire Logon-Hours. Update Logon-Hours only when they have changed.Günther Deschner1-1/+20
Guenther (This used to be commit 0930ad662770278cbe9fd4e3deaa523957b96697)
2007-10-10r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).Jeremy Allison1-1/+1
Jeremy (This used to be commit efc1b688cf9b1a17f1a6bf46d481280ed8bd0c46)