summaryrefslogtreecommitdiff
path: root/source3/include/passdb.h
AgeCommit message (Collapse)AuthorFilesLines
2025-02-22s3:passdb: add pdb_filter_hints()Stefan Metzmacher1-1/+13
This reveals information about our own domain/forest. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-07-05s3:include: Fix code spellingAndreas Schneider1-15/+15
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jul 5 07:32:15 UTC 2023 on atb-devel-224
2019-02-28lib: Remove some unused codeVolker Lendecke1-5/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 28 13:53:41 UTC 2019 on sn-devel-144
2018-03-19s3:passdb: add create_builtin_guests()Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-05-10s3-passdb: remove some dead prototypesGünther Deschner1-5/+0
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-04-22lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison1-1/+2
XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2016-01-22s3:passdb: move my_sam_name() from passdb to util_name.cMichael Adam1-1/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-30Add --set-nt-hash option to pdbedit to update user password from nt-hash ↵Alberto Maria Fiaschi1-0/+1
hexstring. Useful to take in sync password from other repository. (Modify MASK_USER_GOOD to include new flag BIT_PWSETNTHASH) pdbedit -vw show also password hashes . Split pdb_set_plaintext_passwd in two function: pdb_set_plaintext_passwd and pdb_update_history. pdb_update_history update password history and is call from pdb_set_plaintext_passwd. Signed-off-by: Alberto Maria Fiaschi <alberto.fiaschi@estar.toscana.it> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-18s3:passdb: add optional get_trusteddom_creds() hooksStefan Metzmacher1-0/+8
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11016 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-03idmap: unify passdb *id_to_sid methodsGarming Sam1-7/+21
Instead of passing down gid or uid, a pointer to a unixid is now sent down. This acts as an in-out variable so that the idmap functions can correctly receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066 Pair-programmed-with: Andrew Bartlett <abarlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-27s3:passdb: add pdb_get_trust_credentials()Stefan Metzmacher1-0/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
2014-06-16passdb: Allow a passdb module to do idmap for everythingAndrew Bartlett1-1/+4
This patch seems odd, but the pdb_samba_dsdb module has exactly this semantics. That is, the pdb_samba_dsdb is responsible for all IDMAP values, due to backing on to the idmap.ldb allocator. This option is added so we can continue to support the mappings written into that database even when switching winbindd implementations - the source4/ winbind code would only ask the idmap_ldb code, no matter what the SID. Almost all of the behaviour for this is already in winbindd, but we need this extra flag function so as to avoid (currently intentional) errors at startup due to not having a per-domain allocation configured in the smb.conf. Andrew Bartlett Change-Id: I6b0d7a1463fe28dfd36715af0285911ecc07585c Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2013-06-21s3:passdb add a gid argument to pdb_create_builtin_aliasChristian Ambach1-1/+1
make it possible to skip the allocation of a new gid from winbind by specifying the gid to be used Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-06-21s3:passdb expose pdb_create_builtin functionChristian Ambach1-0/+1
this one first tries to map the principal before allocating a new gid Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-06-21s3:passdb add pdb_*_is_responsible_for* functionsChristian Ambach1-0/+5
allows PDB modules to specify for which special domains they are responsible when it comes to SID->xid conversion By default, passdb modules will be responsible for local BUILTIN, local SAM and Unix Users/Groups Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2013-06-21s3:passdb add idmap control functionsChristian Ambach1-1/+8
make it possible for each backend to specify for which domains it should be asked for SID->xid mappings Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2013-04-09PASSDB: add support to set and enumerate UPN suffixes associated with our forestAlexander Bokovoy1-1/+17
Samba PDC may manage a forest containing DNS domains in addition to the primary one. Information about them is advertised via netr_DsRGetForestTrustInformation when trusted_domain_name is NULL, according to MS-NRPC and MS-LSAD, and via netr_GetForestTrustInformation. This changeset only expands PASSDB API; how suffixes are maintained is left to specific PDB modules. Set function is added so that suffixes could be managed through 'net' and other Samba utilities, if possible. One possible implementation is available for ipasam module in FreeIPA: http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=cc56723151c9ebf58d891e85617319d861af14a4 Reviewed-by: Andreas Schneider <asn@samba.org>
2012-12-03s3:passdb: factor pdb_sid_to_id_unix_users_and_groups() out of ↵Michael Adam1-0/+3
pdb_default_sid_to_id() The special treatment of the "Unix User" and "Unix Group" pseudo domains can be reused. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-09-07s3-passdb: wrap secrets.tdb accessors used by PDB modulesAlexander Bokovoy1-0/+11
PDB modules store domain sid and guid in secrets.tdb to cooperate with other parts of smbd. If PDB module is built outside Samba source code it has to be linked against internal libsecrets. Wrap required secrets_* calls to avoid direct linking. libpdb is linked against libsecrets by itself and this is enough.
2012-05-23s3-passdb: add unixid_from_uid/unixid_from_gid/unixid_from_both APIAlexander Bokovoy1-0/+5
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.
2012-05-02s3-passdb: Change pdb_sid_to_id() to return struct unixidAndrew Bartlett1-3/+3
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>
2012-04-19s3-passdb: Remove unused sampass->pass_must_change_timeAndrew Bartlett1-3/+0
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
2012-01-09s3-passdb: remove a forward declaration.Günther Deschner1-7/+6
Guenther
2011-11-16Fix bug #8561 - Password change settings not fully observed.Jeremy Allison1-0/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 16 00:22:41 CET 2011 on sn-devel-104
2011-10-28s3-passdb: use tevent_context in passdb.Günther Deschner1-2/+3
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
2011-10-18pdb-interface: Do not use unid_t hereSimo Sorce1-2/+2
This interface needs to be publicly available, unid_t here is not really useful and makes it harder to use it as unid_t is not a public union. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-14s3-passdb: remove fstring from pdb_set_user_sid_from_string().Günther Deschner1-1/+1
Guenther
2011-10-14s3-passdb: add {LM|NT}_HASH_LEN defines in passdb.h.Günther Deschner1-0/+8
Guenther
2011-10-14s3-passdb: use uintX_t at least in headers.Günther Deschner1-4/+4
Guenther
2011-10-14s3-passdb: move passdb prototypes into passdb.hGünther Deschner1-1/+285
Guenther
2011-10-14s3-passdb: move group mapping headers into passdb.hGünther Deschner1-1/+87
Guenther
2011-10-12s3-group-mapping: Remove fstrings from GROUP_MAP.Simo Sorce1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-09-26s3-passdb: Cleanup use of fstring and move to talloc.Simo Sorce1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-31s3-pdb_ipa: Add supprted encryption types to struct pdb_trusted_domainSumit Bose1-0/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31s3-pdb_ipa: Add posix offset to struct pdb_trusted_domainSumit Bose1-0/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2011-07-31s3-passdb: add dummy calls to control global (replicated) secrets.Günther Deschner1-2/+18
Guenther
2011-03-30s3-passdb: move some passdb defines to passdb.hGünther Deschner1-0/+29
Guenther
2011-03-30s3: include ../librpc/gen_ndr/lsa.h where needed.Günther Deschner1-0/+2
Guenther
2011-03-30s3-passdb: add machine_sid.h and lookup_sid.hGünther Deschner1-0/+2
Guenther
2011-03-30s3-passdb: move mapping.h into passdb.h, its needed here.Günther Deschner1-0/+2
Guenther
2011-03-30s3-passdb: move passdb headers to passdb/proto.h.Günther Deschner1-0/+2
Guenther
2011-02-22s3:auth: change num_groups to from size_t to uint32_tStefan Metzmacher1-1/+1
This will help with the change from UNIX_USER_TOKEN to security_unix_token metze
2011-02-17s3-passdb: add PDB_CAP_TRUSTED_DOMAINS_EX.Günther Deschner1-2/+3
Guenther
2011-02-16s3-lsa: Implement lsaRSetForestTrustInformationSumit Bose1-0/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16s3-ipasam: add ipasam_get_trusted_domain_by_sid()Sumit Bose1-0/+4
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16s3-passdb: add {get,set,del,enum}_trusted_domain callsSumit Bose1-0/+26
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-15s3: Add "code_page" to struct samuVolker Lendecke1-0/+2
2011-02-15s3: Add "country_code" to struct samuVolker Lendecke1-0/+3
2011-02-09s3: move some stuff out of smb.h to better locations.Günther Deschner1-0/+2
Guenther
2010-08-05s3-secrets: only include secrets.h when needed.Günther Deschner1-0/+9
Guenther