patch-2.1.100 linux/drivers/char/nvram.c

Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/lp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/char/nvram.c linux/drivers/char/nvram.c
@@ -285,7 +285,7 @@
 	switch( cmd ) {
 
 	  case NVRAM_INIT:			/* initialize NVRAM contents and checksum */
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return( -EACCES );
 
 		save_flags(flags);
@@ -301,7 +301,7 @@
 	  case NVRAM_SETCKS:		/* just set checksum, contents unchanged
 								 * (maybe useful after checksum garbaged
 								 * somehow...) */
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return( -EACCES );
 
 		save_flags(flags);

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