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.

Signed-off-by: Nicolas Joly <nj...@pasteur.fr>

-- 
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
diff -u -p -r1.8 mkdir02.c
--- testcases/kernel/syscalls/mkdir/mkdir02.c   23 Mar 2009 13:35:54 -0000      
1.8
+++ testcases/kernel/syscalls/mkdir/mkdir02.c   7 Jan 2010 10:52:49 -0000
@@ -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
diff -u -p -r1.9 mkdir04.c
--- testcases/kernel/syscalls/mkdir/mkdir04.c   23 Mar 2009 13:35:54 -0000      
1.9
+++ testcases/kernel/syscalls/mkdir/mkdir04.c   7 Jan 2010 10:52:49 -0000
@@ -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
diff -u -p -r1.10 rename09.c
--- testcases/kernel/syscalls/rename/rename09.c 23 Mar 2009 13:36:01 -0000      
1.10
+++ testcases/kernel/syscalls/rename/rename09.c 7 Jan 2010 10:52:49 -0000
@@ -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
diff -u -p -r1.10 rename12.c
--- testcases/kernel/syscalls/rename/rename12.c 23 Mar 2009 13:36:01 -0000      
1.10
+++ testcases/kernel/syscalls/rename/rename12.c 7 Jan 2010 10:52:49 -0000
@@ -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
diff -u -p -r1.11 rmdir03.c
--- testcases/kernel/syscalls/rmdir/rmdir03.c   23 Mar 2009 13:36:01 -0000      
1.11
+++ testcases/kernel/syscalls/rmdir/rmdir03.c   7 Jan 2010 10:52:49 -0000
@@ -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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to