[Bash-completion-devel] bash autocomplete triggers an ldap request

Guillaume Rousse guillomovitch at gmail.com
Wed Dec 3 10:02:57 UTC 2014


Le 03/12/2014 01:16, Dean Sniegowski a écrit :
> I've noticed my bash autocomplete will frequently hang.
>
> System info:
> I'm running Ubuntu 14.04.1
> Bash Autocomplete 2.1-4
> Authentication using sssd configured for kerberos and ldap
>
> Suspected Cause:
>   in _quote_readline_by_ref() has a line  elif [[ $1 == ~* ]]; then
> It appears this line causes sssd to make an ldap request for all the
> accounts which take a couple of seconds.
>
> I'm fairly certain this is the cause because if I delete that elif, the
> delay goes away and there are no ldap requests.
>
> Is this a bug or is it intended to retrieve all home directories?
If the path to complete begins with ~, that's indeed the purpose.

However, your problem is not specific to bash completion: if every call 
to some NSS function, such as getpwent(), triggers an LDAP request, 
you'll have exactly the same result running 'ls -l' in any directory. 
And you'd better configure local caching to avoid overriding your 
network and your ldap server.
-- 
Guillaume



More information about the Bash-completion-devel mailing list