summaryrefslogtreecommitdiffstats
path: root/source/passdb
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #7072 - Accounts can't be unlocked from ldap.Jeremy Allison2010-02-041-8/+17
| | | | | | | | | | | | | | | Fix suggested by Andy Hanton <andyhanton@gmail.com>. The LOGIN_CACHE struct contains two time_t entries, but was being written to and read from via tdb_pack/tdb_unpack functions using explicit 32-bit int specifiers. This would break on machines with a 64-bit time_t. Use correct int sizes for tdb_pack/tdb_unpack. We have to fix this properly before 2037 :-). Contains fixes from master 627fb85092f728065b6d772c41aeb75018154e86 and 69fd8461b8792f4fee1b61db03953044565492c6. Jeremy.
* s3:pdb_ldap: restore Samba 3.0.x behavior and use the first "uid" value.Stefan Metzmacher2010-01-131-1/+1
| | | | | | | | See bug #6157 for more details. metze Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Fix bug 5886Volker Lendecke2009-08-311-8/+26
| | | | | | | | | Ok, that's a very long-standing one. I finally got around to install a recent OpenLDAP and test the different variants of setting a NULL password etc. Thanks all for your patience! Volker
* s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().Michael Adam2009-08-111-1/+1
| | | | | | With the previous code, the cache can never have been hit at all. Michael
* Fix bug 6157Volker Lendecke2009-06-061-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.
* s3/passdb: Fix debug message: 'net setmaxrid' does not exist.Karolin Seeger2009-06-061-2/+2
| | | | | | | This is aiming bug #6351. Karolin (cherry picked from commit c94d1cd7b1dc3ff99ae5a1eb9058ed6015fb9749)
* s3: zero an uninitialized arrayMarc VanHeyningen2009-05-281-1/+4
| | | | | | | Invalid pointers were being dereferenced in lookup_sids causing occasional seg faults. Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3/ldap: also handle DirX return codesBjörn Jacke2009-05-151-0/+2
| | | | this is a backport of f238809d236443b8968e1b4b197a55935c7c7e85 from master
* Allow pdbedit to change a user rid/sid. Based on a fix from AlexanderJeremy Allison2009-04-011-3/+57
| | | | | Zagrebin <alexz@visp.ru>. Jeremy.
* s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam2009-04-011-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
* Fix the problem of 3.0.x passdb databases being versionJeremy Allison2009-03-271-5/+43
| | | | | | | 3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy.
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-03-271-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.
* Fix bug 6097Volker Lendecke2009-03-241-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!
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-03-181-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.
* Missing break in conversion function prevents tdb password database update.Alexander Zagrebin2009-03-171-0/+1
|
* s3 passdb: Add back some useful debug statementsTim Prouty2009-03-031-18/+24
| | | | Originally removed in be1dfff02d562e42a7847bd02fed8538630d3f41
* It appears that the first time we see a uid/gid that winbind can't map,Dan Sledz2009-03-021-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.
* Fix printf warnings found on systems where time_t <> long int.Jeremy Allison2009-02-191-8/+8
| | | | Jeremy.
* Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.Jeremy Allison2009-02-171-1/+12
| | | | Jeremy.
* Memory leaks and other fixes found by Coveritytodd stecher2009-01-222-0/+7
|
* Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.Jeremy Allison2009-01-141-1/+1
| | | | Jeremy.
* s3:pdb_tdb: store the next rid counter in passdb.tdb instead of ↵Stefan Metzmacher2008-12-301-75/+47
| | | | | | | | | winbind_idmap.tdb This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4. metze (cherry picked from commit 7516ba860c160e8b971b6f5bc1036370169e6e8a)
* s3:passdb: add SAMU_BUFFER_V4 with no changesStefan Metzmacher2008-12-301-1/+16
| | | | | | | | The upgrade is required because of the followin TDBSAM_VERSION upgrade. metze (cherry picked from commit 671469ae7e3013809fe3995ec8f33dda9adda2ed)
* s3:passdb: make marshalling struct samu from and to a buffer more genericStefan Metzmacher2008-12-302-664/+669
| | | | | | | | This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze (cherry picked from commit 0544734309feea44e8d449737a9934231f63693d)
* More asprintf warning fixes.Jeremy Allison2008-12-231-4/+3
| | | | Jeremy.
* Fix more ‘asprintf’, declared with attribute warn_unused_result.Jeremy Allison2008-12-232-11/+18
| | | | Jeremy.
* Fix more "warning: ignoring return value of ‘asprintf’, declared withJeremy Allison2008-12-231-23/+62
| | | | | attribute warn_unused_result" Jeremy.
* s3-ldapsam: Fix Bug 5957: do not abort rename process on valid rename script.Günther Deschner2008-12-091-1/+1
| | | | | Guenther (cherry picked from commit 26139344fd0fac4fdd2a6752628b252fbd9b7450)
* Make memcache_add_talloc NULL out the source pointerVolker Lendecke2008-11-141-7/+7
| | | | | | This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
* Make us clean under valgrind --leak-check=full by using ↵Jeremy Allison2008-11-063-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.
* Fix bug #5825 - Account locking out doesnt work with an LDAP backend.Based ↵Jeremy Allison2008-11-061-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.
* samu_set_unix() does not use the rid allocator, but forces to use theSimo Sorce2008-09-031-1/+1
| | | | | | | algoritmic allocator unconditionally, this is wrong an inconsistent. Use samu_alloc_rid_unix() instead. (If we create a new user we should do it in a way consistent with all other commands like pdbedit -a and net rpc user add.)
* Fix bug spotted by Simo - don't use legacy if expired entry.Jeremy Allison2008-08-261-4/+4
| | | | Jeremy.
* Don't ask winbindd if we got a -ve cache entry.Jeremy Allison2008-08-261-4/+38
| | | | Jeremy.
* Fix the build :-(. Ask winbindd if we find a negative cache entry (or shouldJeremy Allison2008-08-261-5/+17
| | | | | we just call the legacy function ?). Jeremy.
* Get smbd to look (read-only) into the winbindd cache for uid/gid <--> sid ↵Jeremy Allison2008-08-261-33/+51
| | | | | | mappings. Jeremy.
* fixed lots of places that paniced on a failed transaction_commit,Andrew Tridgell2008-08-131-4/+5
| | | | thinking it was a failure of a transaction cancel
* first cut at adding full transactions for ctdb to samba3Andrew Tridgell2008-08-132-3/+3
|
* pdb_interface: Fix typo in debug message.Karolin Seeger2008-07-291-1/+1
| | | | Karolin
* Add casts to uint32_t to match prototype for sid_append_rid().Jeremy Allison2008-07-241-4/+4
| | | | Jeremy.
* Use sys_getgrnam not getgrnam. Pointed out by Herb.Jeremy Allison2008-07-241-1/+1
| | | | Jeremy.
* pdb_ldap: Raise level for debug message to avoid log file flooding.John H Terpstra2008-07-241-1/+1
|
* Use LDAP macros instead of attribute names.Karolin Seeger2008-07-181-20/+19
| | | | Karolin
* Fix typo.Karolin Seeger2008-07-141-1/+1
| | | | | | retieve -> retrieve Karolin
* Revert "Make use of sid_check_is_in_unix_users/groups"Volker Lendecke2008-07-111-16/+11
| | | | This reverts commit cd8e63b2b45402091d6d328b3c6ca593fc19ac92.
* Revert "Don't scream, better explain a bit in comments"Volker Lendecke2008-07-111-8/+10
| | | | This reverts commit dcc39ed00453a075b23daece2844ca4817bfbfaf.
* Revert "Remove an unused variable"Volker Lendecke2008-07-111-0/+1
| | | | This reverts commit 454cb852e06fa3d8bdd0eebb3ebdb24b3d74ecd0.
* Fix some memleaks regarding trustdom passwordsVolker Lendecke2008-07-101-3/+15
|
* Fix some uninitialized variable references via ndr_printVolker Lendecke2008-07-101-1/+3
|
* Give a nice error message if trying to join with a non-privileged userVolker Lendecke2008-07-101-1/+1
|