Fixes:
lib/krb5_wrap/krb5_samba.c:2012:2: warning: Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead <--[clang]
mktemp(tmp_name);
^~~~~~
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
memcpy(tmp_name, SMB_CREDS_KEYTAB, sizeof(SMB_CREDS_KEYTAB));
mask = umask(S_IRWXO | S_IRWXG);
- mktemp(tmp_name);
+ mkstemp(tmp_name);
umask(mask);
if (tmp_name[0] == 0) {
return KRB5_KT_BADNAME;