[SSSD] [Patch] Cmocka unit test patch for authtok module

Lukas Slebodnik lslebodn at redhat.com
Mon Nov 11 11:35:31 UTC 2013


On (09/11/13 19:29), Pallavi Jha wrote:
>Hi
>
>I have created the patch and attached it with this mail. Kindly review it.
>I have commented some of the test as it fails(gives segmentation fault)
>when authtoken is NULL. I think we should test tok for NULL before
>accessing its elements. Please correct me if am wrong.
>
>for example :
>
>uint8_t *sss_authtok_get_data(struct sss_auth_token *tok)
>{
>    return tok->data;
>}
>
>This should be written as:
>
>uint8_t *sss_authtok_get_data(struct sss_auth_token *tok)
>{
>    if(!tok) {
>        return EINVAL;
>    }
>    return tok->data;
>}
>
>Thanking You,
>Pallavi

I cannot find any attachment.

LS



More information about the sssd-devel mailing list