]> git.proxmox.com Git - mirror_qemu.git/commit
slirp: use less predictable directory name in /tmp for smb config (CVE-2015-4037)
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 28 May 2015 11:12:26 +0000 (14:12 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 3 Jun 2015 11:21:45 +0000 (14:21 +0300)
commit8b8f1c7e9ddb2e88a144638f6527bf70e32343e3
tree583cdca5f1cd0eae7e21d16a9a3ad3c78fda2a90
parentb6b099541d6cf3c50b0fb5af916fff0db6508805
slirp: use less predictable directory name in /tmp for smb config (CVE-2015-4037)

In this version I used mkdtemp(3) which is:

        _BSD_SOURCE
        || /* Since glibc 2.10: */
            (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)

(POSIX.1-2008), so should be available on systems we care about.

While at it, reset the resulting directory name within smb structure
on error so cleanup function wont try to remove directory which we
failed to create.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
net/slirp.c