remove non-working setuid option
authorBrendan O'Dea <bod@optus.net>
Thu, 27 Apr 2006 14:37:27 +0000 (14:37 +0000)
committerBrendan O'Dea <bod@optus.net>
Thu, 27 Apr 2006 14:37:27 +0000 (14:37 +0000)
Changes
Docs/startup-config.5
etc/startup-config.default
l2tpns.c
l2tpns.h
l2tpns.spec

diff --git a/Changes b/Changes
index 3c7c124..c920f8c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,8 @@
-* Thu Apr 27 2006 Brendan O'Dea <bod@optus.net> 2.2.0
+* Fri Apr 28 2006 Brendan O'Dea <bod@optus.net> 2.2.0
 - Only poll clifd if successfully bound.
 - Add "Practical VPNs" document from Liran Tal as Docs/vpn .
 - Add Multilink support from Khaled Al Hamwi.
+- Remove non-working setuid option.
 
 * Tue Apr 18 2006 Brendan O'Dea <bod@optus.net> 2.1.18
 - Don't shutdown on TerminateReq, wait for CDN.
index d0036e8..07fc79c 100644 (file)
@@ -2,7 +2,7 @@
 .de Id
 .ds Dt \\$4 \\$5
 ..
-.Id $Id: startup-config.5,v 1.16 2006-04-27 09:53:50 bodea Exp $
+.Id $Id: startup-config.5,v 1.17 2006-04-27 14:38:14 bodea Exp $
 .TH STARTUP-CONFIG 5 "\*(Dt" L2TPNS "File Formats and Conventions"
 .SH NAME
 startup\-config \- configuration file for l2tpns
@@ -152,10 +152,6 @@ session requires two buckets (in and out).
 If set to a directory, then every 5 minutes the current usage for
 every connected use will be dumped to a file in this directory.
 .TP
-.B setuid
-After starting up and binding the interface, change UID to this.  This
-doesn't work properly.
-.TP
 .B dump_speed
 If set to true, then the current bandwidth utilization will be logged
 every second.  Even if this is disabled, you can see this information
index 4d77482..c448de2 100644 (file)
@@ -62,9 +62,6 @@ set accounting_dir "/var/run/l2tpns/acct"
 # Number of buckets to allocate for throttling
 #set throttle_buckets 3000
 
-# If set to anything other than 0, setuid when initialised.
-#set setuid 0
-
 # If set to true, dump current speed to stderr every second
 #set dump_speed no
 
index b373955..3d789a5 100644 (file)
--- a/l2tpns.c
+++ b/l2tpns.c
@@ -4,7 +4,7 @@
 // Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
 // vim: sw=8 ts=8
 
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.163 2006-04-27 09:53:49 bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.164 2006-04-27 14:37:27 bodea Exp $";
 
 #include <arpa/inet.h>
 #include <assert.h>
@@ -134,7 +134,6 @@ config_descriptt config_values[] = {
        CONFIG("throttle_speed", rl_rate, UNSIGNED_LONG),
        CONFIG("throttle_buckets", num_tbfs, INT),
        CONFIG("accounting_dir", accounting_dir, STRING),
-       CONFIG("setuid", target_uid, INT),
        CONFIG("dump_speed", dump_speed, BOOL),
        CONFIG("multi_read_count", multi_read_count, INT),
        CONFIG("scheduler_fifo", scheduler_fifo, BOOL),
@@ -4472,10 +4471,6 @@ int main(int argc, char *argv[])
                        LOG(0, 0, 0, "Can't lock pages: %s\n", strerror(errno));
        }
 
-       // Drop privileges here
-       if (config->target_uid > 0 && geteuid() == 0)
-               setuid(config->target_uid);
-
        mainloop();
 
        /* remove plugins (so cleanup code gets run) */
index 0701e0c..54bbed8 100644 (file)
--- a/l2tpns.h
+++ b/l2tpns.h
@@ -1,5 +1,5 @@
 // L2TPNS Global Stuff
-// $Id: l2tpns.h,v 1.115 2006-04-27 09:53:50 bodea Exp $
+// $Id: l2tpns.h,v 1.116 2006-04-27 14:37:28 bodea Exp $
 
 #ifndef __L2TPNS_H__
 #define __L2TPNS_H__
@@ -654,7 +654,6 @@ typedef struct
        in_addr_t       peer_address;
        int             send_garp;                      // Set to true to garp for vip address on startup
 
-       int             target_uid;
        int             dump_speed;
        char            plugins[64][MAXPLUGINS];
        char            old_plugins[64][MAXPLUGINS];
index 4ed564c..c46d3ae 100644 (file)
@@ -43,5 +43,5 @@ rm -rf %{buildroot}
 %attr(644,root,root) /usr/share/man/man[58]/*
 
 %changelog
-* Thu Apr 27 2006 Brendan O'Dea <bod@optus.net> 2.2.0-1
+* Fri Apr 28 2006 Brendan O'Dea <bod@optus.net> 2.2.0-1
 - 2.2.0 release, see /usr/share/doc/l2tpns-2.2.0/Changes