bundle.c (55146) | bundle.c (55252) |
---|---|
1/*- 2 * Copyright (c) 1998 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) 1998 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/bundle.c 55146 1999-12-27 11:54:57Z brian $ | 26 * $FreeBSD: head/usr.sbin/ppp/bundle.c 55252 1999-12-30 03:36:11Z brian $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <netinet/in.h> 32#include <net/if.h> 33#include <net/if_tun.h> /* For TUNSIFMODE & TUNSLMODE */ 34#include <arpa/inet.h> --- 1742 unchanged lines hidden (view full) --- 1777 close(fd); 1778 /* 1779 * Reap the intermediate process. As we're not exiting but the 1780 * intermediate is, we don't want it to become defunct. 1781 */ 1782 waitpid(pid, &status, 0); 1783 /* Tweak our process arguments.... */ 1784 ID0setproctitle("session owner"); | 27 */ 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <netinet/in.h> 32#include <net/if.h> 33#include <net/if_tun.h> /* For TUNSIFMODE & TUNSLMODE */ 34#include <arpa/inet.h> --- 1742 unchanged lines hidden (view full) --- 1777 close(fd); 1778 /* 1779 * Reap the intermediate process. As we're not exiting but the 1780 * intermediate is, we don't want it to become defunct. 1781 */ 1782 waitpid(pid, &status, 0); 1783 /* Tweak our process arguments.... */ 1784 ID0setproctitle("session owner"); |
1785 setuid(geteuid()); | 1785 setuid(ID0realuid()); |
1786 /* 1787 * Hang around for a HUP. This should happen as soon as the 1788 * ppp that we passed our ctty descriptor to closes it. 1789 * NOTE: If this process dies, the passed descriptor becomes 1790 * invalid and will give a select() error by setting one 1791 * of the error fds, aborting the other ppp. We don't 1792 * want that to happen ! 1793 */ --- 149 unchanged lines hidden --- | 1786 /* 1787 * Hang around for a HUP. This should happen as soon as the 1788 * ppp that we passed our ctty descriptor to closes it. 1789 * NOTE: If this process dies, the passed descriptor becomes 1790 * invalid and will give a select() error by setting one 1791 * of the error fds, aborting the other ppp. We don't 1792 * want that to happen ! 1793 */ --- 149 unchanged lines hidden --- |