summaryrefslogtreecommitdiffstats
path: root/src/responder/autofs/autofssrv_cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Responders: Make the client context more genericSimo Sorce2016-06-291-40/+75
| | | | | | | | | | | | | | | This is useufl to allow reusing the responder code with other protocols. Store protocol data and responder state data behind opaque pointers and use tallog_get_type to check they are of the right type. This also allows to store per responder state_ctx so that, for example, the autofs responder does not have to carry useless variables used only by the nss responder. Resolves: https://fedorahosted.org/sssd/ticket/2918 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Refactor some conditionsMichal Židek2015-10-231-2/+2
| | | | | | | | Conditions with get_next_domain were a little confusing for coverity (but also for developers' eyes). Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* util: Update get_next_domain's interfaceMichal Židek2015-10-231-3/+3
| | | | | | | | | | | | Update get next domain to be able to include disbled domains and change the interface to accept flags instead of multiple booleans. Ticket: https://fedorahosted.org/sssd/ticket/2673 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* autofs: fix 'Cannot allocate memory' with FQDNsAron Parsons2015-04-301-9/+0
| | | | | | https://fedorahosted.org/sssd/ticket/2643 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Add missing new lines to debug messagesLukas Slebodnik2015-03-171-2/+2
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-101/+101
| | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* responder: Use SAFEALIGN macros where appropriate.Michal Zidek2014-02-051-2/+6
| | | | https://fedorahosted.org/sssd/ticket/1359
* do not use default_domain_suffix with autofsAron Parsons2013-11-181-1/+1
|
* SYSDB: Drop the sysdb_ctx parameter from the autofs APIJakub Hrozek2013-11-151-2/+2
|
* Remove unused TALLOC_CTX from responder_get_domain()Sumit Bose2013-05-021-1/+1
| | | | | | Recent refactoring removed the need to copy the domain info data of sub-domains because the related objects will not be removed from memory anymore.
* autofs: fix invalid header 'number of entries' in packetPavel Březina2013-03-011-1/+5
| | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1739 Pointer to packet body may change while filling packet with autofs mount points. As a consequence, we sometimes wrote the number of entries into invalid body and we recieved an arbitrary number on the client side. If the number was 0, there were some skipped entries. If the number was greater than 0, everything worked correctly, because we iterate through the cached entries until we reach packet length - we don't compare to the number.
* Add function get_next_domain()Simo Sorce2013-02-101-4/+4
| | | | | | | Use this function instead of explicitly calling domain->next This function allows to get the next primary domain or to descend into the subdomains and replaces also get_next_dom_or_subdom()
* Check that strings do not go beyond the end of the packet body in autofs and ↵Jan Cholasta2013-01-231-3/+3
| | | | | | | | SSH requests. This fixes CVE-2013-0220. https://fedorahosted.org/sssd/ticket/1781
* Add domain argument to sysdb autofs functionsSimo Sorce2013-01-151-2/+2
|
* AUTOFS: remove all maps from hash if request for auto.master comes inJakub Hrozek2012-12-181-3/+57
| | | | | | | | | | https://fedorahosted.org/sssd/ticket/1592 When a request for auto.master comes in, we need to remove all the maps from the lookup hash table. We can't simply delete the maps, because another request might be processing them, so instead the maps are removed from the hash table, effectively becoming orphaned. The maps will get freed when the timed destructor is invoked.
* AUTOFS: allow removing entries from hash tableJakub Hrozek2012-12-181-0/+27
| | | | | | | | | There is a timed desctructor in the autofs responder that, when the entry timeout passes, removes the autofs map from the hash table while the map is freed. This patch adds a hash delete callback so that if the map is removed from the hash table with hash_delete, its hash table pointer will be invalidated. Later, when the entry is being freed, the destructor won't attempt to remove it from the hash table.
* Add new option default_domain_suffixSumit Bose2012-10-011-1/+2
|
* Make re_expression and full_name_format per domain optionsStef Walter2012-06-121-2/+2
| | | | | | | | | | | * Allows different user/domain qualified names for different domains. For example Domain\User or user@domain. * The global re_expression and full_name_format options remain as defaults for the domains. * Subdomains get the re_expression and full_name_format of their parent domain. https://bugzilla.redhat.com/show_bug.cgi?id=811663
* AUTOFS: remove unused assignmentsJakub Hrozek2012-05-031-4/+9
| | | | | Also changes setautomntent_send so that is only return NULL in case the tevent_req creation fails.
* Modified responder_get_domain()Jan Zeleny2012-04-241-1/+1
| | | | Now it checks for subdomains as well as for the domain itself
* Remove sysdb_get_ctx_from_list()Sumit Bose2012-02-291-2/+2
|
* AUTOFS: speed up the client by requesting multiple entries at onceJakub Hrozek2012-02-271-34/+78
| | | | https://fedorahosted.org/sssd/ticket/1166
* AUTOFS: Invoke implicit setautomntent if neededJakub Hrozek2012-02-231-45/+154
| | | | https://fedorahosted.org/sssd/ticket/1167
* Allocate setent structure on state, not on the client contextJakub Hrozek2012-02-131-2/+2
| | | | https://fedorahosted.org/sssd/ticket/1189
* Remove setent structure when callback is calledJakub Hrozek2012-02-131-1/+1
|
* AUTOFS: responderJakub Hrozek2012-02-051-0/+1239