diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-01 15:27:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-01 15:27:30 +0000 |
commit | ecd93961665fe972cae803dbba2b5fb21e608256 (patch) | |
tree | db630c8dd425df4c54c6d80f0b6e4c1d5df7e04f /sbin | |
parent | edbbae34be5abfdacdcf17e49eda7fb16054efac (diff) |
lose setuid
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/restore/Makefile | 5 | ||||
-rw-r--r-- | sbin/restore/main.c | 8 | ||||
-rw-r--r-- | sbin/restore/tape.c | 6 |
3 files changed, 3 insertions, 16 deletions
diff --git a/sbin/restore/Makefile b/sbin/restore/Makefile index 13b2f32e72f..b4d614196c0 100644 --- a/sbin/restore/Makefile +++ b/sbin/restore/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 1996/06/23 14:32:13 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 1996/09/01 15:27:28 deraadt Exp $ # $NetBSD: Makefile,v 1.14 1995/03/18 14:59:39 cgd Exp $ PROG= restore @@ -6,9 +6,6 @@ LINKS= ${BINDIR}/restore ${BINDIR}/rrestore CFLAGS+=-DRRESTORE SRCS= main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c \ dumprmt.c -BINOWN= root -BINGRP= tty -BINMODE=6555 MAN= restore.8 MLINKS+=restore.8 rrestore.8 .PATH: ${.CURDIR}/../dump diff --git a/sbin/restore/main.c b/sbin/restore/main.c index 363f1e3fba9..f886a4cfd20 100644 --- a/sbin/restore/main.c +++ b/sbin/restore/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/03/21 00:16:29 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.4 1996/09/01 15:27:29 deraadt Exp $ */ /* $NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $ */ /* @@ -78,8 +78,6 @@ ino_t maxino; time_t dumptime; time_t dumpdate; FILE *terminal; -uid_t uid; /* real uid */ -uid_t euid; /* effective uid */ static void obsolete __P((int *, char **[])); static void usage __P((void)); @@ -95,10 +93,6 @@ main(argc, argv) char *symtbl = "./restoresymtable"; char *p, name[MAXPATHLEN]; - uid = getuid(); - euid = geteuid(); - (void) seteuid(uid); - if (argc < 2) usage(); diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 6ca315c651a..4be709de8c8 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.2 1996/03/21 00:16:32 niklas Exp $ */ +/* $OpenBSD: tape.c,v 1.3 1996/09/01 15:27:29 deraadt Exp $ */ /* $NetBSD: tape.c,v 1.20 1996/03/15 22:39:41 scottr Exp $ */ /* @@ -91,9 +91,6 @@ int oldinofmt; /* old inode format conversion required */ int Bcvt; /* Swap Bytes (for CCI or sun) */ static int Qcvt; /* Swap quads (for sun) */ -extern uid_t uid; /* real uid */ -extern uid_t euid; /* effective uid */ - #define FLUSHTAPEBUF() blkcnt = ntrec + 1 static void accthdr __P((struct s_spcl *)); @@ -155,7 +152,6 @@ setinput(source) } pipein++; } - (void) setuid(uid); /* rmthost() is the only reason to be setuid */ (void) strcpy(magtape, source); } |