Browse Source

kernel: processes in the same session should be able to send SIGCONT regardless of permissions

K. Lange 3 years ago
parent
commit
e0a871df8b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      kernel/sys/signal.c

+ 3 - 2
kernel/sys/signal.c

@@ -211,8 +211,9 @@ int send_signal(pid_t process, uint32_t signal, int force_root) {
 	}
 
 	if (!force_root && receiver->user != current_process->user && current_process->user != USER_ROOT_UID) {
-		/* No way in hell. */
-		return -EPERM;
+		if (!(signal == SIGCONT && receiver->session == current_process->session)) {
+			return -EPERM;
+		}
 	}
 
 	if (signal > NUMSIGNALS) {