From owner-freebsd-stable Sun Sep 7 08:07:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA23338 for stable-outgoing; Sun, 7 Sep 1997 08:07:02 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA23333 for ; Sun, 7 Sep 1997 08:06:49 -0700 (PDT) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id QAA23147; Sun, 7 Sep 1997 16:06:32 +0100 (BST) Message-Id: <199709071506.QAA23147@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Snob Art Genre cc: Brian Somers , freebsd-stable@FreeBSD.ORG Subject: Re: Don Croyle: make world failing at ppp install (again) In-reply-to: Your message of "Sun, 07 Sep 1997 10:48:43 EDT." Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-7650644120" Date: Sun, 07 Sep 1997 16:06:32 +0100 From: Brian Somers Sender: owner-freebsd-stable@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk This is a multipart MIME message. --==_Exmh_-7650644120 Content-Type: text/plain; charset=us-ascii > How about a compile-time option with BIG WARNING FLAGS so that ppp can be > run in client mode by non-superusers? > > Here's my situation: I don't run ppp in server mode, so the only member of > group network is my own account. And my machine isn't networked at the > moment (and when it is I could change the compilation option back). Same scenario as me, but ppp isn't the only thing that annoys me in this way. I circumvent all this with a small ``root'' program. It's like sudo without a password that checks for a given user id. When you don't have permission to do something, just prefix the whole thing with ``root''. > Ben > > "You have your mind on computers, it seems." > -- Brian , Don't _EVER_ lose your sense of humour.... --==_Exmh_-7650644120 Content-Type: application/octet-stream ; name="Makefile" Content-Description: Makefile Content-Disposition: attachment; filename="Makefile" # # Written by brian@awfulhak.org. This software's free. # # $Id: Makefile,v 1.4 1997/06/17 14:19:01 brian Exp $ # all: root GOD=brian root: Makefile cc -O -DGOD=\"$(GOD)\" -o root root.c chown root root chmod 4555 root --==_Exmh_-7650644120 Content-Type: application/octet-stream; name="root.c" Content-Description: root.c Content-Disposition: attachment; filename="root.c" /* * Written by brian@awfulhak.org. This software's free. * * $Id: root.c,v 1.3 1997/06/17 00:48:54 brian Exp $ */ #include #include #include int main(int argc, char **argv) { if (strcmp(getlogin(), GOD )) { fprintf(stderr, "Go away - you're not allowed to be God !\n"); return 1; } if (setuid(0)) { fprintf(stderr, "Can't become God :(\n"); return 2; } if (argc < 2) { char *sh; sh = getenv("SHELL"); if (!sh) sh = "/bin/sh"; execlp(sh, sh, NULL); } else execvp(argv[1], argv+1); perror("exec failed"); return 3; } --==_Exmh_-7650644120--