mirror of
https://github.com/samba-team/samba.git
synced 2025-02-07 01:58:28 +03:00
lib/krb5_wrap: clang: Fix warning: Call to function 'mktemp' is insecure
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>
This commit is contained in:
parent
7bddd6aefe
commit
8b92539997
@ -2009,7 +2009,7 @@ krb5_error_code smb_krb5_kinit_keyblock_ccache(krb5_context ctx,
|
||||
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user