lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Oct 2007 20:00:26 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: [PATCH] isofs: add +w bit for non-RR discs


Add %S_IWUGO bit for files on ISO-9660 filesystems without RockRidge
extensions. This allows one to modify the files right after copying,
without having to do an extra recursive chmod if `cp -p` or
`rsync -p` is used.

References: http://lkml.org/lkml/2007/4/1/164
Signed-off-by: Jan Engelhardt <jengelh@....de>

---
 fs/isofs/inode.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Index: linux-2.6.23/fs/isofs/inode.c
===================================================================
--- linux-2.6.23.orig/fs/isofs/inode.c
+++ linux-2.6.23/fs/isofs/inode.c
@@ -360,12 +360,11 @@ static int parse_options(char *options, 
 	popt->check = 'u';		/* unset */
 	popt->nocompress = 0;
 	popt->blocksize = 1024;
-	popt->mode = S_IRUGO | S_IXUGO; /*
-					 * r-x for all.  The disc could
-					 * be shared with DOS machines so
-					 * virtually anything could be
-					 * a valid executable.
-					 */
+	/*
+	 * +x bit for all. The disc could be shared with DOS machine, so
+	 * virtually anything could be a valid executable.
+	 */
+	popt->mode = S_IRUGO | S_IWUSR | S_IXUGO;
 	popt->gid = 0;
 	popt->uid = 0;
 	popt->iocharset = NULL;
@@ -1235,7 +1234,7 @@ static void isofs_read_inode(struct inod
 	ei->i_file_format = isofs_file_normal;
 
 	if (de->flags[-high_sierra] & 2) {
-		inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR;
+		inode->i_mode = S_IRUGO | S_IWUSR | S_IXUGO | S_IFDIR;
 		inode->i_nlink = 1;	/*
 					 * Set to 1.  We know there are 2, but
 					 * the find utility tries to optimize
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ