All of lore.kernel.org
 help / color / mirror / Atom feed
From: Morten Helgesen <admin@nextframe.net>
To: torvalds@transmeta.com, marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.5] converting drivers/net/wan/lmc/lmc_main.c from suser() to capable()
Date: Thu, 6 Dec 2001 16:11:30 +0100	[thread overview]
Message-ID: <20011206161130.D122@sexything> (raw)

Hey Linus, Marcelo and the rest of you.

The code mentioned in the subject does not seem to have a maintainer. I sent the patch to those mentioned
in lmc_main.c, and from Andrew Stanley-Jones I got the following answer:

"I'm not sure it's really being maintained, but I was the last one to work
 on it afaik.  Feel free to apply it.
 -Andrew"

So I guess, if the patch looks good, it is just for you to apply it ... it is against 2.5.1-pre5, but should
apply cleanly to 2.4 as well ...

== Morten

-- 
mvh
Morten Helgesen 
UNIX System Administrator & C Developer 
Nextframe AS
admin@nextframe.net / 93445641
http://www.nextframe.net

--- /usr/src/linux-2.5.1-pre5/drivers/net/wan/lmc/lmc_main.c    Fri Sep 14 01:04:43 2001
+++ /usr/src/patched-linux-2.5.1-pre5/drivers/net/wan/lmc/lmc_main.c    Thu Dec  6 13:17:21 2001
@@ -176,7 +176,7 @@

     case LMCIOCSINFO: /*fold01*/
         sp = &((struct ppp_device *) dev)->sppp;
-        if (!suser ()) {
+        if (!capable(CAP_NET_ADMIN)) {
             ret = -EPERM;
             break;
         }
@@ -211,7 +211,7 @@
             u_int16_t  old_type = sc->if_type;
             u_int16_t  new_type;

-           if (!suser ()) {
+           if (!capable(CAP_NET_ADMIN)) {
                ret = -EPERM;
                break;
            }
@@ -291,7 +291,7 @@
         break;

     case LMCIOCCLEARLMCSTATS: /*fold01*/
-        if (!suser ()){
+        if (!capable(CAP_NET_ADMIN)){
             ret = -EPERM;
             break;
         }
@@ -305,7 +305,7 @@
         break;

     case LMCIOCSETCIRCUIT: /*fold01*/
-        if (!suser ()){
+        if (!capable(CAP_NET_ADMIN)){
             ret = -EPERM;
             break;
         }
@@ -323,7 +323,7 @@
         break;

     case LMCIOCRESET: /*fold01*/
-        if (!suser ()){
+        if (!capable(CAP_NET_ADMIN)){
             ret = -EPERM;
             break;
         }
@@ -356,7 +356,7 @@
         {
             struct lmc_xilinx_control xc; /*fold02*/

-            if (!suser ()){
+            if (!capable(CAP_NET_ADMIN)){
                 ret = -EPERM;
                 break;
             }


                 reply	other threads:[~2001-12-06 15:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011206161130.D122@sexything \
    --to=admin@nextframe.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.