summaryrefslogtreecommitdiffstats
path: root/src/db
Commit message (Collapse)AuthorAgeFilesLines
* DB: Add sss_ldb_el_to_string_listJakub Hrozek2014-01-292-13/+26
|
* sudo: memset tm when converting time attributesPavel Březina2014-01-291-0/+2
| | | | | | | | | | strptime() which is used to parse LDAP time value does not initialize all fields of tm structure (especially tm_isdst). This results in random behavior - when the tm is converted into timestamp via mktime(), the result depends on current value of tm_isdst. Resolves: https://fedorahosted.org/sssd/ticket/2213
* responder: Set forest attribute in AD domainsPavel Reichl2014-01-092-2/+36
| | | | | Resolves: https://fedorahosted.org/sssd/ticket/2160
* Add sysdb_attrs_get_int32_tSumit Bose2013-12-192-0/+28
|
* Add new option ldap_group_typeSumit Bose2013-12-191-0/+1
|
* Use lower-case name for case-insensitive searchesSumit Bose2013-12-193-16/+32
| | | | | | | | | | | | The patch makes sure that a completely lower-cased version of a fully qualified name is used for case insensitive searches. Currently there are code paths where the domain name was used as configured and was not lower-cased. To make sure this patch does not break with old entries in the cache or case sensitive domains a third template was added to the related filters templates which is either filled with a completely lower-cased version or with the old version. The other two template values are unchanged.
* Add sysdb_attrs_add_lc_name_aliasSumit Bose2013-12-192-0/+24
|
* SYSDB: Sanitize filter before removing ghost attrsLukas Slebodnik2013-11-291-1/+8
| | | | | | | | | | | sysdb_add_user fails with EIO if enumeration is disabled and user contains backslashes. We try to remove ghost attributes from groups with disabled enumeration, but unsanitized filter is used to find ghost attributes "(|(ghost=usr\\\\002)" and ldb cannot parse this filter. Resolves: https://fedorahosted.org/sssd/ticket/2163
* SYSDB: Sanitize filter before sysdb_search_groupsLukas Slebodnik2013-11-291-1/+8
| | | | | | | | | | sysdb_delete_user fails with EIO if user does not exist and contains backslashes. ldb could not parse filter (&(objectclass=group)(ghost=usr\\\\001)), because ghost value was not sanitized Resolves: https://fedorahosted.org/sssd/ticket/2163
* SYSDB: Skip malformed netgroup attribute.Lukas Slebodnik2013-11-151-1/+5
| | | | | | | | | | It was not easy find out why netgroup could not be covert into result entries. Problem was that nisNetgroupTriple contained unexpected string "(,user01)" This patch will ignore only malformed attribute and processing of netgroup will not fail. Resolves: https://fedorahosted.org/sssd/ticket/2137
* SYSDB: Add sysdb_delete_by_sidJakub Hrozek2013-10-252-0/+53
|
* SYSDB: Fix incorrect DEBUG messageStephen Gallagher2013-10-041-1/+1
| | | | | | | | A bad comparison resulted in the sysdb_sudo_check_time() function always printing a debug message saying that the time matched. Resolves: Coverity Issue #12031
* sudo: improve time restrictions debug messagesPavel Březina2013-10-011-0/+8
|
* sudo: allow specifying only one time restrictionPavel Březina2013-10-011-47/+34
| | | | https://fedorahosted.org/sssd/ticket/2100
* IPA: store forest name for forest member domainsSumit Bose2013-09-272-4/+50
| | | | | In order to fix https://fedorahosted.org/sssd/ticket/2093 the name of the forest must be known for a member domain of the forest.
* sysdb: sysdb_update_members can take either name or dnPavel Březina2013-09-262-20/+60
| | | | | | | | | We need to work with distinguish names when processing cross-domain membership, because groups and users may be stored in different sysdb tree. Resolves: https://fedorahosted.org/sssd/ticket/2066
* krb5: save canonical upn to sysdbSumit Bose2013-09-231-0/+1
| | | | | | | | | | | | | If the returned TGT contains a different user principal name (upn) than used in the request, i.e. the upn was canonicalized, we currently save it to sysdb into the same attribute where the upn coming from an LDAP server is stored as well. This means the canonical upn might be overwritten when the user data is re-read from the LDAP server. To avoid this this patch add a new attribute to sysdb where the canonical upn is stored and makes sure it is used when available. Fixes https://fedorahosted.org/sssd/ticket/2060
* Fix formating of variables with type: gid_tLukas Slebodnik2013-09-111-4/+6
|
* Fix formating of variables with type: uid_tLukas Slebodnik2013-09-111-2/+3
|
* Fix formating of variables with type: size_tLukas Slebodnik2013-09-113-3/+3
|
* DB: Rise search functions debug levelsOndrej Kos2013-09-101-9/+9
|
* DB: Add user/group lookup by SIDOndrej Kos2013-09-102-4/+102
|
* sysdb_search_group_by_gid: obtain gid instead of uidPavel Březina2013-09-101-1/+1
|
* Read enumerate state for subdomains from cacheJakub Hrozek2013-08-281-1/+15
| | | | | The enumerate flag will be read from the cache for subdomains and the domain object will be created accordingly.
* SYSDB: Store enumerate flag for subdomainJakub Hrozek2013-08-282-3/+27
|
* DB: remove unused realm parameter from sysdb_master_domain_add_infoJakub Hrozek2013-08-282-22/+2
| | | | The parameter was not used at all.
* DB: Update sss_domain_info with new updated dataJakub Hrozek2013-08-281-5/+5
|
* ipa-server-mode: add IPA group memberships to AD usersSumit Bose2013-08-281-0/+1
| | | | | | | | | | | | | | | | When IPA trusts an AD domain the AD user or groups can be placed into IPA groups e.g. to put AD users under the control of HBAC. Since IPA group can only have members from the IPA directory tree and the AD users and groups are not stored there a special IPA object called external group was introduced. SIDs of users and groups can be added to the external group and since the external groups are in the IPA directory tree they can be member of IPA groups. To speed things up and to remove some load from the IPA servers SSSD reads all external groups and stores them in memory for some time before rereading the data. Enhances https://fedorahosted.org/sssd/ticket/1962
* sysdb_add_incomplete_group: store SID string is availableSumit Bose2013-08-192-1/+9
| | | | | | During initgroups request we read the SID of a group from the server but do not save it to the cache. This patch fixes this and might help to avoid an additional lookup of the SID later.
* fill_initgr: add original primary GID if availableSumit Bose2013-08-191-0/+1
| | | | | | | | | | | | | In some cases when MPG domains are used the information about the original primary group of a user cannot be determined by looking at the explicit group memberships. In those cases the GID related to the original primary group is stored in a special attribute of the user object. This patch adds the GID of the original primary group when available and needed. Fixes https://fedorahosted.org/sssd/ticket/2027
* sdap_save_user: save original primary GID of subdomain usersSumit Bose2013-08-191-0/+1
| | | | | | | | | | | | | | If ID mapping is enabled we use magic private groups (MPG) for subdomains, i.e. the UID and the primary GID of the user will have the same numerical value. As a consequence the information about the original primary group might get lost because neither in AD domains nor on a typical UNIX system the user is an explicit member of it's primary group. With this patch the mapped GID or the original primary group is saved in the cached user object under a new attribute. Fixes https://fedorahosted.org/sssd/ticket/2027
* Use functionm ldb_dn_get_linearized to format struct ldb_dnLukas Slebodnik2013-07-191-3/+6
|
* DB: sysdb_search_user_by_name: search by both name and aliasJakub Hrozek2013-07-091-2/+17
|
* Read mpg state for subdomains from cacheSumit Bose2013-06-281-5/+19
| | | | | The mpg flag will be read from the cache for subdomains and the domain object will be created accordingly.
* Save mpg state for subdomainsSumit Bose2013-06-282-4/+33
| | | | | | The information of a subdomain will use magic private groups (mpg) or not will be stored together with other information about the domain in the cache.
* Add support for new ipaRangeType attributeSumit Bose2013-06-282-0/+18
| | | | | | | | | Recent versions of FreeIPA support a range type attribute to allow different type of ranges for sub/trusted-domains. If the attribute is available it will be used, if not the right value is determined with the help of the other idrange attributes. Fixes https://fedorahosted.org/sssd/ticket/1961
* DB: Don't add invalid rangesOndrej Kos2013-06-091-7/+10
| | | | | | | | https://fedorahosted.org/sssd/ticket/1816 When saving or updating ranges, skip those which are invalid (not provided ipaNTTrustedDomainSID or ipaSecondaryBaseRID, or both provided at the same time)
* New utility function sss_get_domain_nameJakub Hrozek2013-06-071-14/+4
| | | | | Instead of copying a block of code that checks whether domain is a subdomain and uses only name of FQDN as appropriate, wrap the logic into a function.
* Read SIDs of groups with sysdb_initgroups() as wellSumit Bose2013-06-061-0/+1
|
* Add utility functions for formatting fully-qualified namesJakub Hrozek2013-05-301-4/+2
| | | | | | Instead of using printf-like functions directly, provide two wrappers that would encapsulate formatting the fully-qualified names. No functional change is present in this patch.
* Fixing critical format string issues.Lukas Slebodnik2013-05-201-1/+2
| | | | | | --missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n'
* sysdb: add sysdb_search_object_by_sid()Sumit Bose2013-05-022-0/+62
| | | | | | The patch add a new sysdb to find objects based on their SID. Currently only the basic attributes needed to map SIDs to POSIX IDs and names are requested, but this list can be extended for future use cases.
* Only try to relink ghost users if we're not enumeratingJakub Hrozek2013-04-291-4/+9
| | | | | | | | https://fedorahosted.org/sssd/ticket/1893 When SSSD is not enumerating (which is the default), we are trying to link any "ghost" entries with a newly created user entry. However, when enumeration is on, this means a spurious search on adding any user.
* Move SELinux processing to provider.Michal Zidek2013-03-191-107/+0
| | | | | | | | | | | | The SELinux processing was distributed between provider and pam responder which resulted in hard to maintain code. This patch moves the logic to provider. IT ALSO REQUIRES CHANGE IN THE SELINUX POLICY, because the provider also writes the content of selinux login file to disk (which was done by responder before). https://fedorahosted.org/sssd/ticket/1743
* Fix initialization of multiple variablesOndrej Kos2013-03-131-1/+1
|
* Remove the alt_db_path parameter of sysdb_initMichal Zidek2013-03-052-11/+2
| | | | | | This parameter was never used. https://fedorahosted.org/sssd/ticket/1765
* Use SSSD specific errors for offline authSimo Sorce2013-03-041-8/+9
| | | | | | This prevents reportin false errors when internal functions return a generic EINVAL or EACCES that should just be treated as internal errors.
* sysdb: try dealing with binary-content attributesJan Engelhardt2013-02-262-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1818 I have here a LDAP user entry which has this attribute loginAllowedTimeMap:: AAAAAAAAAP///38AAP///38AAP///38AAP///38AAP///38AAAAAAAAA In the function sysdb_attrs_add_string(), called from sdap_attrs_add_ldap_attr(), strlen() is called on this blob, which is the wrong thing to do. The result of strlen is then used to populate the .v_length member of a struct ldb_val - and this will set it to zero in this case. (There is also the problem that there may not be a '\0' at all in the blob.) Subsequently, .v_length being 0 makes ldb_modify(), called from sysdb_set_entry_attr(), return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX. End result is that users do not get stored in the sysdb, and programs like `id` or `getent ...` show incomplete information. The bug was encountered with sssd-1.8.5. sssd-1.5.11 seemed to behave fine, but that may not mean that is the absolute lower boundary of introduction of the problem.
* Introduce IS_SUBDOMAIN() macroSimo Sorce2013-02-101-2/+2
| | | | Fixes https://fedorahosted.org/sssd/ticket/1766
* Change the way domains are linked.Simo Sorce2013-02-102-106/+68
| | | | | | | | | | | | | | | | | | | - Use a double-linked list for domains and subdomains. - Never remove a subdomain, simply mark it as disabled if it becomes unused. - Rework the way subdomains are refreshed. Now sysdb_update_subdomains() actually updates the current subdomains and marks as disabled the ones not found in the sysdb or add new ones found. It never removes them. Removal of missing domains from sysdb is deferred to the providers, which will perform it at refresh time, for the ipa provider that is done by ipa_subdomains_write_mappings() now. sysdb_update_subdomains() is then used to update the memory hierarchy of the subdomains. - Removes sysdb_get_subdomains() - Removes copy_subdomain() - Add sysdb_subdomain_delete()