Unverified Commit 606e9f58 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents 64b422d4 24c6978d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2360,6 +2360,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;