refactor calls of sss_parse_name

sss_parse_name now supports NULL as output parameters so existing calls passing
arguments which were never read were substituted by NULL.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
KRB5: log message - wrong permissions on ccache dir

Resolves:
https://fedorahosted.org/sssd/ticket/2037

Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
MAN: minimal value expected for ldap_idmap_range_size

Resolves:
https://fedorahosted.org/sssd/ticket/1451

Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
SYSV: Do not call functions success and fail itself

Bash function daemon will call success or fail. It is useless to call them
one more time. It may cause strange behaviour with some configurations of
terminal.

 # service sssd restart
 Stopping sssd: [  OK  ]
 [  OK  ] sssd: [  OK  ]

Resolves:
https://fedorahosted.org/sssd/ticket/2280

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
krb5_child: remove unused option lifetime_str from k5c_setup_fast()

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
krb5-child: extract lifetime settings into set_lifetime_options()

Additionally the lifetime option flags are unset if there are no
explicit settings to make sure the defaults from krb5.conf are used even
if other values were set manually in between.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
krb5_client: rename krb5_set_canonicalize() to set_canonicalize_option()

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
krb5-child: add revert_changepw_options()

After changing the Kerberos password krb5-child will try to get a fresh
TGT with the new password. This patch tries to make sure the right gic
options are used.

Resolves: https://fedorahosted.org/sssd/ticket/2289

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
KRB5: Do not attempt to get a TGT after a password change using OTP

https://fedorahosted.org/sssd/ticket/2271

The current krb5_child code attempts to get a TGT for the convenience of
the user using the new password after a password change operation.
However, an OTP should never be used twice, which means we can't perform
the kinit operation after chpass is finished. Instead, we only print a
PAM information instructing the user to log out and back in manually.

Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
sbus: Add type-safe DBus method handlers and finish functions

Type safe method handlers allow methods not to have to do tedious
unwrapping and wrapping of DBus method call messages or replies.

Arguments of the following DBus types are supported in type-safe
method handlers. In addition arrays of these are supported.

 y: uint8_t
 b: bool     (but no arrays, yet)
 n: int16_t
 q: uint16_t
 i: int32_t
 u: uint32_t
 x: int64_t
 t: uint64_t
 d: double
 s: char *   (utf8 string)
 o: char *   (object path)

As an exception, arrays of booleans are not supported, but could be
added later. Other more complex types could be added later if desired.
If a method has other argument types, then it must be marked as having
a raw handler (see below).

Internally each method can have a type specific invoker function which
unpacks the incoming arguments and invokes the method handler with the
correct arguments.

Each method also has a finish which accepts the type-safe out arguments
(ie: return values) and builds the reply message. Like other request
'finish' functions, these free the request talloc context, and are to
be used in place of sbus_request_finish() or friends.

Raw method handlers parse their own method arguments, and prepare their
own reply (ideally using sbus_request_finish() helpers). They can also
do strange things like have variable arguments. To mark a DBus method
as having a raw method handler use the following annotation:

<annotation name="org.freedesktop.sssd.RawHandler" value="true"/>

Raw methods do not have invokers or finish functions.

I've left all of the internal peer to peer communication using raw
method handlers. No code changes here.
sbus_codegen_tests: Add test case type-safe handler args

This adds a big test case for invoking a handler with all supported
basic arguments, and constructing a reply with the same. Lots of
tedious code, but worth it to make sure things work well.