]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into firewall-fifteen
authorAlexander Marx <amarx@ipfire.org>
Tue, 1 Oct 2013 18:30:30 +0000 (20:30 +0200)
committerAlexander Marx <amarx@ipfire.org>
Tue, 1 Oct 2013 18:30:30 +0000 (20:30 +0200)
lfs/pakfire
src/misc-progs/wirelessctrl.c

index 11608b36d13cb2186d82e4da6b75cf2e8c6b36ea..6f90f89bb1379ef66f02f7e502ec546f934070b2 100644 (file)
@@ -54,7 +54,6 @@ md5 :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP)
        -mkdir -p /opt/pakfire/{db/{meta,lists,rootfiles,installed,core},etc,lib,tmp} \
                /var/log/pakfire /var/cache/pakfire
        cp -fRv $(DIR_SRC)/src/pakfire/* $(DIR_APP)
index 101661386aa8e3975f4d17dfc887010aa6a336d0..1f1b0f861e6a75913243938dd59482ee6328249e 100644 (file)
@@ -97,7 +97,7 @@ int main(void) {
        }
 
        /* restrict blue access tp the proxy port */
-       if (findkey(kv, "DROPPROXY", buffer) && strcmp(buffer,"off") == 0) {
+       if (findkey(kv, "DROPPROXY", buffer) && strcmp(buffer, "on") == 0) {
                /* Read the proxy values */
                if (!readkeyvalues(kv, CONFIG_ROOT "/proxy/settings") || !(findkey(kv, "PROXY_PORT", buffer))) {
                        fprintf(stderr, "Cannot read proxy settings\n");
@@ -111,7 +111,7 @@ int main(void) {
        }
 
        /* not allow blue to acces a samba server running on local fire*/
-       if(findkey(kv, "DROPSAMBA", buffer) && strcmp(buffer,"off")){
+       if (findkey(kv, "DROPSAMBA", buffer) && strcmp(buffer, "on") == 0) {
                snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p tcp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev);
                safe_system(command);
                snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev);
@@ -157,13 +157,13 @@ int main(void) {
        }
 
        /* with this rule you can disable the logging of the dropped wireless input packets*/
-       if (!findkey(kv, "DROPWIRELESSINPUT", buffer) || strcmp(buffer,"off") == 0) {
+       if (findkey(kv, "DROPWIRELESSINPUT", buffer) && strcmp(buffer, "on") == 0) {
                snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j LOG --log-prefix 'DROP_Wirelessinput'", blue_dev);
                safe_system(command);
        }
 
        /* with this rule you can disable the logging of the dropped wireless forward packets*/
-       if (!findkey(kv, "DROPWIRELESSFORWARD", buffer) || strcmp(buffer,"off") == 0) {
+       if (findkey(kv, "DROPWIRELESSFORWARD", buffer) && strcmp(buffer, "on") == 0) {
                snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -j LOG --log-prefix 'DROP_Wirelessforward'", blue_dev);
                safe_system(command);
        }