summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* sss_sifp: set output parameters if attribute is NULLPavel Březina2014-07-161-43/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | There are two cases that may happen when a user calls Get or GetAll: 1) the attribute is missing 2) the attribute is empty sss_sifp has two error code to distinguish between those two cases: 1) SSS_SIFP_ATTR_MISSING 2) SSS_SIFP_ATTR_NULL Usually the caller is not interested on situations when the attribute is empty and it can be considered as error. Having it as a separate error code instead of setting the output value to NULL is necesarry since attribute does not have to be a pointer. This patch however sets pointer type attributes to NULL since it may simplify the code path when the caller is actually interested in this information (e. g. empty server list on domain objects). It is not possible to send a NULL string over a D-Bus nor it is possible to have hash table NULL with current code so these two scenarios are not tested. However, it is handled in sss_sifp_attr code for completeness. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* BUILD: Add version symbol files for public libraries.Lukas Slebodnik2014-07-091-0/+56
| | | | | | | | | | | | | | | | Version symbol files will help package systems to catch backward compatible changes (newly added functions) into library. The difference between libraries libsss_nss_idmap_test.so and libsss_nss_idmap.so is that the 1st library will not be installed and has more exported functions, which are necessary for mocking with cmocka for test sss_nss_idmap-test. Resolves: https://fedorahosted.org/sssd/ticket/2194 Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_sifp: add prefix and exec_prefix to pkg-configPavel Březina2014-07-091-0/+2
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_sifp: pkg-config requires is a comma separated listPavel Březina2014-07-091-2/+1
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_sifp: add shortcuts for common use casesPavel Březina2014-05-293-0/+238
| | | | | | https://fedorahosted.org/sssd/ticket/2254 Reviewed-by: Sumit Bose <sbose@redhat.com>
* sss_sifp: add support for string dictionaryPavel Březina2014-05-296-7/+241
| | | | | | https://fedorahosted.org/sssd/ticket/2254 Reviewed-by: Sumit Bose <sbose@redhat.com>
* sss_sifp: buildPavel Březina2014-05-292-0/+1550
| | | | | | https://fedorahosted.org/sssd/ticket/2254 Reviewed-by: Sumit Bose <sbose@redhat.com>
* sss_sifp: implement APIPavel Březina2014-05-296-0/+1656
| | | | | | https://fedorahosted.org/sssd/ticket/2254 Reviewed-by: Sumit Bose <sbose@redhat.com>
* sss_sifp: introduce APIPavel Březina2014-05-293-0/+637
| | | | | | https://fedorahosted.org/sssd/ticket/2254 Reviewed-by: Sumit Bose <sbose@redhat.com>
* IDMAP: add sss_idmap_check_collision(_ex)Sumit Bose2014-02-262-37/+151
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* DOC: Fix names of arguments in doxygen commentsLukas Slebodnik2014-02-171-1/+1
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Update CIFS plugin for Well-Known SID supportSumit Bose2013-11-151-16/+0
|
* free idmapped binary SIDs correctlyPavel Březina2013-11-071-1/+1
| | | | | Resolves: https://fedorahosted.org/sssd/ticket/2133
* idmap: add API to free allocated SIDsPavel Březina2013-11-072-0/+84
|
* idmap: add sss_idmap_domain_by_name_has_algorithmic_mapping()Sumit Bose2013-10-252-4/+73
|
* idmap: allow ranges with external mapping to overlapSumit Bose2013-10-171-5/+7
| | | | | | | | | | | If POSIX IDs are managed externally e.g. by AD it might be possible that the IDs are centrally manages for the whole forest. Hence there might not be a single ID range for each member domain in the forest but only a single ID range for the whole forest. This means that we have to allow collisions if ID ranges in this case. Unit tests are added to make sure that the collisions are only allowed for external mappings.
* idmap: fix a memory leak if a collision is detectedSumit Bose2013-10-171-6/+7
|
* idmap: add internal function to free a domain structSumit Bose2013-10-171-4/+15
|
* Add CIFS idmap pluginBenjamin Franzke2013-10-151-0/+340
| | | | https://fedorahosted.org/sssd/ticket/1534
* Include sys/types.h for types id_t and uid_tLukas Slebodnik2013-09-031-0/+1
|
* UTIL: Create new wraper header file sss_endian.hLukas Slebodnik2013-08-281-0/+1
| | | | | | Some platform have header file endian.h and anothers have sys/endian.h. We nedd to use conditional build to handle it correctly, therefore new header file sss_endian.h was created.
* idmap: add sss_idmap_domain_has_algorithmic_mappingSumit Bose2013-06-282-0/+55
| | | | | | | | | | With this call it can be checked if for a given domain algorithmic mapping is available or if the ID must be read from an external source. The default if an error occurs or no matching range was found is false, i.e external mapping, to meet the requirements for simple LDAP based domains where only external mapping is available. Fixes https://fedorahosted.org/sssd/ticket/1960
* idmap: add calls to check if ID mapping conforms to rangesSumit Bose2013-06-282-0/+186
| | | | | | | When ID are mapped externally it must be checked if the extern ID falls into the right configured range to avoid ID conflicts. Fixes https://fedorahosted.org/sssd/ticket/1960
* idmap: allow NULL domain sid for external mappingsSumit Bose2013-06-281-32/+44
| | | | | | | | | | Since it is planned that the LDAP based ID providers (LDAP, AD, IPA) will always use libsss_idmap to map ID or get information about how to map it, it must be possible to add domains to libsss_idmap which do not have a SID or where is SID is not known when external mapping is used. Algorithmic mapping always requires a domain SID. Fixes https://fedorahosted.org/sssd/ticket/1960
* idmap: add option to indicate external_mappingSumit Bose2013-06-282-4/+43
| | | | | | | | | | The idea is that ranges for IDs from AD can be used in libsss_idmap as well, but whenever a mapping is requested for this range a specific error code IDMAP_EXTERNAL is returned to tell SSSD to do an AD lookup. This way SSSD does not need to inspect the ranges itself but all is done inside if libsss_idmap. Fixes https://fedorahosted.org/sssd/ticket/1960
* idmap: add optional unique range idSumit Bose2013-06-282-1/+17
| | | | | | | | To be able to detect configuration changes in idranges managed by FreeIPA an identifier should be stored on the client together with the other idrange related data. Fixes https://fedorahosted.org/sssd/ticket/1979
* idmap: allow first RID to be setSumit Bose2013-06-282-20/+109
| | | | | | | | | | | | Currently libss_idmap implicitly assumes that the RID 0 is always mapped to the first ID of the given range. This is not the case anymore when multiple ranges are used e.g. for trusted domains in FreeIPA. A new call sss_idmap_add_domain_ex() was added which can take the first RID as an argument. This new call will get more options with other patches hence I didn't change the library version with this patch. Fixes https://fedorahosted.org/sssd/ticket/1938
* Fix some doxygen warningsSumit Bose2013-06-111-3/+3
|
* IDMAP: Fix variable initializationOndrej Kos2013-05-031-1/+1
| | | | | Before the recent changes, the variable was set to 0 too because it used to be part of a structure allocated with talloc_zero.
* libsss_idmap: function to calculate rangeMichal Zidek2013-04-293-1/+287
| | | | | | | | Calculation of range for domains is moved from sdap_idmap code to sss_idmap code. Some refactoring have been done to allow this move. https://fedorahosted.org/sssd/ticket/1844
* Fix potential out-of-bounds write in sss_idmap_sid_to_dom_sidJakub Hrozek2013-04-031-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1861
* Updated Doxygen configuration to 1.8.1Thorsten Scherf2013-03-061-134/+478
| | | | https://fedorahosted.org/sssd/ticket/1819
* IDMAP: add sss_idmap_smb_sid_to_unix()Sumit Bose2013-01-082-0/+39
| | | | | To avoid a conversion on the caller side a new call is added to libsss_idmap which converts a Samba dom_sid structure to a Posix ID.
* Dereference after null check in sss_idmap_sid_to_unixMichal Zidek2012-12-041-1/+5
| | | | https://fedorahosted.org/sssd/ticket/1684
* idmap: Silence DEBUG messages when dealing with built-in SIDs.Michal Zidek2012-11-282-1/+17
| | | | | | | | When converting built-in SID to unix GID/UID a confusing debug message about the failed conversion was printed. This patch special cases these built-in objects. https://fedorahosted.org/sssd/ticket/1593
* sss_idmap: fix typo which prevents sub auth larger then 2^31Sumit Bose2012-06-081-3/+3
| | | | A test to cover this is added as well.
* sss_idmap: add support for samba struct dom_sidSumit Bose2012-06-083-0/+305
| | | | | | | | The samba ndr libraries use struct dom_sid to handle SIDs. Since there is no public samba library which offers conversion from other representations, e.g. as string, this is added to libsss_idmap. To avoid compile-time or run-time dependency to any samba library or header file the definition of the struct is copied here.
* Rename struct dom_sid to struct sss_dom_sidSumit Bose2012-05-143-23/+23
| | | | | To avoid conflicts with struct dom_sid used by samba the sss_ prefix is added to the struct used by libsss_idmap.
* Fix endian issue in SID conversionSumit Bose2012-05-041-9/+13
| | | | | | Since the byte-order is only important when dealing with the binary SID the sub-auth values are stored in host order and are only converted while reading or writing the binary SID.
* LDAP: Add routine to extract domain SID from an object SIDStephen Gallagher2012-05-032-2/+3
| | | | Also makes the domain prefix macros from sss_idmap public.
* Allow different SID representations in libidmapSumit Bose2012-05-014-13/+719
| | | | | | Besides as strings it is now possible to use binary SIDs or a struct containing all SID information. Functions to convert between these formats are added as well.
* Use HTML_TIMESTAMP instead of HTML_FOOTER_DESCRIPTIONJakub Hrozek2012-04-051-3/+4
| | | | https://fedorahosted.org/sssd/ticket/1271
* Add idmap librarySumit Bose2012-03-264-0/+2123