Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port passkey covscan fixes to sssd-2.9 #6876

Closed
wants to merge 2 commits into from

Commits on Aug 14, 2023

  1. passkey: fix two covscan issues

    Fixes following covscan issues:
    ```
    Error: CLANG_WARNING:
    sssd-2.9.0/src/krb5_plugin/passkey/passkey_utils.c:562:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'data'
     #  560|       }
     #  561|
     #  562|->     json_decref(jroot);
     #  563|       return message;
     #  564|   }
    
    Error: UNREACHABLE (CWE-561):
    sssd-2.9.0/src/responder/pam/pamsrv_passkey.c:1039: unreachable: This code cannot be reached: "if (!pctx->passkey_auth) {
    ...".
     # 1037|   #endif
     # 1038|
     # 1039|->     if (!pctx->passkey_auth) {
     # 1040|           return false;
     # 1041|       }
    ```
    
    Resolves: SSSD#6733
    
    Signed-off-by: Iker Pedrosa <[email protected]>
    
    Reviewed-by: Justin Stephenson <[email protected]>
    Reviewed-by: Pavel Březina <[email protected]>
    Reviewed-by: Sumit Bose <[email protected]>
    ikerexxe committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    ceb09dd View commit details
    Browse the repository at this point in the history
  2. passkey: rename function

    Rename `sss_passkey_prefix_json_data()` to
    `sss_passkey_message_from_reply_json()`.
    
    Signed-off-by: Iker Pedrosa <[email protected]>
    
    Reviewed-by: Justin Stephenson <[email protected]>
    Reviewed-by: Pavel Březina <[email protected]>
    Reviewed-by: Sumit Bose <[email protected]>
    ikerexxe committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    5277c35 View commit details
    Browse the repository at this point in the history