Skip to contentSkip to conversation

mount/mount03.c: Add mode argument to open call.

PATCH Applied Vinson Lee 2 participants 2 messages May 17, 2013 – May 18, 2013

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 mount/mount03.c: Add mode argument to open call.

From: Vinson Lee <[email protected]>

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

---
 testcases/kernel/syscalls/mount/mount03.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/mount/mount03.c +1 -1
index 295b6da..b1aa71f 100644
@@ -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);
Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Applied
#1 lore raw
Quoted 5 lines · Vinson Lee

From: Vinson Lee <[email protected]>

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

Quoted 7 lines

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

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list