exec.c (55145) | exec.c (55252) |
---|---|
1/*- 2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/ppp/exec.c 55145 1999-12-27 11:43:31Z brian $ | 26 * $FreeBSD: head/usr.sbin/ppp/exec.c 55252 1999-12-30 03:36:11Z brian $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <sys/un.h> 32 33#include <errno.h> 34#include <fcntl.h> --- 86 unchanged lines hidden (view full) --- 121 case -1: 122 log_Printf(LogPHASE, "Unable to create pipe for line exec: %s\n", 123 strerror(errno)); 124 break; 125 126 case 0: 127 close(fids[0]); 128 timer_TermService(); | 27 */ 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <sys/un.h> 32 33#include <errno.h> 34#include <fcntl.h> --- 86 unchanged lines hidden (view full) --- 121 case -1: 122 log_Printf(LogPHASE, "Unable to create pipe for line exec: %s\n", 123 strerror(errno)); 124 break; 125 126 case 0: 127 close(fids[0]); 128 timer_TermService(); |
129 setuid(geteuid()); | 129 setuid(ID0realuid()); |
130 131 switch (fork()) { 132 case 0: 133 break; 134 135 case -1: 136 log_Printf(LogPHASE, "Unable to fork to drop parent: %s\n", 137 strerror(errno)); --- 41 unchanged lines hidden --- | 130 131 switch (fork()) { 132 case 0: 133 break; 134 135 case -1: 136 log_Printf(LogPHASE, "Unable to fork to drop parent: %s\n", 137 strerror(errno)); --- 41 unchanged lines hidden --- |