summaryrefslogtreecommitdiffstats
path: root/source3/passdb
Commit message (Collapse)AuthorAgeFilesLines
* s3-passdb: Fix negative SID->uid/gid/both cache handlingIra Cooper2012-05-241-0/+14
| | | | | | -1 uid/gid/both signals a non existent uid/gid/both. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Introduce system MIT krb5 build with --with-system-mitkrb5 option.Alexander Bokovoy2012-05-231-2/+2
| | | | | | | | | | | | | | | | | System MIT krb5 build also enabled by specifying --without-ad-dc When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level configure in WAF build we are trying to detect and use system-wide MIT krb5 libraries. As result, Samba 4 DC functionality will be disabled due to the fact that it is currently impossible to implement embedded KDC server with MIT krb5. Thus, --with-system-mitkrb5/--without-ad-dc build will only produce * Samba 4 client libraries and their Python bindings * Samba 3 server (smbd, nmbd, winbindd from source3/) * Samba 3 client libraries In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture. This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
* s3-passdb: add unixid_from_uid/unixid_from_gid/unixid_from_both APIAlexander Bokovoy2012-05-231-0/+47
| | | | | | | | | | | | | struct unixid is defined in idmap.idl and therefore to use it one would need generated headers from librpc/gen_ndr. Not all of these files are installed and available as public headers. Also, they pull in some support headers which requires them to be available via specific locations like <librpc/gen_ndr/*> or <libcli/util>. Instead of pulling the headers to get structure and enum definitions, introduce three simple helpers to fill in 'struct unixid' based on the type of id. This is sufficient for PASSDB users and does not require exposing generated headers or code.
* Fix bug 8920, null dereferenceSteve Langasek2012-05-101-1/+3
| | | | | | | | | | | | | | Description: Avoid null dereference in initialize_password_db() When initialize_password_db() is called with reload=True, it's assumed that the free_private_data member of pdb_methods is non-null. This is not necessarily the case, as the tdb backend has no private data and therefore no free function. Check to see if we have private data that needs freed before calling. Author: Steve Langasek <steve.langasek@ubuntu.com> Bug-Ubuntu: https://bugs.launchpad.net/bugs/829221 Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu May 10 11:07:27 CEST 2012 on sn-devel-104
* s3: Use hex_encode_bufVolker Lendecke2012-05-041-4/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 4 20:32:37 CEST 2012 on sn-devel-104
* s3: Use hex_encode_bufVolker Lendecke2012-05-041-3/+1
|
* s3:passdb fix a compiler warningChristian Ambach2012-05-031-1/+1
| | | | | | | this one could have caused crashes Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Thu May 3 23:22:05 CEST 2012 on sn-devel-104
* s3-pypassdb: add wrapper for enum_group_membershipsAndrew Bartlett2012-05-031-1/+57
| | | | | | | | This will be used in samba3upgrade to try and get the group memberships by instead asking for the groups each user is in. This reverse lookup may be more reliable, as this is used at login time. Andrew Bartlett
* s3-pypassdb: remove unused variableAndrew Bartlett2012-05-031-2/+0
|
* s3-passdb: Add extra debug on ID mapping failuresAndrew Bartlett2012-05-021-0/+7
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed May 2 15:34:13 CEST 2012 on sn-devel-104
* s3-idmap: convert most idmap_cache callers to unixid APIAndrew Bartlett2012-05-022-19/+29
| | | | | | | | | This will eventually allow the struct unixid to be passed all the way up and down the stack. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* s3:passdb: remove a forward declaration of wbcSidToUnixId that has become ↵Michael Adam2012-05-021-1/+0
| | | | unnecessary
* s3:passdb: rename sids_to_unix_ids() --> sids_to_unixids() for consistencyMichael Adam2012-05-022-3/+3
|
* s3-passdb: Use struct unixid in sids_to_unix_idsAndrew Bartlett2012-05-022-18/+32
| | | | | | | | | This avoids the union in the struct wbcUnixId and moves us to using only struct unixid internally. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* s3-passdb: Rename legacy_sid_to_id -> legacy_sid_to_unixid for clarityAndrew Bartlett2012-05-021-3/+3
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-passdb: Change pdb_sid_to_id() to return struct unixidAndrew Bartlett2012-05-027-133/+142
| | | | | | | | | This will make it easier to consistantly pass a struct unixid all the way up and down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* passdb: Do not panic in initialize_password_dbChristof Schmitt2012-04-301-17/+17
| | | | | | | | | | | | A call to initialize_password_db leads to smb_panic in case the backend returns an error. All callers to initialize_password_db check the return value, so this code path should return the status instead of calling smb_panic. Move the call to smb_panic from pdb_get_methods_reload pdb_get_methods to get it out of the initialize code path. This allows printing the proper error message for 'net getlocalsid' which is much nicer than printing the panic stack trace.
* s3: Remove two unused variablesVolker Lendecke2012-04-211-2/+0
|
* s3:passdb: do not use the in-memory idmap cache (it will be removed)Michael Adam2012-04-203-156/+0
|
* s3: Remove an unused variableVolker Lendecke2012-04-201-1/+0
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Apr 20 12:44:20 CEST 2012 on sn-devel-104
* s3-passdb: Remove unused sampass->pass_must_change_timeAndrew Bartlett2012-04-195-36/+3
| | | | | | | | | | | | There is no need to call pdb_set_pass_must_change_time() because nothing ever consults that value. It is always calculated from the domain policy. Also, this means we no longer store the value in LDAP. The value would only ever be set when migrating from tdbsam or smbpasswd, not on password changes, so would become incorrect over time. Andrew Bartlett
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-2/+2
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* build: Remove SMB_F* locking definesAndrew Bartlett2012-04-051-1/+1
|
* build: Remove SMB_STRUCT_FLOCK defineAndrew Bartlett2012-04-051-1/+1
|
* build: Remove sys_fopen wrapperAndrew Bartlett2012-04-051-3/+3
|
* build: Remove sys_open wrapperAndrew Bartlett2012-04-051-1/+1
|
* build: Remove sys_ftell wrapperAndrew Bartlett2012-04-051-1/+1
|
* build: Remove sys_lseek wrapperAndrew Bartlett2012-04-051-4/+4
|
* build: Remove sys_ftruncate wrapperAndrew Bartlett2012-04-051-1/+1
|
* use usleep rather than sys_usleep in various places, in anticipation of ↵Jelmer Vernooij2012-03-241-1/+1
| | | | usleep moving to libreplace.
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-242-2/+2
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
* lib/util: Remove dummy wrapper for getpwuid().Jelmer Vernooij2012-03-241-1/+1
|
* s3: Fix bug 8567 -- segfault in dom_sid_compareVolker Lendecke2012-02-201-0/+1
| | | | | | | | The underlying problem was that with ldapsam:trusted we require the a group mapping for the primary group of every user, including root. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 20 22:36:23 CET 2012 on sn-devel-104
* s3-secrets: Remove unused secrets_delete_generic()Andrew Bartlett2012-02-181-16/+0
| | | | | | | | | Found by callcatcher. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Feb 18 09:01:15 CET 2012 on sn-devel-104
* s3-secrets: Remove unused secrets_delete_machine_password()Andrew Bartlett2012-02-181-13/+0
| | | | | | Found by callcatcher. Andrew Bartlett
* s3-passdb: Remove #if _SAMBA_BUILD_ == 4 from pdb_samba4Andrew Bartlett2012-02-081-2/+0
| | | | | | | | | pdb_samba4 is only built with waf anyway. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Feb 8 09:17:40 CET 2012 on sn-devel-104
* s3-waf: Link tdbsam against needed libraries.Andreas Schneider2012-02-071-1/+1
| | | | | Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Tue Feb 7 12:49:59 CET 2012 on sn-devel-104
* s3-waf: Link against tdb_compat instead of tdb.Andreas Schneider2012-02-071-2/+2
|
* s3: Fix unused variable warningsVolker Lendecke2012-01-291-0/+4
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jan 29 16:33:29 CET 2012 on sn-devel-104
* s3-pdb: Make ADS-type backends updates secrets.tdb.Simo Sorce2012-01-273-0/+127
| | | | | | | | | | Make the backends that have ADS capability the only ones that can change the SID and GUID in secrets.tdb at initialization time. Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Fri Jan 27 19:42:17 CET 2012 on sn-devel-104
* s3-pdb: Break SECRETS3 dependency on PDB.Simo Sorce2012-01-271-50/+49
| | | | | | | | | | | | | | | This is causing circular depdnendcies that bring libpdb in all code and this is BAD. This change 'protects' the sid and guid of the domain by adding a special key that makes them effectively read only. Limit this temporarily to the samba 4 build, once it gets some good testing the samba4 ifdefs can be dropped. fix pdb dependencies Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-waf: Add missing dependency of pdb_wbc_sam to wbclient.Andreas Schneider2012-01-271-1/+1
|
* Finally remove all malloc()'s from the substitute code. Now totallyJeremy Allison2012-01-271-3/+3
| | | | | | | talloc() based. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104
* s3-passdb: Fix pdb_samba4 setting of plaintext passwordsAndrew Bartlett2012-01-241-1/+9
| | | | | | | | We were setting a UTF8 password into the UTF16 clearTextPassword. Converting from CH_UNIX to CH_UTF16 should fix this. Andrew Bartlett
* s3-passdb: Use DSDB_PASSWORD_BYPASS_LAST_SET flags in pdb_samba4Andrew Bartlett2012-01-241-9/+9
|
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-183-6/+11
| | | | | | | This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
* s3-passdb: trying to decouple passdb and secrets a little.Günther Deschner2012-01-185-100/+169
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Jan 18 14:46:18 CET 2012 on sn-devel-104
* s3-waf: fix compile of pdb_ldap as shared module by moving ldap schema ↵Günther Deschner2012-01-131-1/+1
| | | | | | | | | helpers to libpdb.so These helpers are used in other parts of Samba as well (like in idmap and in the net provision code). Guenther
* s3-passdb: make pdb_password_change_time_max static.Günther Deschner2011-11-291-1/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Nov 29 15:16:51 CET 2011 on sn-devel-104
* s3-py-passdb: Fix handling of uninitialized gid valuesAmitay Isaacs2011-11-181-1/+1
| | | | | | | | Uninitialized gid value is set to -1 and return as such from python passdb api. Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Fri Nov 18 06:18:33 CET 2011 on sn-devel-104