flashpolicyd.rb

Path: flashpolicyd.rb
Last Update: Thu Sep 02 15:27:37 +0000 2010

Synopsis

flashpolicyd: Serve Adobe Flash Policy XML files to clients

Description

Server to serve up flash policy xml files for flash clients since player version 9,0,124,0. (Player 9 update 3)

See www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html for more information, this needs to run as root since it should listen on port 843 which on a unix machine needs root to listen on that socket.

Signals

  • USR1 signal prints a single line stat message, during normal running this stat will be printed every 30 minutes by default, settable using —logfreq
  • USR2 signal dumps the current threads and their statusses
  • HUP signal will toggle debug mode which will print more lines in the log file
  • TERM signal will exit the process closing all the sockets

Usage

flashpolicyd [OPTIONS]

—help, -h:

  Show Help

—verbose

  Turns on verbose logging to log file - can also be turned on and off at runtime using -HUP signals

—xml

  XML File to Serve to clients, read at startup only

—timeout, -t

  If a request does not complete within this time, close the socket,
  default is 10 seconds

—logfreq, -l

  How often to log stats to log file, default 1800 seconds

—logfile

  Where to write log lines too

Download and Further Information

Latest versions, installation documentation and other related info can be found at www.devco.net/pubwiki/FlashPolicyd

Author

R.I.Pienaar <rip@devco.net>

Required files

socket   logger   ostruct   thread   timeout   getoptlong   rdoc/ri/ri_paths   rdoc/usage   etc  

Methods

Public Instance methods

Goes into the background, chdir‘s to /tmp, and redirect all input/output to null Beginning Ruby p. 489-490

Returns an array of days, hrs, mins and seconds given a second figure The Ruby Way - Page 227

[Validate]