patch-2.3.20 linux/kernel/sys.c

Next file: linux/kernel/sysctl.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.19/linux/kernel/sys.c linux/kernel/sys.c
@@ -997,6 +997,17 @@
 		case PR_GET_PDEATHSIG:
 			error = put_user(current->pdeath_signal, (int *)arg2);
 			break;
+		case PR_GET_DUMPABLE:
+			if (current->dumpable)
+				error = 1;
+			break;
+		case PR_SET_DUMPABLE:
+			if (arg2 != 0 && arg2 != 1) {
+				error = -EINVAL;
+				break;
+			}
+			current->dumpable = arg2;
+			break;
 		default:
 			error = -EINVAL;
 			break;

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