summaryrefslogtreecommitdiff
path: root/source3/passdb
AgeCommit message (Collapse)AuthorFilesLines
2009-05-12s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.Aravind Srinivasan2-26/+4
This is very similar to be1dfff02d562e42a7847bd02fed8538630d3f41
2009-05-12Fix the last few format arg missmatches I missed.Jeremy Allison1-4/+4
Jeremy.
2009-05-12Fix bug 6157Volker Lendecke1-1/+1
This patch picks the alphabetically smallest one of the multi-value attribute "uid". This fixes a regression against 3.0 and also becomes deterministic.
2009-05-11Fix a bunch of compiler warnings about wrong format types.Jeremy Allison3-10/+10
Should make Solaris 10 builds look cleaner. Jeremy.
2009-05-08s3/ldap: also handle DirX return codesBjörn Jacke1-0/+2
2009-05-05s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL ↵Günther Deschner2-2/+2
context. Guenther
2009-05-05s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing ↵Günther Deschner1-1/+1
talloc_free on malloced memory. Guenther
2009-04-14Rework Samba3 to use new libcli/auth code (partial)Andrew Bartlett4-1/+4
This commit is mostly to cope with the removal of SamOemHash (replaced by arcfour_crypt()) and other collisions (such as changed function arguments compared to Samba3). We still provide creds_hash3 until Samba3 uses the credentials code in netlogon server Andrew Bartlett
2009-04-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett2-15/+15
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
2009-04-06s3:smbldap Remove smbldap_get_dnAndrew Bartlett2-29/+18
This removes one more caller to pull_utf8_allocate() Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-01Allow pdbedit to change a user rid/sid. Based on a fix from Alexander ↵Jeremy Allison1-3/+57
Zagrebin <alexz@visp.ru>. Jeremy.
2009-04-01s3-passdb: add smb_create_user().Günther Deschner1-0/+59
Guenther
2009-04-01s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam1-2/+16
This patch makes sure the original and temporary TDBs are closed _before_ the rename. Originally, the open TDB was renamed, and so the name passdb.tdb.tmp stayed around in the db context. Hence upon client connect, the smbd children died because reinit_after_fork() calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which existed no longer... Michael
2009-03-27Fix the problem of 3.0.x passdb databases being versionJeremy Allison1-5/+43
3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy.
2009-03-27Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-1/+2
correctly. For the clustering case. Clustered setups should have only ever used the unsigned version of TDB_DATA in the first place so they can't be in this mess :-). Just do the normal upgrade in the clustered case. Jeremy.
2009-03-24Fix bug 6097Volker Lendecke1-1/+1
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with NT_STATUS_INVALID_SID, even if other SIDs in the list are valid. Thanks to Pavel <wylda@volny.cz> for the bug report!
2009-03-18Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-14/+201
correctly. This is a really nasty one to fix as in order to successfully update the passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash values before we do the upgrade. Jeremy.
2009-03-17Missing break in conversion function prevents tdb password database update.Alexander Zagrebin1-0/+1
2009-03-12s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 namesDan Sledz1-5/+7
Also fix an incorrect TALLOC_FREE
2009-03-07Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke4-57/+46
2009-03-03s3 passdb: Add back some useful debug statementsTim Prouty1-18/+24
Originally removed in be1dfff02d562e42a7847bd02fed8538630d3f41
2009-03-02It appears that the first time we see a uid/gid that winbind can't map,Dan Sledz1-14/+22
we end up returning the null sid instead of falling back to the legacy code. Next time through the code we'll hit the negative cache and do the right thing, but we still fail the first time. If we fail the winbind id to sid mapping, call the legacy version. This catches the case where we don't have a negative cache entry for the mapping. This is better than returning the NULL sid to the caller.
2009-02-25Fix an incompatible pointer passed to winbind_get_groupsVolker Lendecke1-1/+3
This is the same bug that was fixed in other places of the code a few times already: A C compiler ONLY does automatic type conversions during an assignment. Passing down a pointer to type A to a function taking type B as an argument does NOT do any automatic type conversions. If required, I can dig up the relevant portions of the C standard.
2009-02-24s3: Rename auth_onefs_wb and pdb_onefs_samDan Sledz1-58/+73
auth_onefs_wb.c -> auth_wbc.c pdb_onefs_sam.c -> pdb_wbc_sam.c No changes to functionality
2009-02-21Fix a typoVolker Lendecke1-1/+1
2009-02-20Introduce a new passdb backend: pdb_onefs_samDan Sledz1-0/+433
Implements a custom backend for onefs that exclusively uses the wbclient interface for all passdb calls. It lacks some features of a standard passdb. In particular it's a read only interface and doesn't implement privileges.
2009-02-19Fix printf warnings found on systems where time_t <> long int.Jeremy Allison1-8/+8
Jeremy.
2009-02-17Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.Jeremy Allison1-1/+12
Jeremy.
2009-02-12s3: Added new parameter "map untrusted to domain"Steven Danneman1-0/+18
When enabled this reverts smbd to the legacy domain remapping behavior when a user provides an untrusted domain This partially reverts d8c54fdd
2009-02-11s3: Change behavior when seeing an unknown domain.Dan Sledz1-19/+0
After a lot of testing against various Windows servers (W2K, W2K3, W2K8), within an AD domain it seems that unknown domains will only be translated to the local account domain, not the netbios name of the member server's domain. This makes samba act more like Windows.
2009-02-08Fix some nonempty blank linesVolker Lendecke1-41/+41
2009-02-01Fix nonempty blank linesVolker Lendecke1-61/+60
2009-01-21Memory leaks and other fixes found by Coveritytodd stecher2-0/+7
2009-01-16s3:passdb: put login_cache.tdb into cache_dir, not lock_dir.Michael Adam1-2/+3
Michael
2009-01-14Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.Jeremy Allison1-1/+1
Jeremy.
2009-01-01Add iconv_convenience argument to size functions.Jelmer Vernooij1-8/+8
2008-12-29s3:pdb_tdb: store the next rid counter in passdb.tdb instead of ↵Stefan Metzmacher1-75/+47
winbind_idmap.tdb This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4. metze
2008-12-29s3:passdb: add SAMU_BUFFER_V4 with no changesStefan Metzmacher1-1/+16
The upgrade is required because of the followin TDBSAM_VERSION upgrade. metze
2008-12-29s3:passdb: make marshalling struct samu from and to a buffer more genericStefan Metzmacher2-664/+669
This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze
2008-12-23More asprintf warning fixes.Jeremy Allison1-4/+3
Jeremy.
2008-12-23Fix more ‘asprintf’, declared with attribute warn_unused_result.Jeremy Allison2-11/+18
Jeremy.
2008-12-23Fix more "warning: ignoring return value of ‘asprintf’, declared withJeremy Allison1-23/+62
attribute warn_unused_result" Jeremy.
2008-12-09s3-ldapsam: Fix Bug 5957: do not abort rename process on valid rename script.Günther Deschner1-1/+1
Guenther (cherry picked from commit 26139344fd0fac4fdd2a6752628b252fbd9b7450) (cherry picked from commit 866efa63a26f75bbf17cd4bebf639594e2feafba)
2008-11-14Make memcache_add_talloc NULL out the source pointerVolker Lendecke1-7/+7
This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
2008-11-06Make us clean under valgrind --leak-check=full by using ↵Jeremy Allison3-4/+4
talloc_autofree_context() instead of NULL. Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should be deleted when their parent context is deleted, so freeing them at some arbitrary point later will be a double-free. Jeremy.
2008-11-06Fix bug #5825 - Account locking out doesnt work with an LDAP backend.Based ↵Jeremy Allison1-1/+3
on a problem found by Boyang. Only the pdb_nds backend implements login attempts so this was broken for tdbsam and ldap. Jeremy.
2008-10-27s4-lsa: merge lsa_LookupSids/{2,3} from s3 lsa idl.Günther Deschner1-4/+4
Guenther
2008-10-23Use libutil genrand.Jelmer Vernooij1-2/+2
2008-10-22Use standard types.Jelmer Vernooij1-8/+8
2008-10-14Use GUID_random.Jelmer Vernooij1-1/+1