Skip to contentSkip to conversation

kill unneeded chmod calls on created tmp directory

LTP Nicolas Joly 2 participants 2 messages Jan 7, 2010 – Jan 13, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

The following patch kills some unneeded chmod(2) calls on newly created temporary directory; the tst_tmpdir() function do already set the correct permissions.

Signature · 4 lines
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

Index: testcases/kernel/syscalls/mkdir/mkdir02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/mkdir/mkdir02.c,v retrieving revision 1.8

kernel/syscalls/mkdir/mkdir02.c +0 -3
diff -u -p -r1.8 mkdir02.c
@@ -329,9 +329,6 @@ void setup()
 	/* Create a temporary directory and make it current. */
 	tst_tmpdir();
 
-	/* make it writeable */
-	chmod(".", 0777);
-
 	umask(0);
 }
 

Index: testcases/kernel/syscalls/mkdir/mkdir04.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/mkdir/mkdir04.c,v retrieving revision 1.9

kernel/syscalls/mkdir/mkdir04.c +0 -3
diff -u -p -r1.9 mkdir04.c
@@ -235,9 +235,6 @@ void setup()
 	/* Create a temporary directory and make it current. */
 	tst_tmpdir();
 
-	/* give the write rights to all user */
-	chmod(".", 0777);
-
 	umask(0);
 }
 

Index: testcases/kernel/syscalls/rename/rename09.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/rename/rename09.c,v retrieving revision 1.10

kernel/syscalls/rename/rename09.c +0 -3
diff -u -p -r1.10 rename09.c
@@ -264,9 +264,6 @@ void setup()
 	/* Create a temporary directory and make it current. */
 	tst_tmpdir();
 
-	/* give write permission to all users */
-	chmod(".", 0777);
-
 	umask(0);
 
 	sprintf(fdir, "tdir_%d", getpid());

Index: testcases/kernel/syscalls/rename/rename12.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/rename/rename12.c,v retrieving revision 1.10

kernel/syscalls/rename/rename12.c +0 -3
diff -u -p -r1.10 rename12.c
@@ -207,9 +207,6 @@ void setup()
 	/* Create a temporary directory and make it current. */
 	tst_tmpdir();
 
-	/* give the write rights to all user */
-	chmod(".", 0777);
-
 	umask(0);
 
 	sprintf(fdir, "./tdir_%d", getpid());

Index: testcases/kernel/syscalls/rmdir/rmdir03.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/rmdir/rmdir03.c,v retrieving revision 1.11

kernel/syscalls/rmdir/rmdir03.c +0 -3
diff -u -p -r1.11 rmdir03.c
@@ -338,9 +338,6 @@ void setup()
 	/* Create a temporary directory and make it current. */
 	tst_tmpdir();
 
-	/* give write permission to all users */
-	chmod(".", 0777);
-
 	umask(0);
 
 	sprintf(tstdir1, "./tstdir1_%d", getpid());

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 7 lines · Nicolas Joly

Hi,

The following patch kills some unneeded chmod(2) calls on newly created temporary directory; the tst_tmpdir() function do already set the correct permissions.

Ok. Thanks.

Regards--
Subrata

Quoted 8 lines

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list