On Fri, Feb 27, 2015 at 09:59:57AM +0100, Sumit Bose wrote:
> done:
> - talloc_free(tmp_ctx);
> if (krberr != 0) KRB5_SYSLOG(krberr);
> if (keytab) krb5_kt_close(context, keytab);
> if (context) krb5_free_context(context);
> + if (ccname_file_dummy) unlink(ccname_file_dummy);
It would be nice if you can check the return code of unlink(). I know it
is a bit useless because we can't do anything if unlink() fails. But we
try to keep the SSSD build free of warning even with high warning levels
and when using static analyzers like Coverity or the one from clang. I
would expect that at least some of them will complain about the
unchecked return value. Additionally a debug message telling why unlink()
failed might help debug issue when the dummy file is not removed
properly.
bye,
Sumit
That's a good point, I think using the 'ret' variable would be fine,
since we return krberr.