From: Tim Waugh <twaugh@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [patch] 2.4.0: lp superuser check
Date: Fri, 5 Jan 2001 17:16:32 +0000 [thread overview]
Message-ID: <20010105171632.N5253@redhat.com> (raw)
Here is a patch that changes the superuser check in lp to use
capabilities instead.
Does anyone see a problem with it before I send it to Linus?
Tim.
*/
2001-01-05 Tim Waugh <twaugh@redhat.com>
* drivers/char/lp.c: Capability check instead of superuser check.
Patch from acme@connectiva.com.br.
--- linux-2.4.0/drivers/char/lp.c.lp Wed Nov 1 15:06:20 2000
+++ linux-2.4.0/drivers/char/lp.c Fri Jan 5 10:58:18 2001
@@ -485,7 +485,7 @@
if (copy_to_user((int *) arg, &LP_STAT(minor),
sizeof(struct lp_stats)))
return -EFAULT;
- if (suser())
+ if (capable(CAP_SYS_ADMIN))
memset(&LP_STAT(minor), 0,
sizeof(struct lp_stats));
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-01-05 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-05 17:16 Tim Waugh [this message]
2001-01-05 23:41 ` suser() check audit Was: [patch] 2.4.0: lp superuser check David Weinehall
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=20010105171632.N5253@redhat.com \
--to=twaugh@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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.