The branch, master has been updated
       via  a0d2dd0 auth/credentials: if credentials have principal set, they 
are not anonymous anymore
      from  dd8a085 CID 1311772: Fix null pointer check

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a0d2dd0e01618346b4ad8ea9da3f7ce4eb0364b0
Author: Alexander Bokovoy <[email protected]>
Date:   Thu May 7 14:12:03 2015 +0000

    auth/credentials: if credentials have principal set, they are not anonymous 
anymore
    
    When dealing with Kerberos, we cannot consider credentials anonymous
    if credentials were obtained properly.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11265
    
    Signed-off-by: Alexander Bokovoy <[email protected]>
    Reviewed-by: Stefan (metze) Metzmacher <[email protected]>
    Reviewed-by: Guenther Deschner <[email protected]>
    
    Autobuild-User(master): Alexander Bokovoy <[email protected]>
    Autobuild-Date(master): Wed Jul 15 16:32:55 CEST 2015 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 auth/credentials/credentials.c | 5 +++++
 1 file changed, 5 insertions(+)


Changeset truncated at 500 lines:

diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c
index df188b0..3b7d42a 100644
--- a/auth/credentials/credentials.c
+++ b/auth/credentials/credentials.c
@@ -967,6 +967,11 @@ _PUBLIC_ bool cli_credentials_is_anonymous(struct 
cli_credentials *cred)
                                                    
cred->machine_account_pending_lp_ctx);
        }
 
+       /* if principal is set, it's not anonymous */
+       if ((cred->principal != NULL) && cred->principal_obtained >= 
cred->username_obtained) {
+               return false;
+       }
+
        username = cli_credentials_get_username(cred);
        
        /* Yes, it is deliberate that we die if we have a NULL pointer


-- 
Samba Shared Repository

Reply via email to