summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/os.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-11 22:58:14 +0000
committerbrian <brian@FreeBSD.org>1997-11-11 22:58:14 +0000
commit0c64913a0fbb1bccd7f0787213eab0ce73ae6968 (patch)
tree2bb96c72d2185278aecf865790605846f14ac045 /usr.sbin/ppp/os.c
parent9f4a5b39505ed832de088509c172e885813ffd87 (diff)
downloadFreeBSD-src-0c64913a0fbb1bccd7f0787213eab0ce73ae6968.zip
FreeBSD-src-0c64913a0fbb1bccd7f0787213eab0ce73ae6968.tar.gz
Finish the security improvements:
o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
Diffstat (limited to 'usr.sbin/ppp/os.c')
-rw-r--r--usr.sbin/ppp/os.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c
index 91d7435..dfe1831 100644
--- a/usr.sbin/ppp/os.c
+++ b/usr.sbin/ppp/os.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: os.c,v 1.30 1997/11/08 00:28:10 brian Exp $
+ * $Id: os.c,v 1.31 1997/11/09 06:22:44 brian Exp $
*
*/
#include <sys/param.h>
@@ -218,8 +218,8 @@ OsLinkup()
LogPrintf(LogLCP, "OsLinkup: %s\n", s);
if (SelectSystem(inet_ntoa(IpcpInfo.want_ipaddr), LINKUPFILE) < 0) {
- if (dstsystem) {
- if (SelectSystem(dstsystem, LINKUPFILE) < 0)
+ if (GetLabel()) {
+ if (SelectSystem(GetLabel(), LINKUPFILE) < 0)
SelectSystem("MYADDR", LINKUPFILE);
} else
SelectSystem("MYADDR", LINKUPFILE);
@@ -248,12 +248,11 @@ OsLinkdown()
FsmDown(&IpcpFsm); /* IPCP must come down */
FsmDown(&CcpFsm); /* CCP must come down */
- if (!(mode & MODE_AUTO))
- DeleteIfRoutes(0);
+ DeleteIfRoutes(0);
linkup = 0;
if (SelectSystem(s, LINKDOWNFILE) < 0) {
- if (dstsystem) {
- if (SelectSystem(dstsystem, LINKDOWNFILE) < 0)
+ if (GetLabel()) {
+ if (SelectSystem(GetLabel(), LINKDOWNFILE) < 0)
SelectSystem("MYADDR", LINKDOWNFILE);
} else
SelectSystem("MYADDR", LINKDOWNFILE);
@@ -268,7 +267,7 @@ OsInterfaceDown(int final)
int s;
OsLinkdown();
- if (!final && (mode & MODE_AUTO)) /* We still want interface alive */
+ if (!final && (mode & MODE_DAEMON)) /* We still want interface alive */
return (0);
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) {
OpenPOWER on IntegriCloud