[PATCH][cifs-utils] avoid using mktemp when updating mtab

Steve French smfrench at gmail.com
Tue Jan 21 00:49:17 UTC 2025


Attached patch to  Fix build warning: cifs-utils/mount.cifs.c:1726:
    warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'

Use of mktemp() has been deprecated (e.g. due to security issues with
symlink races), and instead mkstemp is often recommended.  Change
the use of mktemp to mkstemp in del_mtab in cifs-utils

Fixes: f46dd7661cfb ("mount.cifs: Properly update mtab during remount")

Opinions? Better way to address it?

-- 
Thanks,

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cifs-utils-avoid-using-mktemp-when-updating-mtab.patch
Type: text/x-patch
Size: 2051 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20250120/bf9ae433/0001-cifs-utils-avoid-using-mktemp-when-updating-mtab.bin>


More information about the samba-technical mailing list