patch-2.1.100 linux/drivers/net/ppp.c

Next file: linux/drivers/net/sdla_fr.c
Previous file: linux/drivers/net/ipddp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
@@ -8,7 +8,7 @@
  *  Dynamic PPP devices by Jim Freeman <jfree@caldera.com>.
  *  ppp_tty_receive ``noisy-raise-bug'' fixed by Ove Ewerlid <ewerlid@syscon.uu.se>
  *
- *  ==FILEVERSION 980319==
+ *  ==FILEVERSION 980501==
  *
  *  NOTE TO MAINTAINERS:
  *     If you modify this file at all, please set the number above to the
@@ -107,8 +107,10 @@
 #define PPP_LQR 0xc025	/* Link Quality Reporting Protocol */
 #endif
 
+#ifdef CONFIG_MODULES
 static int ppp_register_compressor (struct compressor *cp);
 static void ppp_unregister_compressor (struct compressor *cp);
+#endif
 
 /*
  * Local functions
@@ -2279,7 +2281,7 @@
 /*
  * The user must have an euid of root to do these requests.
  */
-	if (!suser ())
+	if (!capable(CAP_NET_ADMIN))
 		return -EPERM;
 /*
  * Set the MRU value
@@ -3210,6 +3212,7 @@
 	return (struct compressor *) 0;
 }
 
+#ifdef CONFIG_MODULES
 static int ppp_register_compressor (struct compressor *cp)
 {
 	struct compressor_link *new;
@@ -3261,6 +3264,7 @@
 	}
 	restore_flags(flags);
 }
+#endif
 
 /*************************************************************
  * Module support routines

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov