summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* certmap: Suppress warning Wmissing-bracesLukas Slebodnik2017-09-061-1/+7
| | | | | | | | | | | | | | | | | | | | Older version of gcc(e.g. gcc-4.8.5-11.el7) had a false positive warning with c99 struct initialisation "{ 0 }". https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64709 CC src/lib/certmap/libsss_certmap_la-sss_cert_content_nss.lo src/lib/certmap/sss_cert_content_nss.c: In function 'add_pkinit_princ_to_san_list': src/lib/certmap/sss_cert_content_nss.c:475:12: error: missing braces around initializer [-Werror=missing-braces] struct kerberos_principal_name kname = { 0 }; ^ src/lib/certmap/sss_cert_content_nss.c:475:12: error: (near initialization for 'kname.realm') [-Werror=missing-braces] Reviewed-by: Sumit Bose <sbose@redhat.com>
* certmap: add OpenSSL implementationSumit Bose2017-09-056-219/+1064
| | | | | | | | | | The OpenSSL 1.1 API is used but there is a short macro block which should added the needed compatibility if and older OpenSSL version is used. Related to https://pagure.io/SSSD/sssd/issue/3050 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Moving headers used by both server and client to special folderAmitKumar2017-08-031-1/+1
| | | | | | | | | | | | | | | | | | | These are the header files which are used by both client and server: src/util/io.h src/util/murmurhash3.h src/util/util_safealign.h This patch is about moving these header files to special folder (src/shared). It will be easier to identify these headers when looking for them in the src tree. util_safalign.h is renamed as safalign.h because util_ namespace is appropriate when this file belonged to the util's folder which is no longer the case. Resolves: https://pagure.io/SSSD/sssd/issue/1898 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* idmap_error_string: add missing descriptionsSumit Bose2017-07-242-1/+21
| | | | | | | | | Related to https://pagure.io/SSSD/sssd/issue/1960 Related to https://pagure.io/SSSD/sssd/issue/1938 Related to https://pagure.io/SSSD/sssd/issue/1844 Related to https://pagure.io/SSSD/sssd/issue/1593 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* certmap: Remove unnecessary included filesLukas Slebodnik2017-06-083-7/+7
| | | | | | | Patch also replace util.h on place where it was not needed directly and directly include required header files. Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* UTIL: Remove ctype.h from util/util.hLukas Slebodnik2017-06-082-0/+6
| | | | | | | | ctype.h is not used directly by util/util.h. The header file ctype.h must be included in 32 files and after removing it from util.h it had to be added only to 8 missing files Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* sss_sifp: update method namesSumit Bose2017-04-101-2/+2
| | | | | | Related to https://pagure.io/SSSD/sssd/issue/3292 Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* certmap: add placeholder for OpenSSL implementationSumit Bose2017-03-232-3/+37
| | | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* certmap: add new library libsss_certmapSumit Bose2017-03-2310-0/+3408
| | | | | | | | | | | | | | | | With this library it would be possible to map certificates and users not only by adding the full certificate to the user's LDAP object but by adding e.g. only parts like the issuer and subject name. Additionally the library is also able to flexible select/match certificates based on values in the certificate. Details about mapping and matching rules can be found in the included man page. Related to https://pagure.io/SSSD/sssd/issue/3050 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Use pagure links as a reference to upstreamLukas Slebodnik2017-02-283-3/+3
| | | | Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* SIFP: Fix warning format-securityLukas Slebodnik2016-12-011-1/+1
| | | | | | | | | | | | | dbus-1.11.8 added attributes for format string check to few functions in public header files. And therefore there is a warning. src/lib/sifp/sss_sifp_utils.c: In function ‘sss_sifp_set_io_error’: src/lib/sifp/sss_sifp_utils.c:44:5: error: format not a string literal and no format arguments [-Werror=format-security] dbus_set_error(ctx->io_error, error->name, error->message); ^~~~~~~~~~~~~~ Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* TESTS: Check new line at end of fileLukas Slebodnik2016-11-231-1/+1
| | | | Reviewed-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
* Remove double semicolon at the end of lineLukas Slebodnik2016-09-212-2/+2
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* sifp: fix coverity warningPavel Březina2016-08-161-1/+6
| | | | | | | | | sssd-1.14.1/src/lib/sifp/sss_sifp_dbus.c:51: check_return: Calling "dbus_message_append_args_valist" without checking return value (as is done elsewhere 4 out of 5 times). Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ipa_hbac: Fix documentation for hbac_enable_debugLukas Slebodnik2016-07-121-2/+2
| | | | | | src/lib/ipa_hbac/ipa_hbac.h:68: warning: expected whitespace after [ command Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* doxygen: Fix path to header file ipa_hbac.hLukas Slebodnik2016-07-121-1/+1
| | | | | | | | Warning: tag INPUT: input source `src/providers/ipa/ipa_hbac.h' does not exist warning: source src/providers/ipa/ipa_hbac.h is not a readable file or directory... skipping. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* DOC: Fix few typos in doxygen commentsLukas Slebodnik2016-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | src/confdb/confdb.h:572: warning: argument 'memctx' of command @param is not found in the argument list of confdb_get_sub_sections(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *section, char ***sections, int *num_sections) src/confdb/confdb.h:592: warning: The following parameters of confdb_get_sub_sections(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *section, char ***sections, int *num_sections) are not documented: src/lib/idmap/sss_idmap.h:315: warning: argument 's_cv' of command @param is not found in the argument list of sss_idmap_add_auto_domain_ex(struct sss_idmap_ctx *ctx, const char *domain_name, const char *domain_sid, struct sss_idmap_range *range, const char *range_id, uint32_t rid, bool external_mapping, idmap_store_cb cb, void *pvt) src/lib/idmap/sss_idmap.h:94: warning: The following parameters of sss_idmap_add_auto_domain_ex(struct sss_idmap_ctx *ctx, const char *domain_name, const char *domain_sid, struct sss_idmap_range *range, const char *range_id, uint32_t rid, bool external_mapping, idmap_store_cb cb, void *pvt) are not documented: Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_sifp: return context even on IO errorPavel Březina2016-06-271-1/+2
| | | | | | So the caller is able to get error description. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_sifp: make it compatible with latest version of the infopipePavel Březina2016-06-278-70/+230
| | | | | | | | | | Current version of infopipe leverage different interfaces and object paths which were not accessible through the simple ifp library. This patch changes the API, which is ok since it was never declared as a public library and beside deprecated openlmi there are no known users. We will use this in sssctl tool. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Add winbind idmap pluginSumit Bose2016-06-213-0/+330
| | | | | | | | With this plugin winbind can use the same id-mapping as SSSD which makes it possible to run both together in a consistent way. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* libipa_hbac: Move the library to src/lib/ipa_hbacJakub Hrozek2016-03-125-0/+2778
| | | | | | | | | | | Moving the library to the lib directory will force maintainers to think twice about changes, because it would be obvious this is a library. Also don't use includes from sssd source tree paths, but add the util path to Makefile's CFLAGS so that other projects can copy the hbac_evaluator.c file verbatim. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* IDMAP: Make parameter names more descriptivePavel Reichl2016-03-021-6/+6
| | | | | | | | | | | Domain SID (not name) is part of identification string for helper range in generate_sec_slice_name(). Use more generic name for range identifier when calculating range for new slice in sss_idmap_calculate_range(). Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* IDMAP: Add minor performance improvementsPavel Reichl2016-03-011-11/+84
| | | | | | | | Some ID ranges are precalculated when ID mapping is being initialized. This patch utilizes these (helper) ranges when new domains are generated if appropriate. Reviewed-by: Sumit Bose <sbose@redhat.com>
* IDMAP: Fix minor memory leakPavel Reichl2016-01-281-3/+11
| | | | Reviewed-by: Michal Židek <mzidek@redhat.com>
* IDMAP: Add support for automatic adding of rangesPavel Reichl2016-01-204-48/+557
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2188 Reviewed-by: Sumit Bose <sbose@redhat.com>
* IDMAP: New structure for domain range paramsPavel Reichl2016-01-201-57/+60
| | | | | | | | | | | Create new internal structure idmap_range_params by merging ID mapping range relevant fields from idmap_domain_info and remove corrsponding fields. Resolves: https://fedorahosted.org/sssd/ticket/2188 Reviewed-by: Sumit Bose <sbose@redhat.com>
* IDMAP: Fix computing max id for slice rangePavel Reichl2016-01-201-3/+3
| | | | | | | | | Max value of id mapping range was 1 unit too high. Resolves: https://fedorahosted.org/sssd/ticket/2922 Reviewed-by: Sumit Bose <sbose@redhat.com>
* 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