From 9fecb4e63f454006893702d9c74e7ab80d3cc1c8 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Thu, 13 Nov 1997 17:31:52 +0000 Subject: [PATCH] Use seteuid() instead of setreuid(). The setreuid() page says seteuid is better ! --- usr.sbin/ppp/id.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c index c37e5fe9429..4a3d6875ea4 100644 --- a/usr.sbin/ppp/id.c +++ b/usr.sbin/ppp/id.c @@ -1,5 +1,5 @@ /* - * $Id: defs.c,v 1.1 1997/10/26 01:02:30 brian Exp $ + * $Id: id.c,v 1.1 1997/11/09 06:22:40 brian Exp $ */ #include @@ -39,8 +39,8 @@ ID0init() static void ID0setuser() { - if (setreuid(euid, uid) == -1) { - LogPrintf(LogERROR, "ID0setuser: Unable to setreuid!\n"); + if (seteuid(uid) == -1) { + LogPrintf(LogERROR, "ID0setuser: Unable to seteuid!\n"); Cleanup(EX_NOPERM); } } @@ -54,8 +54,8 @@ ID0realuid() static void ID0set0() { - if (setreuid(uid, euid) == -1) { - LogPrintf(LogERROR, "ID0set0: Unable to setreuid!\n"); + if (seteuid(euid) == -1) { + LogPrintf(LogERROR, "ID0set0: Unable to seteuid!\n"); Cleanup(EX_NOPERM); } }