[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: truncate: invalid open64 call: O_CREAT or O_TMPFILE without mode
From: Ari Sundholm <ari () tuxera ! com>
Date: 2016-01-13 14:05:32
Message-ID: 1452693932.16365.41.camel () ari-lenovo
[Download RAW message or body]
Hi,
On Wed, 2016-01-13 at 12:49 +0000, Christian Neukirchen wrote:
> Hi,
>
> busybox v1.24.1 crashes here with glibc-2.22 upon this invocation:
>
> % busybox truncate -s 1 /tmp/whatever
> *** invalid open64 call: O_CREAT or O_TMPFILE without mode ***: busybox terminated
> ======= Backtrace: =========
> /usr/lib/libc.so.6(+0x71e76)[0x7fa878384e76]
> /usr/lib/libc.so.6(__fortify_fail+0x37)[0x7fa87840cd17]
> /usr/lib/libc.so.6(+0xdc3bf)[0x7fa8783ef3bf]
> busybox(+0x6d49e)[0x55f69d7f749e]
> busybox(+0xaed3)[0x55f69d794ed3]
> busybox(+0xafde)[0x55f69d794fde]
> busybox(+0xb157)[0x55f69d795157]
> busybox(+0xab13)[0x55f69d794b13]
> /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fa878333680]
> busybox(+0xab79)[0x55f69d794b79]
> ...
>
> And indeed, without -c this is bound to happen:
>
> if (!(opts & OPT_NOCREATE))
> flags |= O_CREAT;
> ...
> int fd = open(*argv, flags);
>
> In conformance with GNU coreutils, this open(2) call should pass mode
> 0666 as a third argument.
>
This is a known bug with a patch posted on this list on Mon, 04 Jan 2016
15:40:37 +0200.
Denys (or anyone with commit access), could you apply the patch and also
backport it to the 1.24.x branch?
Best regards,
Ari Sundholm
ari@tuxera.com
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic