File perms required when O_CREAT is used
PATCH 1/1 File perms required when O_CREAT is used
On Ubuntu Intrepid, D_FORTIFY_SOURCE is enabled by default, thus requiring file permissions when the O_CREAT flag is set on open. This patch remedies this for gcc-3.4.6.
Signed-off-by Jonas Bonn <[email protected]>
--- packages/gcc/gcc-3.4.6.inc | 3 ++- packages/gcc/gcc-3.4.6/O_CREAT-perms.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) create mode 100644 packages/gcc/gcc-3.4.6/O_CREAT-perms.patch
packages/gcc/gcc-3.4.6.inc +2 -1
@@ -16,7 +16,8 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://always-fixincperm.patch;patch=1 \ file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \ file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc4-mtune-compat.patch;patch=1" + file://gcc4-mtune-compat.patch;patch=1 \ + file://O_CREAT-perms.patch;patch=1" SRC_URI += "file://gcc34-configure.in.patch;patch=1" SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
packages/gcc/gcc-3.4.6/O_CREAT-perms.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- gcc-3.4.6/gcc/collect2.c.orig 2008-10-20 14:47:56.000000000 +0200 ++++ gcc-3.4.6/gcc/collect2.c 2008-10-20 14:48:49.000000000 +0200 +@@ -1534,7 +1534,7 @@ + if (redir) + { + /* Open response file. */ +- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT); ++ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0644); + + /* Duplicate the stdout and stderr file handles + so they can be restored later. */
Signature · 1 line
1.5.6.3
Quoted 5 lines · On Monday 20 October 2008 15:12:49 Jonas Bonn wrote:
On Ubuntu Intrepid,
D_FORTIFY_SOURCEis enabled by default, thus requiring file permissions when theO_CREATflag is set on open. This patch remedies this for gcc-3.4.6.Signed-off-by Jonas Bonn <[email protected]>
yupp, the next will be dirent.h in qemu-native and I have not continued from there yet. If you look at the gettext-native patch you see the debian folks decided to use the numeric constants instead of 0666 but both should be okay
z.