summaryrefslogtreecommitdiffstats
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* cmocka-unit-test-for-functions-getpwuid*-addedPallavi Jha2014-04-031-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* BUILD: Enable additional compiler warningsLukas Slebodnik2014-03-141-2/+2
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sbus_tests: Add some testing of dispatch and handler codeStef Walter2014-03-141-0/+11
| | | | | | | | | | | | | This starts a DBus server with some handlers, and runs some method calls against it. Note that we don't use the codegen in the sbus_tests, as we sorta want to test this non-codegen related functionality on its own before we run the sbus_codegen_tests. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sbus: Add struct sbus_request to represent a DBus invocationStef Walter2014-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct sbus_request represents a request from a dbus client being handled by a dbus server implementation. The struct contains the message, connection and method (and in the future teh property) which is being requested. In the future it will contain caller information as well. sbus_request is a talloc memory context, and is a good place to attach any allocations and memory specific to the request. Each handler accepts an sbus_request. If a handler returns EOK, it is assumed that the handler will finish the request. Any of the sbus_request_*finish() methods can be used to complete the request and send back a reply. sbus_request_return_and_finish() uses the same argument varargs syntax as dbus_message_append_args(), which isn't a great syntax. Document it a bit, but don't try to redesign: The marshalling work (will follow this patch set) will remove the need to use varargs for most DBus implementation code. This patch migrates the monitor and data provider dbus code to use sbus_request, but does not try to rework the talloc context's to use it. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Makefile: Add missing library to the dp_opt_testsLukas Slebodnik2014-03-101-0/+1
| | | | | | | | | | | | dp_opt_tests cannot be linked properly if link_all_deplibs is disabled (debian) /usr/bin/ld: src/tests/cmocka/dp_opt_tests-test_dp_opts.o: undefined reference to symbol 'poptFreeContext@@LIBPOPT_0' /usr/bin/ld: note: 'poptFreeContext@@LIBPOPT_0' is defined in DSO /lib64/libpopt.so.0 so try adding it to the linker command line /lib64/libpopt.so.0: could not read symbols: Invalid operation Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Unit-test-for-negcache-module-addedPallavi Jha2014-03-051-0/+17
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* config API: prepend source dir search path for testsSumit Bose2014-03-021-0/+2
| | | | | | | | | | | Instead of appending the search patch in the source directory should be prepended. Otherwise the test might find files installed in the default paths of the system first. As a result the compiled python files in the build directory must be remove in the clean target to make 'make distcheck' pass. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* config API: read only specific files from schemaplugindirSumit Bose2014-03-021-1/+2
| | | | | | | | | | | | | | | Currently the config API read any file in the schema plugin dir, typically /usr/share/sssd/sssd.api.d. If there are any unexpected files, like e.g. editor copies or backups, the python code might break because it cannot parse the files. With this patch only files matching the pattern '^sssd-.*\.conf$' are read from this directory. Additionally this patch contains a file which will break the config API self test if it is not filtered out correctly. Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
* SUDO: AD providerSumit Bose2014-03-021-0/+5
| | | | | | | | | | | | | | This patch adds the sudo target to the AD provider. The main reason is to cover different default settings in the LDAP and AD provider. E.g. the default for ldap_id_mapping is True in the AD provider and False in the LDAP provider. If ldap_id_mapping was not set explicitly in the config file both components worked with different setting. Fixes https://fedorahosted.org/sssd/ticket/2256 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* libsss_idmap: bump version-infoSumit Bose2014-02-261-1/+1
| | | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* DP: Provide separate dp_copy_defaults functionJakub Hrozek2014-02-261-0/+12
| | | | | | https://fedorahosted.org/sssd/ticket/2257 Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* IPA: refactor idmap code and add testSumit Bose2014-02-261-0/+15
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sbus: Rework sbus to use interface metadata and vtablesStef Walter2014-02-241-5/+25
| | | | | | | | | | | | | | | | | | | | Previous commits added support for interface metadata and handler vtables. This commit ports sbus_dbus_connection to use them. Port the internal uses of dbus to use the new scheme in a very minimal way. Further cleanup is possible here. This commit provides basic definitions of the internal dbus interfaces. The interfaces aren't fully defined, as the handlers will continue to unpack manually, and often overload DBus methods with different arguments (which is rather unorthodox, but not the end of the world). Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* sbus: Add sbus_vtable and update codegen to support itStef Walter2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each interface is a vtable structure derived from sbus_vtable, in the sense that it has an sbus_vtable struct as its first argument. This lets us upcast the interface vtable structure to an sbus_vtable and dispatch to it dynamically and cleanly. The interface metadata contains information about which vtable offset in the interface metadata should be dispatched to for a given function. This is a common scheme, not only among dbus implementations, but also compiled languages. Currently all the vtable functions are of type sbus_msg_handler_fn. These are the handlers we are familiar with and perform raw processing of the message. Later commits will introduce type safe handlers that levelage compile checking and automatic argument packing/unpacking. Although this may seem contrived now, the remainder of the dbus infrastructure work will build on this, including ofd.Properties, ofd.ObjectManager, ofd.Introspect, compiler checked type safe unpacking/packing, etc. The codegen now generates vtable structures for each interface along-side the metadata, and fills in vtable offsets appropriately. It is obviously still possible to hand-craft such vtables and metadata if needed for a special case. Once again examples output can be found at: src/tests/sbus_codegen_tests_generated.h Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* sbus: Add meta data structures and code generatorStef Walter2014-02-241-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These metadata structures hold the information about all the details of a DBus interface. They are typically generated from the canonical XML form of the DBus interface, although they may also be hand crafted. Add some handy functions for looking up methods, props, signals, in the metadata of an interface. Currently lookups are just done by looking through an array. If performance becomes an issue (ie: very large interfaces) it would be really easy to sort things and use bsearch(). Later commits will include some definitions using this metadata and related functions. DBus interfaces are defined here: http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format The introspection data format has become the standard way to represent a DBus interface. For many examples see /usr/share/dbus-1/interfaces/ on a typical linux machine. A word about annotations. These are extra flags or values that can be assigned to anything. So far, the codegen supports this annotation: org.freedesktop.DBus.GLib.CSymbol - An annotation specified in the specification that tells us what C symbol to generate for a given interface or method. By default the codegen will build up a symbol name from the DBus name. It is possible to confuse the code generator into producing invalid C code (with strange method names, for example), but the C compiler catches such silliness right away. Add tests testing basic features of the codegen and poking through the metadata it creates. Also test the metadata lookup functions. Generated code is checked in for easy discovery. An example of the XML interface definitions can be found at: src/tests/sbus_codegen_tests.xml And an example of the generated header can be found here: src/tests/sbus_codegen_tests_generated.h Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Use KRB5_CFLAGS where appropriateAlexey Shabalin2014-02-191-2/+10
| | | | | | | | | | There are cases when MIT Kerberos is installed with includes in a subdirectory of /usr/include (or /usr/local/include). In such case we have to properly use KRB5_CFLAGS to reach them. https://fedorahosted.org/sssd/ticket/2226 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* BUILD: Simplify enabling journald on installed systemsStephen Gallagher2014-02-191-0/+9
| | | | | | | | | | | systemd supports overrides of the standard service file to be placed in /etc/systemd/system/<service>.service.d/ With this patch, we will install a commented-out override file to /etc that will instruct the user on how to enable logging to journald. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* tests: nested groups unit testPavel Březina2014-02-181-0/+14
| | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2024 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: prepare makefile for provider related unit testsPavel Březina2014-02-181-0/+11
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: mock sysdb users and groupsPavel Březina2014-02-181-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: mock SDAPPavel Březina2014-02-181-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ldap: move domain related content from ldap_common.c to sdap_domain.cPavel Březina2014-02-181-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ldap: move options related content from ldap_common.c to ldap_options.cPavel Březina2014-02-181-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sdap: move non async functions from sdap_async.c to sdap_utils.cPavel Březina2014-02-181-0/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* IPA: explicitly link libsss_ipa with selinux libraryLukas Slebodnik2014-02-171-0/+1
| | | | | | | | | | Function selinux_policy_root is used in the module ipa_selinux.c by macro selogin_path, but libsss_ipa.so was not linked with selinux library It was not problem because another libraries depens on selinux.so libsss_ipa.so -> libk5crypto.so -> libkrb5support.so -> libselinux.so We should not rely on dependencies of other libraries. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Makefile: Remove unused librariesLukas Slebodnik2014-02-121-5/+0
| | | | | ldap_child, krb5_child do not use any function from libsss_child, libtevent and openldap libraries
* util: A safe printf for user provided format stringsStef Walter2014-01-121-1/+15
| | | | | | | | | | | | | | | | | | Since the default printf(3) implementation cannot safely be used on user (or admin) provided input, this is a safe implementation. This will be used in later patches by the full_name_format option The implementation came from realmd, but only has libc dependencies. The number of fields is pre-defined, and safe printf fails if an invalid field is accessed. Only string fields are supported, and only flags relevant to string fields are supported. Width and precision work as expected, but precision cannot read from a field. Tests are included, and ported to the check based testing that sssd uses.
* cmocka unit test for authtok module addedPallavi Jha2014-01-091-0/+15
|
* Bump sss_idmap version to 3:0:3Pavel Březina2013-12-191-1/+1
| | | | New functions were added.
* AD: Add a utility function to create list of connectionsJakub Hrozek2013-12-191-0/+28
| | | | | | | | | | ad_id.c and ad_access.c used the same block of code. With the upcoming option to disable GC lookups, we should unify the code in a function to avoid breaking one of the code paths. The same applies for the LDAP connection to the trusted AD DC. Includes a unit test.
* SSSD: Unit test - sss_ldap_dn_in_search_basesPavel Reichl2013-11-291-1/+26
| | | | | | | Unit test testing detection of the right domain when processing group with members from several domains Resolves: https://fedorahosted.org/sssd/ticket/2132
* AUTOMAKE: Don't build libsss_test_common every timeLukas Slebodnik2013-11-281-2/+2
| | | | | | | | Although static library libsss_test_common was used only in tests, it was also built with command "make all" Resolves: https://fedorahosted.org/sssd/ticket/2097
* TESTS: Link libsss_test_common with teventLukas Slebodnik2013-11-181-1/+2
| | | | | Static library libsss_test_common calls tevent functions directly (in module common_tev.c), but it was not linked with tevent library.
* Add utility to handle Well-Known SIDsSumit Bose2013-11-151-1/+2
|
* Merge ipa_selinux_common.c and ipa_selinux.cJakub Hrozek2013-11-151-2/+0
| | | | | Moved unused functions and merged ipa_selinux_common.c into ipa_selinux.c
* BUILD: Use OPENLDAP_CFLAGS instead of LDAP_CFLAGSBenjamin Franzke2013-11-111-3/+3
| | | | | | | | LDAP_CFLAGS is never defined. OPENLDAP_CFLAGS is set by src/external/ldap.m4. This patch does: sed -i 's/$(LDAP_CFLAGS)/$(OPENLDAP_CFLAGS)/' Makefile.am
* BUILD: Explicitly link libsss_ad.so with sasl libsLukas Slebodnik2013-11-111-0/+2
| | | | | | If openldap is not built with sasl support libsss_ad.so will not be linked with libsasl2 although sasl_client_init is called by function ad_sasl_initialize.
* Replace prog_DEPENDENCIES with EXTRA_prog_DEPENDENCIESSumit Bose2013-11-111-6/+4
| | | | | | | Automake computes build dependencies of a program automatically but not if prog_DEPENDENCIES is set. In this case only the dependencies given by prog_DEPENDENCIES are used. If the automatically calculated dependencies should be augmented EXTRA_prog_DEPENDENCIES should be used.
* build: fix ordering of linker flagsJan Engelhardt2013-11-041-33/+36
| | | | | | Libraries MUST be specified in LDADD/LIBADD, not LDFLAGS, because LDFLAGS appear earlier in the command line and library order is significant.
* Makefile: Remove unused variable TEST_MOCK_OBJLukas Slebodnik2013-10-301-4/+0
|
* Makefile: Add missing librariesLukas Slebodnik2013-10-301-0/+4
| | | | | If sssd is compiled with disabled link_all_deplibs (debian) some test could not be properly linked. This patch add missing libraries
* AD: Add extended access filterJakub Hrozek2013-10-251-1/+28
| | | | | | | https://fedorahosted.org/sssd/ticket/2082 Adds a new option that allows the admin to specify a LDAP access filter that can be applied globally, per-domain or per-forest.
* idmap: add sss_idmap_domain_by_name_has_algorithmic_mapping()Sumit Bose2013-10-251-1/+1
|
* find_subdomain_by_sid: skip domains with missing domain_idSumit Bose2013-10-251-1/+11
|
* Add CIFS idmap pluginBenjamin Franzke2013-10-151-0/+21
| | | | https://fedorahosted.org/sssd/ticket/1534
* AD: async request to retrieve master domain infoJakub Hrozek2013-09-181-0/+3
| | | | Adds a reusable async request to download the master domain info.
* Add journald supportJakub Hrozek2013-09-181-0/+6
|
* util: add sss_idmap_talloc[_free]Pavel Březina2013-09-171-1/+3
| | | | Remove code duplication.
* util: Use systemd-login to check user sessionsSimo Sorce2013-09-161-5/+24
| | | | | | | | | | | | | Use systemd-lgin in preference to check if the user is logged in or not. Fall back to the old method if no systemd-login support is available at compile time or if it returns a fatal error, and can't determine the status of the user on its own. This will allow to consider a user really active (in order to reuse or refresh crdentials) only if it really is logged into the system, and not just if one of the user's processes is stuck around. Resolves: https://fedorahosted.org/sssd/ticket/2084
* Adding new header for printf formating macrosLukas Slebodnik2013-09-111-0/+1
|