Unverified Commit 220a8415 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11195 tty: n_gsm: require CAP_NET_ADMIN to attach N_GSM0710 ldisc

parents bd6167bc 5b5b4650
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2623,6 +2623,9 @@ static int gsmld_open(struct tty_struct *tty)
	struct gsm_mux *gsm;
	int ret;

	if (!capable(CAP_NET_ADMIN))
		return -EPERM;

	if (tty->ops->write == NULL)
		return -EINVAL;