patch-2.4.4 linux/drivers/s390/block/xpram.c

Next file: linux/drivers/s390/ccwcache.c
Previous file: linux/drivers/s390/block/dasd_fba.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/s390/block/xpram.c linux/drivers/s390/block/xpram.c
@@ -658,7 +658,7 @@
 
 	case BLKFLSBUF: /* flush, 0x1261 */
 		fsync_dev(inode->i_rdev);
-		if ( suser() )invalidate_buffers(inode->i_rdev);
+		if ( capable(CAP_SYS_ADMIN) )invalidate_buffers(inode->i_rdev);
 		return 0;
 
 	case BLKRAGET: /* return the readahead value, 0x1263 */
@@ -671,7 +671,7 @@
 		return 0;
 
 	case BLKRASET: /* set the readahead value, 0x1262 */
-		if (!suser()) return -EACCES;
+		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
 		if (arg > 0xff) return -EINVAL; /* limit it */
 		read_ahead[MAJOR(inode->i_rdev)] = arg;
                 atomic_eieio();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)