s3: Remove a nested if-statement
authorVolker Lendecke <vl@samba.org>
Thu, 9 Sep 2010 02:01:11 +0000 (19:01 -0700)
committerVolker Lendecke <vl@samba.org>
Thu, 9 Sep 2010 04:19:24 +0000 (06:19 +0200)
source3/winbindd/winbindd_pam.c

index eda812ef3cc7bb796c9e53a6baf696f0b7f65eed..48df304f875f34482655855f3ce4f9b76cbb75de 100644 (file)
@@ -1612,18 +1612,16 @@ process_result:
                        goto done;
                }
 
-               if ((state->request->flags & WBFLAG_PAM_CACHED_LOGIN)) {
+               if ((state->request->flags & WBFLAG_PAM_CACHED_LOGIN)
+                   && lp_winbind_offline_logon()) {
 
-                       if (lp_winbind_offline_logon()) {
-                               result = winbindd_store_creds(domain,
+                       result = winbindd_store_creds(domain,
                                                      state->mem_ctx,
                                                      state->request->data.auth.user,
                                                      state->request->data.auth.pass,
                                                      info3);
-                       }
                }
 
-
                if (state->request->flags & WBFLAG_PAM_GET_PWD_POLICY) {
                        struct winbindd_domain *our_domain = find_our_domain();