summaryrefslogtreecommitdiff
path: root/server/confdb/confdb.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-20Make the LOCAL provider always use MagicPrivateGroupsStephen Gallagher1-1/+2
Also updates the manpage for sssd.conf to denote this
2009-08-18fix return value of confdb_get_domainsSumit Bose1-0/+1
If the last configured domain is broken confdb_get_domains returns the return value of confdb_get_domain even if there are valid domains available.
2009-06-19Fix segfault in update_monitor_configStephen Gallagher1-0/+4
We were stealing the memory context of only the first value in the linked-list of domains (and also services). This patch adds a memory context to hold the lists so that can be stolen along with all of the entries.
2009-06-08Treat a missing provider entry as a config errorStephen Gallagher1-2/+7
2009-06-01Suppress "rootdse" error messages from the confdbStephen Gallagher1-3/+4
2009-05-28Suppress "rootdse" error messages.Stephen Gallagher1-0/+6
We will trap all LDB debug messages and pipe them into our internal DEBUG() function. LDB FATAL messages will still be printed by default, WARNING and TRACE functions will be at debug level 3 and 9, respectively.
2009-05-26Silence warningsSimo Sorce1-2/+2
2009-05-12Fix warnings in monitor.c and confdb.cStephen Gallagher1-1/+1
2009-05-11Separate confdb API from confdb setupStephen Gallagher1-348/+3
Refactoring the confdb so that the setup code can be linked separately from the access API. This is being done so that our plugins do not need to link against the collection and ini_config libraries.
2009-05-04Fixes for porting SSSD to Debian-based platformsStephen Gallagher1-1/+0
2009-04-16Avoid unnecessary reloads of config.ldbSimo Sorce1-4/+37
Add code to check if the file has changed since the last update was performed. Avoid dumping and reloading the config ldb if the modification time of the configuration file has not changed at all.
2009-04-14Add common function to retrieve comma sep. listsSimo Sorce1-45/+158
Also convert all places where we were using custom code to parse config arguments. And fix a copy&paste error in nss_get_config
2009-04-13Always pass full domain infoSimo Sorce1-73/+107
Change sysdb to always passwd sss_domain_info, not just the domain name. This way domain specific options can always be honored at the db level.
2009-04-13Allow configuration of the SSSD through /etc/sssd/sssd.confStephen Gallagher1-58/+256
The SSSD now links with the ini_config and collection libraries in the common directory. The monitor will track changes to the /etc/sssd/sssd.conf file using inotify on platforms that support it, or polled every 5 seconds on platforms that do not. At startup or modification of the conf file, the monitor will purge the existing confdb and reread it completely from the conf file, to ensure that there are no lingering entries. It does this in a transaction, so there should be no race condition with the client services. A new option has been added to the startup options for the SSSD. It is now possible to specify an alternate config file with the -c <file> at the command line.
2009-04-08Change the way we retrieve domainsSimo Sorce1-72/+72
To be able to correctly filter out duplicate names when multiple non-fully qualified domains are in use we need to be able to specify the domains order. This is now accomplished by the configuration paramets 'domains' in the config/domains entry. 'domains' is a comma separated list of domain names. This paramter allows also to have disbaled domains in the configuration without requiring to completely delete them. The domains list is now kept in a linked list of sss_domain_info objects. The first domain is also the "default" domain.
2009-03-30fixed two issues in the initial configurationSumit Bose1-1/+1
- value array is not terminated properly - infopipe service is added dynamically
2009-03-20Simplify default configurationSimo Sorce1-111/+35
Make confdb load a base ldif like sysdb to initialize the db, makes it simpler to understand at first sight what is the default configuration. Make the parameter "command" optional. Derive the default command from available information. Make the debug level a global by default so that enabling debug for all components is as easy as passing just -d X to the sssd binary.
2009-03-20Add better error reporting to confdb functionsSimo Sorce1-29/+63
2009-03-20Avoid nested events in confdbSimo Sorce1-1/+15
2009-03-18Enable MPGs and user/group enumeration on the LOCAL domain by defaultStephen Gallagher1-3/+5
2009-03-09use fixed paths to sockets to make sure clients and server are using the sameSumit Bose1-0/+4
2009-03-09Make MPG a configurable option for the domain.Simo Sorce1-0/+11
2009-03-08Use LOCAL for the default domain in confdb_init_dbStephen Gallagher1-0/+4
2009-03-06added PAM default configuration to confdb_init_dbSumit Bose1-6/+35
set default value of enumerate in LOCAL domain to 1 added checks to talloc_asprintf return values fixed InfoPipe defaults
2009-03-04Add internal min/max/next id management fucntionsSimo Sorce1-1/+43
Retrieve minID and maxID from domain configuration so that lower and upper bounds can be set per domain. Add function that keeps track of the next available id, increments and returns it on requests, avoiding collisions with existing ids.
2009-03-02Implement GetUserAttributes in the InfoPipeStephen Gallagher1-2/+2
This patch adds support for requesting user data in the sysdb via the InfoPipe. It currently has support for reading defined entries of integral, floating-point or string types. Tasks remaining: 1) Implement call to the provider when cache is out of date 2) Support byte arrays for userpic and similar I modified sysdb_search_ctx in sysdb_search.c to accept an array of attributes to pass into the LDB search. I also made one additional related fix: the btreemap now sorts in the correct order. Previously I had accidentally transposed the two values for sorting, so the map would always have been in exact reverse order.
2009-02-28Fix confdb issues.Simo Sorce1-91/+52
Avoid uninitialized memory messages in valgrind (in _btreemap_get_keys). Do not free memory we just stored in the btree (in confdb_get_domains_list). Streamline confdb_get_domains() and remove extra calls when we already have all the information handy. Do not store basedn in domain info, the base dn is always calculated out of the domain name. Remove the "provider" attribute, it was really used only to distinguish between LOCAL and other domains, directly check for LOCAL as a special case instead.
2009-02-27Refactor creation of domain_map into confdbStephen Gallagher1-20/+117
The NSS provider, the Data Provider backends and the InfoPipe all need access to the domain map provided by the confdb. Instead of reimplimenting it in multiple places, it is now provided in a pair of helper functions from the confdb. confdb_get_domains() returns a domain map by reference. Always returns the most up-to-date set of domains from the confdb. confdb_get_domains_list() returns an array of strings of all the domain names. Always returns the most up-to-date set of domains from the confdb. This patch also modifies the btreemap_get_keys() function to better handle memory and report allocation failures.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce1-4/+1
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-24Spec file patch Take 2:Stephen Gallagher1-0/+4
Adding support for generating RPMS for sssd. Fixing TDB autoconf macros to require version 1.1.3 and support for the tdb_repack symbol (required by LDB) Updating tdb.h to #include <sys/stat.h> for proper autoconf Build system modifications to simplify RPM generation Fixing RPM build system as recommended during code review Minor tweaks to Makefile and sssd.spec Make policykit and infopipe configurable Soname and symlinks
2009-02-20Add helper function to get booleans from confdbSimo Sorce1-9/+42
2009-02-20Completely rework the nss interface to be able to use 2Simo Sorce1-15/+0
types of domains: modern and legacy modern uses member/meberof, legacy uses memberUid for group memberships. Rework the proxy backend to use the legacy style as that's the format the data comes in (trying to convert would require too many transformations and increased the number of queries). Add support for fetching groups in nss. Add support for enumerating users and groups (requires to enable enumeration in config) both in nss and in the proxy provider. Remove confdb_get_domain_basedn() and substitute with generic calls in the nss init function. Store a domain structure in the btree not the basedn so that we can add enumeration flags. Also make sure NSS understand how to make multiple calls on enumerations, also make passing the domian parameter always mandatory, passing in domain=* is not valid anymore. This work fixes also a few memory, degfault, and logic bugs found while testing all nss functions (there are still some to fix that are less critical and much harder to find yet).
2009-02-13Always pass teh database path explicitly, so that test cases can useSimo Sorce1-12/+3
throw away databases Check version and init main db if empty
2009-01-27Add skeleton for PolicyKit back-endStephen Gallagher1-0/+16
2009-01-27Add skeleton for InfoPipe serviceStephen Gallagher1-3/+15
2009-01-27Automatically generate the config.ldb if it doesn't exist (i.e. First startup)Stephen Gallagher1-6/+83
2009-01-09Fix a bug in confdb_get_string where attempting to return a default string ↵Stephen Gallagher1-1/+11
of NULL would erroneously report ENOMEM.
2008-11-24Replacing hard-coded paths with configure script substitutions.Stephen Gallagher1-2/+13
Changing the default SBUS locations to be configure script parameters
2008-11-07Store all domains served by the SSSD to a binary-tree map for fast NSS lookup.Stephen Gallagher1-3/+90
Changed the "section" feature of confdb.c to use '/' as a delimiter instead of '.', because this conflicted with the ability to use dots in domain names.
2008-11-04Add some more service functionsSimo Sorce1-0/+42
2008-11-03Add support for dbus comunication in the nss serviceSimo Sorce1-0/+34
Add utility function in confdb Make all component fetch the dbus socket from the confdb
2008-10-20Add configuration database functions.Simo Sorce1-0/+372
Convert nss responder to use the confdb