patch-2.1.100 linux/fs/umsdos/namei.c

Next file: linux/include/asm-alpha/ide.h
Previous file: linux/fs/sysv/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/fs/umsdos/namei.c linux/fs/umsdos/namei.c
@@ -350,14 +350,14 @@
     Printk (("ret %d ",ret));
     if (ret == 0){
       /* check sticky bit on old_dir */
-      if ( !(old_dir->i_mode & S_ISVTX) || fsuser() ||
+      if ( !(old_dir->i_mode & S_ISVTX) || capable(CAP_FOWNER) ||
 	   current->fsuid == old_info.entry.uid ||
 	   current->fsuid == old_dir->i_uid ) {
 	/* Does new_name already exist? */
 	PRINTK(("new findentry "));
 	ret = umsdos_findentry(new_dir,&new_info,0);
 	if (ret != 0 || /* if destination file exists, are we allowed to replace it ? */
-	    !(new_dir->i_mode & S_ISVTX) || fsuser() ||
+	    !(new_dir->i_mode & S_ISVTX) || capable(CAP_FOWNER) ||
 	    current->fsuid == new_info.entry.uid ||
 	    current->fsuid == new_dir->i_uid ) {
 	  PRINTK (("new newentry "));
@@ -933,7 +933,7 @@
         umsdos_real_lookup (dir, tdentry);	/* fill inode part */
 	Printk (("isempty %d i_count %d ",empty,sdir->i_count));
 				/* check sticky bit */
-	if ( !(dir->i_mode & S_ISVTX) || fsuser() ||
+	if ( !(dir->i_mode & S_ISVTX) || capable(CAP_FOWNER) ||
 	     current->fsuid == sdir->i_uid ||
 	     current->fsuid == dir->i_uid ) {
 	  if (empty == 1){
@@ -1024,7 +1024,7 @@
       if (ret == 0){
 	Printk (("UMSDOS_unlink %.*s ",info.fake.len,info.fake.fname));
 				/* check sticky bit */
-	if ( !(dir->i_mode & S_ISVTX) || fsuser() ||
+	if ( !(dir->i_mode & S_ISVTX) || capable(CAP_FOWNER) ||
 	     current->fsuid == info.entry.uid ||
 	     current->fsuid == dir->i_uid ) {
 	  if (info.entry.flags & UMSDOS_HLINK){

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov