summaryrefslogtreecommitdiffstats
path: root/source3/passdb
Commit message (Collapse)AuthorAgeFilesLines
* s3: zero an uninitialized arrayMarc VanHeyningen2009-05-291-1/+4
| | | | | | | | Invalid pointers were being dereferenced in lookup_sids causing occasional seg faults. Signed-off-by: Tim Prouty <tprouty@samba.org> (cherry picked from commit 5afacc0a65e52e73e3887545c4e5e1ad44264b66)
* s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.Aravind Srinivasan2009-05-262-26/+4
| | | | | | This is very similar to be1dfff02d562e42a7847bd02fed8538630d3f41 (cherry picked from commit 5aefb44bf04becc6b80e7c3bf038d79851c5b0f9) (cherry picked from commit d07c3437aa9f6262abab87bc298c74fd953ebcfc)
* Fix the last few format arg missmatches I missed.Jeremy Allison2009-05-261-4/+4
| | | | | Jeremy. (cherry picked from commit d2ce16043ba7a0ee7368a611eacddc010d3935e0)
* Fix bug 6157Volker Lendecke2009-05-261-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. (cherry picked from commit b1d864d1006aab53a1692175adf2c64897eeffd9)
* Fix a bunch of compiler warnings about wrong format types.Jeremy Allison2009-05-263-10/+10
| | | | | | Should make Solaris 10 builds look cleaner. Jeremy. (cherry picked from commit b5947b876f3c777e075879d305b6672a6c8d8abd)
* s3/ldap: also handle DirX return codesBjörn Jacke2009-05-261-0/+2
| | | | (cherry picked from commit 5616abe2e8fb6a95fa82b80e8e97090e956b98ff)
* s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL ↵Günther Deschner2009-05-262-2/+2
| | | | | | | | context. Guenther (cherry picked from commit fee4c99be494b9679c414d6ba1938aa88adeacd3) (cherry picked from commit 10c009cec59358ec11a9d25242fe395f31f671a6)
* s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing ↵Günther Deschner2009-05-261-1/+1
| | | | | | | | talloc_free on malloced memory. Guenther (cherry picked from commit 5b37df21f6af52d20ad3a25361b1d7faa51308d1) (cherry picked from commit 079c52a2c39ca2723402e7c6e2f8fd5825c2c40f)
* s3:smbldap Remove smbldap_get_dnAndrew Bartlett2009-04-152-29/+18
| | | | | | | | This removes one more caller to pull_utf8_allocate() Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 9512640155f3f249e4fd5ad076375592cbd65fc6) (cherry picked from commit 03c7459fd259ca898c5fde932c02ccdc37dcbd34)
* Allow pdbedit to change a user rid/sid. Based on a fix from Alexander ↵Jeremy Allison2009-04-151-3/+57
| | | | | | | Zagrebin <alexz@visp.ru>. Jeremy. (cherry picked from commit 6f7147225ab599a4085ef8eb7af6900d6b681a4e)
* s3-passdb: add smb_create_user().Günther Deschner2009-04-151-0/+59
| | | | | | Guenther (cherry picked from commit d0e1ff4aff24ef2f3b3f535ad25ad0573382e1a3) (cherry picked from commit 44d72cfa74c103c41beea2f5651155506667811b)
* s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam2009-04-151-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 (cherry picked from commit a7bbe8d10835d813a8d528e6e70f5d944ac0f804)
* Fix the problem of 3.0.x passdb databases being versionJeremy Allison2009-04-151-5/+43
| | | | | | | | 3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy. (cherry picked from commit 7d3b85999c6d2521ef2f9a5aace52c9a19bf2f42)
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-04-151-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. (cherry picked from commit ede0f69a97abd4f1cb7870b2da65d9198d20c7ad)
* Fix bug 6097Volker Lendecke2009-04-151-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! (cherry picked from commit e4f3d75432dbe372e164962a993b6e882fe44e83)
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-04-151-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. (cherry picked from commit 8e1c29a8be7ea21a6998b77e872bcef90160ee83)
* Missing break in conversion function prevents tdb password database update.Alexander Zagrebin2009-04-151-0/+1
| | | | (cherry picked from commit 49399cb3cc09213c6c44799e17d7a95afc8c8584)
* s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 namesDan Sledz2009-03-121-5/+7
| | | | Also fix an incorrect TALLOC_FREE
* Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke2009-03-074-57/+46
|
* 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 an incompatible pointer passed to winbind_get_groupsVolker Lendecke2009-02-251-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.
* s3: Rename auth_onefs_wb and pdb_onefs_samDan Sledz2009-02-241-58/+73
| | | | | | | auth_onefs_wb.c -> auth_wbc.c pdb_onefs_sam.c -> pdb_wbc_sam.c No changes to functionality
* Fix a typoVolker Lendecke2009-02-211-1/+1
|
* Introduce a new passdb backend: pdb_onefs_samDan Sledz2009-02-201-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.
* 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.
* s3: Added new parameter "map untrusted to domain"Steven Danneman2009-02-121-0/+18
| | | | | | | When enabled this reverts smbd to the legacy domain remapping behavior when a user provides an untrusted domain This partially reverts d8c54fdd
* s3: Change behavior when seeing an unknown domain.Dan Sledz2009-02-111-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.
* Fix some nonempty blank linesVolker Lendecke2009-02-081-41/+41
|
* Fix nonempty blank linesVolker Lendecke2009-02-011-61/+60
|
* Memory leaks and other fixes found by Coveritytodd stecher2009-01-212-0/+7
|
* s3:passdb: put login_cache.tdb into cache_dir, not lock_dir.Michael Adam2009-01-161-2/+3
| | | | Michael
* Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.Jeremy Allison2009-01-141-1/+1
| | | | Jeremy.
* Add iconv_convenience argument to size functions.Jelmer Vernooij2009-01-011-8/+8
|
* s3:pdb_tdb: store the next rid counter in passdb.tdb instead of ↵Stefan Metzmacher2008-12-291-75/+47
| | | | | | | | winbind_idmap.tdb This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4. metze
* s3:passdb: add SAMU_BUFFER_V4 with no changesStefan Metzmacher2008-12-291-1/+16
| | | | | | | The upgrade is required because of the followin TDBSAM_VERSION upgrade. metze
* s3:passdb: make marshalling struct samu from and to a buffer more genericStefan Metzmacher2008-12-292-664/+669
| | | | | | | This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze
* 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) (cherry picked from commit 866efa63a26f75bbf17cd4bebf639594e2feafba)
* 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.
* s4-lsa: merge lsa_LookupSids/{2,3} from s3 lsa idl.Günther Deschner2008-10-271-4/+4
| | | | Guenther
* Use libutil genrand.Jelmer Vernooij2008-10-231-2/+2
|
* Use standard types.Jelmer Vernooij2008-10-221-8/+8
|
* Use GUID_random.Jelmer Vernooij2008-10-141-1/+1
|
* Use common util_file code.Jelmer Vernooij2008-10-121-3/+3
|