summaryrefslogtreecommitdiff
path: root/server/responder/nss/nsssrv_cmd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-27Make nsssrv use the common responder functionsSimo Sorce1-175/+167
Make nss_ctx a private pointer of the common resp_ctx Use sss_process_init and remove all duplicate functions from nsssrv.c
2009-03-27Fix uninitailized pointer and cut&paste errorSimo Sorce1-1/+5
The structure we copy the domain pointerr on is not zero when allocated. We need to zero it ourselves or we get segfaults later on. A cut&paste error caused us to call the wrong getpw function.
2009-03-20Retrieve some options from confdbSimo Sorce1-4/+6
This fixes some old 'Fixme's :)
2009-03-18Fix getgrent and getpwent callsSimo Sorce1-2/+6
When I converted from using just the domain name to passing down the info structure I goofed how to test if we were willing to attach the local domain to the user/group names or not.
2009-03-13Implement Negative cache for NSSSimo Sorce1-3/+256
As for positive caches, negative caches are implement for all queries except enumerations. Also set the correct requires in sssd.spec as we now depend directly on tdb as well.
2009-03-10Fix returning user with missing optional attributes.Simo Sorce1-5/+8
Gecos, homedir and shell are optional, fix the responder not to refuse to return the user completely if they are missing, replace an empty homedir with "/". Also fix fullname vs gecos, and always return gecos for NSS data. On user creation set gecos to the same value as the user Full Name, to help populate the gecos field with data that makes sense.
2009-03-10Treat uids and gids as 32 bit numbers not 64Simo Sorce1-23/+21
In the nss communication protocol we were treating uids and gids as 64 bit values, but uids and gids are really u32 values, change the protocol to reflect the real size.
2009-03-09Always pass sss_domain_info to sysdb functions.Simo Sorce1-27/+15
2009-03-06Fix reporting non-default users.Simo Sorce1-300/+311
We need to add the domain when users are not part of the default domain, otherwise name conflicts may happen.
2009-03-05Remove _PW_ and _GR_ from SYSDB_ definesSimo Sorce1-10/+10
Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
2009-03-05Implement GetCachedUsers in the InfoPipeStephen Gallagher1-2/+2
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-04Add enumeration backout period.Simo Sorce1-2/+34
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-02-28Fix confdb issues.Simo Sorce1-5/+5
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-12/+24
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 Sorce1-29/+44
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.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce1-1/+1
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-24Add PAM responderSumit Bose1-0/+2238
Also move responders under server/responder with shared code in server/responder/common Signed-off-by: Simo Sorce <ssorce@redhat.com>