Browse code

add dconf for pe->catalog

aCaB authored on 2012/01/10 00:06:03
Showing 3 changed files
... ...
@@ -70,6 +70,7 @@ static struct dconf_module modules[] = {
70 70
     { "PE",	    "MEW",	    PE_CONF_MEW,	    1 },
71 71
     { "PE",	    "UPACK",	    PE_CONF_UPACK,	    1 },
72 72
     { "PE",	    "ASPACK",	    PE_CONF_ASPACK,	    1 },
73
+    { "PE",	    "CATALOG",	    PE_CONF_CATALOG,	    1 },
73 74
 
74 75
     { "ELF",	    NULL,	    0x1,		    1 },
75 76
 
... ...
@@ -59,6 +59,7 @@ struct cli_dconf {
59 59
 #define PE_CONF_MEW	    0x2000
60 60
 #define PE_CONF_UPACK	    0x4000
61 61
 #define PE_CONF_ASPACK	    0x8000
62
+#define PE_CONF_CATALOG	    0x10000
62 63
 
63 64
 /* Archive flags */
64 65
 #define ARCH_CONF_RAR	    0x1
... ...
@@ -2685,6 +2685,9 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1) {
2685 2685
     fmap_t *map = *ctx->fmap;
2686 2686
     SHA1Context sha1;
2687 2687
 
2688
+    if(!(DCONF & PE_CONF_CATALOG))
2689
+	return CL_EFORMAT;
2690
+
2688 2691
     if(fmap_readn(map, &e_magic, 0, sizeof(e_magic)) != sizeof(e_magic))
2689 2692
 	return CL_EFORMAT;
2690 2693