summaryrefslogtreecommitdiffstats
path: root/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2014-12-10 17:14:41 -0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-12-10 21:23:00 +0100
commit4d980cd6a73e866b63949a76a9106689522e2e21 (patch)
treea1b68739dfe246eb7e92f21a911ebfde6b15d267 /package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
parent83b0d8f821a972aa85d003ab1b750dc8e184fe9d (diff)
downloadbuildroot-4d980cd6a73e866b63949a76a9106689522e2e21.tar.gz
buildroot-4d980cd6a73e866b63949a76a9106689522e2e21.zip
util-linux: add security patch for CVE-2014-9114
Fixes CVE-2014-9114 - command injection flaw in blkid. See https://bugzilla.redhat.com/show_bug.cgi?id=1168485 Patch upstream. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch')
-rw-r--r--package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch b/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
new file mode 100644
index 0000000000..0dfe7befba
--- /dev/null
+++ b/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
@@ -0,0 +1,50 @@
+From 42a84250fc78bae3e885ecd1379e713663fe6487 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@openwide.fr>
+Date: Sun, 6 Apr 2014 12:12:41 +0200
+Subject: [PATCH 1/1] c.h: define mkostemp for older version of uClibc
+
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ configure.ac | 2 ++
+ include/c.h | 14 ++++++++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 35a1f26..a9b8d34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -321,6 +321,8 @@ AC_CHECK_FUNCS([ \
+ ])
+ AC_FUNC_FSEEKO
+
++AC_CHECK_FUNCS([mkostemp])
++
+ AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
+ AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
+
+diff --git a/include/c.h b/include/c.h
+index 4a9bf3d..1b880ed 100644
+--- a/include/c.h
++++ b/include/c.h
+@@ -300,4 +300,18 @@ static inline int usleep(useconds_t usec)
+ # define SEEK_HOLE 4
+ #endif
+
++/*
++ * mkostemp() may be missing with older version of uClibc
++ */
++#ifndef HAVE_MKOSTEMP
++static inline int mkostemp(char *template, int flags)
++{
++ int fd;
++ fd = mkstemp(template);
++ if (flags & O_CLOEXEC && fd >= 0)
++ fcntl(fd, F_SETFD, FD_CLOEXEC);
++ return fd;
++}
++#endif
++
+ #endif /* UTIL_LINUX_C_H */
+--
+1.9.0
+
OpenPOWER on IntegriCloud