public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] mount/mount03.c: Add mode argument to open call.
@ 2013-05-17 18:56 Vinson Lee
  2013-05-18  0:40 ` Wanlong Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Vinson Lee @ 2013-05-17 18:56 UTC (permalink / raw)
  To: ltp-list

From: Vinson Lee <vlee@twitter.com>

This patch fixes this build error on Ubuntu introduced with commit
24324ad5dae71172125060b82580486b0f3d37da.

In file included from /usr/include/fcntl.h:252:0,
                 from mount03.c:73:
In function ‘open’,
    inlined from ‘setup’ at mount03.c:447:5:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 testcases/kernel/syscalls/mount/mount03.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mount/mount03.c b/testcases/kernel/syscalls/mount/mount03.c
index 295b6da..b1aa71f 100644
--- a/testcases/kernel/syscalls/mount/mount03.c
+++ b/testcases/kernel/syscalls/mount/mount03.c
@@ -444,7 +444,7 @@ void setup()
 			 path_name, DIR_MODE);
 
 	snprintf(file, PATH_MAX, "%s/setuid_test", path_name);
-	fd = open(file, O_CREAT | O_TRUNC);
+	fd = open(file, O_CREAT | O_TRUNC, S_IRWXU);
 	if (fd == -1)
 		tst_brkm(TBROK, cleanup, "open file failed");
 	close(fd);
-- 
1.7.9.5


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] mount/mount03.c: Add mode argument to open call.
  2013-05-17 18:56 [LTP] [PATCH] mount/mount03.c: Add mode argument to open call Vinson Lee
@ 2013-05-18  0:40 ` Wanlong Gao
  0 siblings, 0 replies; 2+ messages in thread
From: Wanlong Gao @ 2013-05-18  0:40 UTC (permalink / raw)
  To: Vinson Lee; +Cc: ltp-list

On 05/18/2013 02:56 AM, Vinson Lee wrote:
> From: Vinson Lee <vlee@twitter.com>
> 
> This patch fixes this build error on Ubuntu introduced with commit
> 24324ad5dae71172125060b82580486b0f3d37da.
> 
> In file included from /usr/include/fcntl.h:252:0,
>                  from mount03.c:73:
> In function ‘open’,
>     inlined from ‘setup’ at mount03.c:447:5:
> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
> 
> Signed-off-by: Vinson Lee <vlee@twitter.com>

Applied, thank you.

Wanlong Gao


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-18  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 18:56 [LTP] [PATCH] mount/mount03.c: Add mode argument to open call Vinson Lee
2013-05-18  0:40 ` Wanlong Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox