URL: https://github.com/SSSD/sssd/pull/204
Title: #204: krb5: return to responder that pkinit is not available

lslebodn commented:
"""
On (28/03/17 14:07), sumit-bose wrote:
>I agree that the overall condition is complicated and I thought  about  
>extracting some conditions as well. In the end I decided against it because I 
>think it helps to understand the conditions if each authentication type is 
>listed explicitly. 
>
Sure; but current indentaion does not improve it either.

If we ignore 80 collumn limit then follwing is a little bit better
```
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index a4128dda6..94bf1ee6d 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -1539,11 +1539,9 @@ static krb5_error_code get_and_save_tgt(struct krb5_req 
*kr,
             if (kr->pd->cmd == SSS_PAM_AUTHENTICATE
                     && kerr == KRB5_PREAUTH_FAILED
                     && kr->pkinit_prompting == false
-                    && (( kr->password_prompting == false
-                              && kr->otp == false)
-                            || ((kr->otp == true
-                                    || kr->password_prompting == true)
-                              && IS_SC_AUTHTOK(kr->pd->authtok))) ) {
+                    && (( kr->password_prompting == false && kr->otp == false)
+                            || ((kr->otp == true || kr->password_prompting == 
true)
+                                    && IS_SC_AUTHTOK(kr->pd->authtok))) ) {
                 return ERR_NO_AUTH_METHOD_AVAILABLE;
             }
             return kerr;
```

It jut my personal opinion. Others can have different.
Feel free to push current version.

LS

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/204#issuecomment-289912004
_______________________________________________
sssd-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to