PacketFence - BTS - PacketFence
View Issue Details
0001424PacketFenceinlinepublic2012-04-16 12:312012-10-19 10:14
obilodeau 
 
highmajorrandom
resolvedfixed 
 
3.6.03.6.0 
3e4cf73908019527f60785aa1ac2cba7d260bd86
0001424: obtaining a node's current mark fails from non-root
When the captive portal tries to re-evaluate the posture of a node, it does so from a pf uid process.

Turns out that fetching firewall rules w/o root fails but what made it worse is that IPTables::ChainMgr instead of letting us know it failed is returning the last temporary file generated by root (at least in ipt_exec_style 'system' mode). Since temporary file names are predictable and world-readable, it is possible for the root user to write the temp file and to have a non-root read it. I'll check to report upstream.

I'll try the other mode of operations for ChainMgr and see if they still badly report permission problems. We might have to force temp files to be appended with a pid and/or randomness or even generate their names through an empty open (which is perl's way to do mktemp).

Then, we'll need to ensure that get_mark... is always run in a privileged mode either through a pf password-less sudo or by adding a hook into bin/pfcmd. This might be delayed if our 'app server' model moves along quickly and we'll just push it as a WebService right there.
No tags attached.
has duplicate 0001522closed obilodeau Redirect does not work after login in inline mode, access delayed or fails afterwards. 
Issue History
2012-04-16 12:31obilodeauNew Issue
2012-04-16 12:31obilodeauStatusnew => assigned
2012-04-16 12:31obilodeauAssigned To => obilodeau
2012-08-28 09:05obilodeauRelationship addedhas duplicate 0001522
2012-08-28 09:07obilodeauNote Added: 0002976
2012-10-11 09:00fgaudreaultgit revision => 3e4cf73908019527f60785aa1ac2cba7d260bd86
2012-10-11 09:00fgaudreaultNote Added: 0003116
2012-10-11 09:00fgaudreaultStatusassigned => resolved
2012-10-11 09:00fgaudreaultFixed in Version => devel
2012-10-11 09:00fgaudreaultResolutionopen => fixed
2012-10-19 10:14fgaudreaultAssigned Toobilodeau =>
2012-10-19 10:14fgaudreaultFixed in Versiondevel => 3.6.0
2012-10-19 10:14fgaudreaultTarget Version+1 => 3.6.0

Notes
(0002976)
obilodeau   
2012-08-28 09:07   
The feature/ipset branch apparently fixes that issue. Review is on going: https://github.com/inverse-inc/packetfence/pull/41 [^]
(0003116)
fgaudreault   
2012-10-11 09:00   
Fixed in Devel for CentOS6/Debian. Cannot fix for RHEL/CentOS 5