patch-2.1.100 linux/mm/mlock.c
Next file: linux/mm/page_alloc.c
Previous file: linux/mm/Makefile
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Wed May  6 10:56:06 1998
-  Orig file: 
v2.1.99/linux/mm/mlock.c
-  Orig date: 
Tue Mar 10 10:03:36 1998
diff -u --recursive --new-file v2.1.99/linux/mm/mlock.c linux/mm/mlock.c
@@ -144,7 +144,7 @@
 	struct vm_area_struct * vma, * next;
 	int error;
 
-	if (!suser())
+	if (!capable(CAP_IPC_LOCK))
 		return -EPERM;
 	len = (len + ~PAGE_MASK) & PAGE_MASK;
 	end = start + len;
@@ -235,7 +235,7 @@
 	unsigned int def_flags;
 	struct vm_area_struct * vma;
 
-	if (!suser())
+	if (!capable(CAP_IPC_LOCK))
 		return -EPERM;
 
 	def_flags = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov