Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhonghuaren
fl-teachertool
fl_teachertool-iptables-path.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fl_teachertool-iptables-path.patch of Package fl-teachertool
diff -ur a/fl_teachertool.cxx b/fl_teachertool.cxx --- a/fl_teachertool.cxx 2009-04-05 20:32:56.000000000 +0530 +++ b/fl_teachertool.cxx 2009-04-05 20:37:19.000000000 +0530 @@ -921,7 +921,7 @@ } if (mommy->u_vector[x].net==false) { - system(("/sbin/iptables -D FLTT -m owner --uid-owner "+mommy->u_vector[x].uname+" -j DROP").c_str()); + system(("/usr/sbin/iptables -D FLTT -m owner --uid-owner "+mommy->u_vector[x].uname+" -j DROP").c_str()); mommy->u_vector[x].net=true; line = mommy->nameoutP->text(x+1); line[0]='-'; @@ -959,7 +959,7 @@ if (mommy->u_vector[x].net==true) { - system(("/sbin/iptables -A FLTT -m owner --uid-owner "+mommy->u_vector[x].uname+" -j DROP").c_str()); + system(("/usr/sbin/iptables -A FLTT -m owner --uid-owner "+mommy->u_vector[x].uname+" -j DROP").c_str()); mommy->u_vector[x].net=false; line = mommy->nameoutP->text(x+1); line[0]='X'; @@ -1740,32 +1740,32 @@ //load iptables owner module system("/sbin/modprobe ipt_owner"); //must check if chain FLTT already exists - if (system("/sbin/iptables -L | grep FLTT")) // returns 0 (false) for success + if (system("/usr/sbin/iptables -L | grep FLTT")) // returns 0 (false) for success { - system("/sbin/iptables -N FLTT"); //create new chain - system("/sbin/iptables -I OUTPUT 1 -p tcp --dport 80 -j FLTT"); //jump to FLTT chain for outgoing port 80 + system("/usr/sbin/iptables -N FLTT"); //create new chain + system("/usr/sbin/iptables -I OUTPUT 1 -p tcp --dport 80 -j FLTT"); //jump to FLTT chain for outgoing port 80 // note: do not use -o ethX switch (bondind, nonstandard config, proxies) if (squidon) { - system(("/sbin/iptables -I OUTPUT 1 -p tcp --dport "+proxport+" -j FLTT").c_str()); //jump to FLTT chain for proxy port + system(("/usr/sbin/iptables -I OUTPUT 1 -p tcp --dport "+proxport+" -j FLTT").c_str()); //jump to FLTT chain for proxy port } } else { //get rid of old rules and chain. Start from nothing to be sure. Need this in case program exits uncleanly - system("/sbin/iptables -F FLTT"); - system("/sbin/iptables -D OUTPUT -p tcp --dport 80 -j FLTT"); + system("/usr/sbin/iptables -F FLTT"); + system("/usr/sbin/iptables -D OUTPUT -p tcp --dport 80 -j FLTT"); if (squidon) { - system(("/sbin/iptables -D OUTPUT -p tcp --dport "+proxport+" -j FLTT").c_str()); + system(("/usr/sbin/iptables -D OUTPUT -p tcp --dport "+proxport+" -j FLTT").c_str()); } - system("/sbin/iptables -X FLTT"); + system("/usr/sbin/iptables -X FLTT"); - system("/sbin/iptables -N FLTT"); //create new chain - system("/sbin/iptables -I OUTPUT 1 -p tcp --dport 80 -j FLTT"); //jump to FLTT chain for outgoing port 80 + system("/usr/sbin/iptables -N FLTT"); //create new chain + system("/usr/sbin/iptables -I OUTPUT 1 -p tcp --dport 80 -j FLTT"); //jump to FLTT chain for outgoing port 80 if (squidon) { - system(("/sbin/iptables -I OUTPUT 1 -p tcp --dport "+proxport+" -j FLTT").c_str()); //jump to FLTT chain for proxy port + system(("/usr/sbin/iptables -I OUTPUT 1 -p tcp --dport "+proxport+" -j FLTT").c_str()); //jump to FLTT chain for proxy port } } @@ -1782,16 +1782,16 @@ NameWindow::~NameWindow() { if (stdsetup) { - system("/sbin/iptables -F FLTT"); + system("/usr/sbin/iptables -F FLTT"); - system("/sbin/iptables -D OUTPUT -p tcp --dport 80 -j FLTT"); + system("/usr/sbin/iptables -D OUTPUT -p tcp --dport 80 -j FLTT"); if (squidon) { - system(("/sbin/iptables -D OUTPUT -p tcp --dport "+proxport+" -j FLTT").c_str()); + system(("/usr/sbin/iptables -D OUTPUT -p tcp --dport "+proxport+" -j FLTT").c_str()); } - system("/sbin/iptables -X FLTT"); + system("/usr/sbin/iptables -X FLTT"); } vwin->hide(); @@ -2025,7 +2025,7 @@ //-------- who has Internet access http priviliges ostringstream oinetstream; - getstdout_ss(oinetstream, "/sbin/iptables -L FLTT|awk '/^DROP/ {print $9}'","Error: collecting firewall info"); + getstdout_ss(oinetstream, "/usr/sbin/iptables -L FLTT|awk '/^DROP/ {print $9}'","Error: collecting firewall info"); string noaccess_list(oinetstream.str()); for (unsigned int x=0;x<u_vector.size();x++) @@ -3091,7 +3091,7 @@ { if (nameoutP->selected(x) && u_vector[x-1].net==false) { - system(("/sbin/iptables -D FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); + system(("/usr/sbin/iptables -D FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); u_vector[x-1].net=true; line = nameoutP->text(x); if (line[0] == '@') //means text is colored with @C11 @@ -3121,7 +3121,7 @@ } else { - system("/sbin/iptables -F FLTT"); + system("/usr/sbin/iptables -F FLTT"); for (int x=1; x<=nameoutP->size(); x++) { if (u_vector[x-1].net==false) @@ -3181,7 +3181,7 @@ if (nameoutP->selected(x) && u_vector[x-1].net==true) { - system(("/sbin/iptables -A FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); + system(("/usr/sbin/iptables -A FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); u_vector[x-1].net=false; line = nameoutP->text(x); if (line[0] == '@') //means text is colored with @C11 @@ -3215,7 +3215,7 @@ { if (u_vector[x-1].net==true) { - system(("/sbin/iptables -A FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); + system(("/usr/sbin/iptables -A FLTT -m owner --uid-owner "+u_vector[x-1].uname+" -j DROP").c_str()); u_vector[x-1].net=false; line = nameoutP->text(x); if (line[0] == '@') //means text is colored with @C11
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor