[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can change permissions regardless of ownership?




dvrabel@xxxxxxx.uk said:
>  When using JFFS it appears that you can change permissions and
> ownerships even for files you don't own. 


Index: inode-v22.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/inode-v22.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- inode-v22.c	2000/08/10 08:58:00	1.32
+++ inode-v22.c	2000/08/11 09:02:51	1.33
@@ -10,7 +10,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * $Id: inode-v22.c,v 1.32 2000/08/10 08:58:00 dwmw2 Exp $
+ * $Id: inode-v22.c,v 1.33 2000/08/11 09:02:51 dwmw2 Exp $
  *
  * Ported to Linux 2.2.x by Sebastien Cote:
  * Copyright (C) 2000 Matrox Electronic Systems
@@ -194,6 +194,9 @@
 
 	D1(printk("***jffs_notify_change(): file: \"%s\", ino: %u\n",
 		  f->name, f->ino));
+
+	if ((res = inode_change_ok(inode, iattr)))
+		return res;
 
 	c = f->c;
 	fmc = c->fmc;


--
dwmw2