* [PATCH] trace-cmd: Add missing mode to open() call
@ 2014-06-20 18:42 Seth Forshee
2014-06-23 14:19 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Seth Forshee @ 2014-06-20 18:42 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-kernel, Seth Forshee
touch_file() calls open(2) with O_CREAT but omits the required
mode argument. Fix this omission.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
trace-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trace-record.c b/trace-record.c
index d3dd0c5..8438388 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -1995,7 +1995,7 @@ static void touch_file(const char *file)
{
int fd;
- fd = open(file, O_WRONLY | O_CREAT | O_TRUNC);
+ fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd < 0)
die("could not create file %s\n", file);
close(fd);
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] trace-cmd: Add missing mode to open() call
2014-06-20 18:42 [PATCH] trace-cmd: Add missing mode to open() call Seth Forshee
@ 2014-06-23 14:19 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2014-06-23 14:19 UTC (permalink / raw)
To: Seth Forshee; +Cc: linux-kernel
On Fri, 20 Jun 2014 13:42:29 -0500
Seth Forshee <seth.forshee@canonical.com> wrote:
> touch_file() calls open(2) with O_CREAT but omits the required
> mode argument. Fix this omission.
>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Applied, thanks!
-- Steve
> ---
> trace-record.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/trace-record.c b/trace-record.c
> index d3dd0c5..8438388 100644
> --- a/trace-record.c
> +++ b/trace-record.c
> @@ -1995,7 +1995,7 @@ static void touch_file(const char *file)
> {
> int fd;
>
> - fd = open(file, O_WRONLY | O_CREAT | O_TRUNC);
> + fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> if (fd < 0)
> die("could not create file %s\n", file);
> close(fd);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-23 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 18:42 [PATCH] trace-cmd: Add missing mode to open() call Seth Forshee
2014-06-23 14:19 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®