uterm: vt: do not check SIGUSR1/2 for SI_KERNEL

If we want to run as client under user-space fake-VT implementations like
kmscon-cdev, we need to be able to catch those signals from
userspace-daemons. Therefore, do not check whether the signals were
generated by the kernel.

This doesn't affect security in any way as non-priviledged processes
aren't allowed to send signals, anyway. Moreover, this increases
debugability of VT layers a lot as we can fake these signals now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-11-17 19:45:44 +01:00
parent 0799a4e1fb
commit c7707560de

View File

@ -179,9 +179,6 @@ static void real_sig_enter(struct uterm_vt *vt, struct signalfd_siginfo *info)
struct vt_stat vts;
int ret;
if (info->ssi_code != SI_KERNEL)
return;
ret = ioctl(vt->real_fd, VT_GETSTATE, &vts);
if (ret) {
log_warning("cannot get current VT state (%d): %m", errno);
@ -211,9 +208,6 @@ static void real_sig_leave(struct uterm_vt *vt, struct signalfd_siginfo *info)
struct vt_stat vts;
int ret;
if (info->ssi_code != SI_KERNEL)
return;
ret = ioctl(vt->real_fd, VT_GETSTATE, &vts);
if (ret) {
log_warning("cannot get current VT state (%d): %m", errno);