svn commit: r235838 - in user/des/fbce: . lib

Dag-Erling Smorgrav des at FreeBSD.org
Wed May 23 15:10:41 UTC 2012


Author: des
Date: Wed May 23 15:10:41 2012
New Revision: 235838
URL: http://svn.freebsd.org/changeset/base/235838

Log:
  Use per-user session caches.  This makes it possible to run scripts such
  as fbce_test.pl or fbce_user.pl as yourself while the system is running
  as www:www, since the session cache is created at startup rather than at
  first use.
  
  Note that per-process session caches are not a good idea unless some sort
  of session affinity is in place.

Modified:
  user/des/fbce/fbce.conf
  user/des/fbce/lib/FBCE.pm

Modified: user/des/fbce/fbce.conf
==============================================================================
--- user/des/fbce/fbce.conf	Wed May 23 15:06:13 2012	(r235837)
+++ user/des/fbce/fbce.conf	Wed May 23 15:10:41 2012	(r235838)
@@ -26,6 +26,6 @@ title = 2012 FreeBSD Core Team Election
   expires = 1800
   cookie_expires = 0
   # cookie_secure = true
-  # storage = /var/run/fbce.cache
+  storage = /tmp/fbce.__UID__/session-cache
   cache_size = 8m
 </Plugin::Session>

Modified: user/des/fbce/lib/FBCE.pm
==============================================================================
--- user/des/fbce/lib/FBCE.pm	Wed May 23 15:06:13 2012	(r235837)
+++ user/des/fbce/lib/FBCE.pm	Wed May 23 15:10:41 2012	(r235838)
@@ -26,6 +26,12 @@ $VERSION = eval $VERSION;
 __PACKAGE__->config(
     name => 'FBCE',
     view => 'HTML',
+    'Plugin::ConfigLoader' => {
+	substitutions => {
+	    UID => sub { $< },
+	    PID => sub { $$ },
+	},
+    },
     'Plugin::Static::Simple' => {
 	dirs => [ 'static' ],
     },


More information about the svn-src-user mailing list