Disabled cryptsetup
authormaniacikarus <maniacikarus@ipfire.org>
Fri, 15 May 2009 16:07:28 +0000 (18:07 +0200)
committermaniacikarus <maniacikarus@ipfire.org>
Fri, 15 May 2009 16:07:28 +0000 (18:07 +0200)
2nd try to fix updx bug

config/rootfiles/common/misc-progs
config/rootfiles/core/28/filelists/files
config/rootfiles/packages/cryptsetup-disabled [moved from config/rootfiles/packages/cryptsetup with 100% similarity]
config/updxlrator/download
doc/packages-list.txt
make.sh
src/misc-progs/Makefile
src/misc-progs/squidctrl.c
src/misc-progs/updxsetperms.c [new file with mode: 0644]

index 8e9fb31..4c4b9c7 100644 (file)
@@ -30,6 +30,7 @@ usr/local/bin/sshctrl
 usr/local/bin/syslogdctrl
 usr/local/bin/timectrl
 #usr/local/bin/tripwirectrl
+usr/local/bin/updxsetperms
 usr/local/bin/upnpctrl
 usr/local/bin/wirelessctrl
 #usr/local/bin/wlanapctrl
index b8ecd20..cde8b61 100644 (file)
@@ -37,3 +37,5 @@ srv/web/ipfire/cgi-bin/credits.cgi
 srv/web/ipfire/cgi-bin/backup.cgi
 srv/web/ipfire/cgi-bin/ids.cgi
 usr/local/bin/backupiso
+usr/local/bin/updxsetperms
+var/ipfire/updatexlrator/bin/download
index 2954870..6744d9c 100644 (file)
@@ -180,7 +180,7 @@ if ($_ == 0)
        &UPDXLT::setcachestatus("$repository/$vendorid/$uuid/checkup.log",time);
        &UPDXLT::setcachestatus("$repository/$vendorid/$uuid/access.log",time);
 
-       system("/usr/local/bin/squidctrl setperms");
+       system("/usr/local/bin/updxsetperms");
        system("chmod 775 $repository/$vendorid/$uuid/*");
 
        unlink ("$repository/download/$vendorid/$updatefile.info");
index 966d732..e9a2712 100644 (file)
@@ -74,7 +74,6 @@
 * coreutils-5.96
 * cpio-2.6
 * cpufrequtils-005
-* cryptsetup-1.0.6
 * cups-1.3.9
 * curl-7.19.4
 * cyrus-imapd-2.2.12
diff --git a/make.sh b/make.sh
index 1fb884a..8ba3cdb 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -595,7 +595,7 @@ buildipfire() {
   ipfiremake netcat
   ipfiremake 7zip
   ipfiremake lynis
-  ipfiremake cryptsetup
+  #ipfiremake cryptsetup
   ipfiremake splix
   ipfiremake streamripper
   ipfiremake sshfs
index 66c8677..d4114a0 100755 (executable)
@@ -33,15 +33,17 @@ SUID_PROGS = setdmzholes setportfw setxtaccess \
        redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
        smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
        setaliases
+SUID_UPDX = updxsetperms
 
 install : all
        install -m 755  $(PROGS) /usr/local/bin
        install -m 4750 -g nobody $(SUID_PROGS) /usr/local/bin
+       install -m 4750 -g squid $(SUID_UPDX) /usr/local/bin
 
-all : $(PROGS) $(SUID_PROGS)
+all : $(PROGS) $(SUID_PROGS) $(SUID_UPDX)
 
 clean : 
-       -rm -f $(PROGS) $(SUID_PROGS) *.o core
+       -rm -f $(PROGS) $(SUID_PROGS) $(SUID_UPDX) *.o core
 
 ######
 
@@ -55,6 +57,8 @@ $(SUID_PROGS): setuid.o
 
 $(PROGS): setuid.o
 
+$(SUID_UPDX): setuid.o
+
 logwatch: logwatch.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ logwatch.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
@@ -148,3 +152,5 @@ wlanapctrl: wlanapctrl.c setuid.o ../install+setup/libsmooth/varval.o
 setaliases: setaliases.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ setaliases.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
+updxsetperms: updxsetperms.c setuid.o ../install+setup/libsmooth/varval.o
+       $(COMPILE) -I../install+setup/libsmooth/ updxsetperms.c setuid.o ../install+setup/libsmooth/varval.o -o $@
index 6493309..b1b9067 100644 (file)
@@ -38,8 +38,6 @@ int main(int argc, char *argv[]) {
                safe_system("ln -fs ../init.d/squid /etc/rc.d/rc6.d/K00squid >/dev/null 2>&1");
        } else if (strcmp(argv[1], "disable") == 0) {
                safe_system("rm -f /etc/rc.d/rc*.d/*squid >/dev/null 2>&1");
-       } else if (strcmp(argv[1], "setperms") == 0) {
-               safe_system("/etc/rc.d/init.d/squid setperms");
        } else {
                fprintf(stderr, "\nBad argument given.\n\nsquidctrl (start|stop|restart|flush|reconfigure|setperms)\n\n");
                exit(1);
diff --git a/src/misc-progs/updxsetperms.c b/src/misc-progs/updxsetperms.c
new file mode 100644 (file)
index 0000000..be7d0e1
--- /dev/null
@@ -0,0 +1,28 @@
+/* This file is part of the IPFire Firewall.
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence.  See the file COPYING for details.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "setuid.h"
+
+int main(int argc, char *argv[]) {
+
+       if (!(initsetuid()))
+               exit(1);
+
+       if (argc > 1) {
+               fprintf(stderr, "\nNo argument should be given.\n");
+               exit(1);
+       }
+
+       safe_system("/etc/rc.d/init.d/squid setperms");
+       return 0;
+}