Quote:
|
kiwis out there that also 'brake for penguines'
|
/me chuckles
Got that wrong mate, we accelerate with penguin-power ;)
Quote:
|
what sort of daemon could be used for shutting down ports?
|
Didn't spend too much time thinking about it ... the fastest
way I can think of (least effort) would be a shell-script
that is called by cron on a per-minute basis, does a
ps -A u, gather user's processes that match the naming
conventions of your temporary names, generate a tmp-file
with the users name (so it doesn't get triggered twice),
spawn a new process, set a sleep for the amount of time
that you setup in the database for that particular user,
after that ran out delete the user from the database, and
lock the screen :) or run another script that modifies iptables
so it only allows port 5432 queries ;)
The disadvantage of this solution is that user can't top-up
his time easily (could be changed easily enough, though,
just make the spawned job query the database in intervals
to see whether the time has changed)
Cheers,
Tink
p.s.: there's a bunch of solutions out there already ;)
http://freshmeat.net/search/?q=inter...ction=projects