summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-03-08Fix initialization problemsJakub Hrozek4-11/+12
Init tools ctx in groupadd before copying its value
2009-03-08Clients subpackageJakub Hrozek1-7/+23
2009-03-07sss_groupdel, delete by DN in sss_userdelJakub Hrozek5-74/+182
Don't convert username->uid in userdel, use DN
2009-03-07Fix race condition with initial sysdb creationStephen Gallagher1-0/+14
When the sysdb LDB file does not exist on the system, the first attempt to connect to it will invoke a creation routine. However, both the NSS and the InfoPipe are started in parallel by the monitor, resulting in a race condition as they both try to initialize the sysdb. The easiest fix for this is to simply have the monitor create the sysdb before it launches NSS and InfoPipe.
2009-03-06sss_groupaddJakub Hrozek4-1/+177
2009-03-06Implement DeleteGroup in InfoPipeStephen Gallagher2-2/+149
2009-03-06Implement CreateGroup in InfoPipeStephen Gallagher2-4/+193
Also fixed two minor bugs in CreateUser
2009-03-06Specfile changes related to package review, package initscript Call ldconfigJakub Hrozek5-9/+160
2009-03-06sss_userdelJakub Hrozek4-2/+237
Also install tools into /sbin, own them in specfile
2009-03-06Implement DeleteUser in the InfoPipeStephen Gallagher1-2/+166
2009-03-06Add sbus_reply_internal_error() feature to sbus_message_handler()Stephen Gallagher1-2/+14
If an SBUS function returns an error code, we'll immediately return an error reply to the client stating "Internal Error" instead of ignoring the request and forcing the client to wait for a timeout.
2009-03-06Add infp_req_init() function to simplify method setupStephen Gallagher3-64/+43
2009-03-06Implement CreateUser in InfoPipeStephen Gallagher5-9/+223
Changed the order of the arguments to CreateUser in the Introspection XML to match the other functions (domain belongs second on the list) A few other minor fixes as well: Fixed a typo in SYSDB_GETCACHED_FILTER and sysdb_transaction_end(). Added missing error handling in infp_do_user_set_uid().
2009-03-06Remove obsolete commentSimo Sorce1-3/+0
2009-03-06Add userspace tools to manipulate accounts.Simo Sorce6-1/+654
The first functional command is sss_useradd (Name is temporary, while looking for a better one)
2009-03-06added PAM default configuration to confdb_init_dbSumit Bose2-7/+36
set default value of enumerate in LOCAL domain to 1 added checks to talloc_asprintf return values fixed InfoPipe defaults
2009-03-06Fix reporting non-default users.Simo Sorce3-301/+318
We need to add the domain when users are not part of the default domain, otherwise name conflicts may happen.
2009-03-06minor fixes for the build processSumit Bose5-2/+17
enable --without-tests
2009-03-05Remove _PW_ and _GR_ from SYSDB_ definesSimo Sorce8-82/+78
Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
2009-03-05added sss_client to spec fileSumit Bose2-8/+29
2009-03-05Implement GetCachedUsers in the InfoPipeStephen Gallagher4-10/+205
This function allows a caller to retrieve a list of users who have logged in on the system, specifying an optional minimum last login time to trim the list. I modified sysdb_enumpwent to accept an optional search argument. GetCachedUsers takes advantage of this argument to limit the search by the last login time. I also found and fixed a few additional low-memory conditions around D-BUS message replies.
2009-03-05Add functions to add regular users and groupsSimo Sorce3-27/+445
Calulates next id automatically if uid/gid are not specified. Fixes to sysdb_get_next_available_id. Add tests to create users and groups through the new functions.
2009-03-05Adding support for SetUserUID to the InfoPipeStephen Gallagher4-7/+159
The InfoPipe interface Set_YouReallyDoNotWantToUseThisFunction_UserUID1 is now available. I also fixed a memory leak in SetUserAttributes and modified the prototype for infp_get_permissions to make it more clear that the first argument is the caller's username, not the username being checked for permission.
2009-03-05added password reset by rootSumit Bose2-9/+38
2009-03-05Fix sss_client install targetSimo Sorce1-4/+5
With this fix configure must be passed the right libdir argument depending on the platform you are building on. For example on Linux x86_64: ./configure --libdir=/lib64
2009-03-05added a privileged pipeSumit Bose8-15/+161
2009-03-04Add internal min/max/next id management fucntionsSimo Sorce5-15/+336
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-04Add enumeration backout period.Simo Sorce3-2/+39
If an enumeration has been requested recently enough, force the nss responder to read from the cache and not go out to each backend and do slow network operations. This greatly improves performances if enumerations are used often. Currently the balcout period is harcoded to 2 min, we will need to make it a configurable option.
2009-03-04Implement SetUserAttributes in the InfoPipeStephen Gallagher7-17/+573
SetUserAttributes is now available for use in the Infopipe. I also reorganized a few of the internal InfoPipe objects to reduce code duplication. One very simple test is included in this checkin to validate that the parser is working.
2009-03-04Add license file.Simo Sorce1-0/+674
2009-03-04Simplify some aspects of pam_LOCAL_domainSimo Sorce3-138/+87
Use only one context (the local request) for all functions. Use new helper function in sysdb to set numbers as sysdb_attrs values. Do not use pam_status to report internal errors, use an error variable and check it only when we finally reply. Use sysdb_error_to_errno() to convert and ldb error to errno. Do not free every single buffer allocated, they are all appended to the local request and will be automatically freed once the request is finished.
2009-03-04Improve sysdbSimo Sorce4-33/+87
Add comments in header files to better explain interfaces and intended usage. Expose function to convert from ldb errors to errnos. Add sysdb_attrs helper to add a long integer as a value.
2009-03-04Fixing memory leak in GetUserAttributesStephen Gallagher1-1/+2
2009-03-03replaced pure ldb calls with sysdb callsSumit Bose3-120/+309
2009-03-03Provide sysdb_set_user_attr() functions.Simo Sorce5-4/+157
Provide also helper functions to build struct sysdb_attrs. Also fix sysdb_get_user_attr() to have a consistent interface as all other functions.
2009-03-02Unify pwd_search and user_searchSimo Sorce1-35/+11
2009-03-02Do not steal memory in btreemaps.Simo Sorce2-43/+24
Just make sure that the memory passed in is either static or allocated on the same memory context that is parent of the btreemap.
2009-03-02Support byte arrays in InfoPipe GetUserAttributesStephen Gallagher1-27/+80
We now have support for reading binary blobs such as userpic from the sysdb and returning it to an InfoPipe consumer as a byte array. I also cleaned up some code in create_getattr_result_map to make it easier to read.
2009-03-02Make tests configurableJakub Hrozek4-5/+26
2009-03-02Implement GetUserAttributes in the InfoPipeStephen Gallagher14-58/+912
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-03-02Create and own /var/lib/sss, memberof.so packagingJakub Hrozek3-9/+18
Own everything in /usr/libexec/sssd in specfile, no nss_client subdir Place memberof.so in /usr/lib/ldb
2009-03-02first version of LOCAL pam backendSumit Bose12-6/+795
2009-02-28Adapt test to changes to the interface.Simo Sorce1-169/+326
Only legacy functions are fully tested now. TODO: add new tests for non-legacy backend operations.
2009-02-28Expose some more functions needed by the testsSimo Sorce3-1/+114
2009-02-28Convert sync calls in sysdb to async, transaction dependent, calls.Simo Sorce9-1313/+1652
2009-02-28Merge branch 'master' of git+ssh://simo@git.fedorahosted.org/git/sssdSimo Sorce0-0/+0
2009-02-28Fix confdb issues.Simo Sorce5-110/+67
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-28Fix confdb issues. Avoid uninitialized memory messages in valgrind (in ↵Simo Sorce5-110/+67
_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 Gallagher9-200/+211
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-26Serialize access to sysdb and also exposes ldb transactions.Simo Sorce9-780/+1063
This is necessary because in ldb only 1 transaction per context is possible and all operations (or new transactions) are nested within it. Will revisit this later when ldb will addresses the problem.