FreeBSD Bugzilla – Attachment 240282 Details for
Bug 269717
security/0d1n: fix build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
security/0d1n: fix build
0001-security-0d1n-fix-build.patch (text/plain), 8.89 KB, created by
Robert Clausecker
on 2023-02-20 13:08:34 UTC
(
hide
)
Description:
security/0d1n: fix build
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2023-02-20 13:08:34 UTC
Size:
8.89 KB
patch
obsolete
>From d01287bd5e547a009ff07a55ae06ac033b5356b9 Mon Sep 17 00:00:00 2001 >From: Robert Clausecker <fuz@FreeBSD.org> >Date: Mon, 20 Feb 2023 13:46:34 +0100 >Subject: [PATCH] security/0d1n: fix build > > - convert static REINPLACE_CMD to patch files as per policy > - remove remaining <alloca.h> uses > - patch getopt_long use on targets where char is unsigned > - work around missing __GNUC_PREREQ macro > - fix other missing includes > - update pkg-plist to what the maintainer intended to pack > - patch /opt/0d1n to ${DATADIR} in the relevant files > >Fixes: 88dd085ff7851bb2906039d97a81857fe6d8b2e3 >Approved by: portmgr (build fix) >Approved by: ... (mentor) >--- > security/0d1n/Makefile | 11 +++++--- > .../patch-0d1n__viewer_lib_krypton_krypton.c | 14 ++++++++++ > ...atch-0d1n__viewer_lib_krypton_src_ktypes.h | 14 ++++++++++ > security/0d1n/files/patch-src_0d1n.c | 12 ++++++++ > .../0d1n/files/patch-src_headers_file__ops.h | 10 +++++++ > .../0d1n/files/patch-src_headers_results.h | 10 +++++++ > .../0d1n/files/patch-src_headers_spider.h | 10 +++++++ > security/0d1n/files/patch-src_mem__ops.c | 11 ++++++++ > security/0d1n/files/patch-src_opt__extract.c | 11 ++++++++ > security/0d1n/files/patch-src_strsec.c | 15 ++++++++++ > security/0d1n/pkg-plist | 28 +++++++++++++++++++ > 11 files changed, 142 insertions(+), 4 deletions(-) > create mode 100644 security/0d1n/files/patch-0d1n__viewer_lib_krypton_krypton.c > create mode 100644 security/0d1n/files/patch-0d1n__viewer_lib_krypton_src_ktypes.h > create mode 100644 security/0d1n/files/patch-src_0d1n.c > create mode 100644 security/0d1n/files/patch-src_headers_file__ops.h > create mode 100644 security/0d1n/files/patch-src_headers_results.h > create mode 100644 security/0d1n/files/patch-src_headers_spider.h > create mode 100644 security/0d1n/files/patch-src_mem__ops.c > create mode 100644 security/0d1n/files/patch-src_opt__extract.c > create mode 100644 security/0d1n/files/patch-src_strsec.c > create mode 100644 security/0d1n/pkg-plist > >diff --git a/security/0d1n/Makefile b/security/0d1n/Makefile >index 38311ba7bc3e..0814f54534ff 100644 >--- a/security/0d1n/Makefile >+++ b/security/0d1n/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= 0d1n > PORTVERSION= 3.8 >+PORTREVISION= 1 > CATEGORIES= security > > MAINTAINER= zackj901@yandex.com >@@ -14,14 +15,16 @@ USE_GITHUB= yes > GH_ACCOUNT= CoolerVoid > GH_TAGNAME= OdinV38 > >-PLIST_FILES= bin/0d1n > PORTDOCS= README.txt > > OPTIONS_DEFINE= DOCS > >-post-patch: >- @${REINPLACE_CMD} -e '/^#include <alloca\.h>/d' \ >- ${WRKSRC}/src/headers/spider.h ${WRKSRC}/src/headers/results.h >+pre-configure: >+ ${REINPLACE_CMD} -e 's,/opt/0d1n,${DATADIR},g' \ >+ ${WRKSRC}/src/headers/file_ops.h \ >+ ${WRKSRC}/src/file_ops.c \ >+ ${WRKSRC}/src/opt_extract.c \ >+ ${WRKSRC}/src/results.c > > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin >diff --git a/security/0d1n/files/patch-0d1n__viewer_lib_krypton_krypton.c b/security/0d1n/files/patch-0d1n__viewer_lib_krypton_krypton.c >new file mode 100644 >index 000000000000..614998607019 >--- /dev/null >+++ b/security/0d1n/files/patch-0d1n__viewer_lib_krypton_krypton.c >@@ -0,0 +1,14 @@ >+--- 0d1n_viewer/lib/krypton/krypton.c.orig 2023-02-20 12:36:21 UTC >++++ 0d1n_viewer/lib/krypton/krypton.c >+@@ -112,11 +112,6 @@ typedef struct { >+ #define NS_INTERNAL >+ #endif >+ >+-/* C99 and later requires alloca.h. */ >+-#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199900L >+-#include <alloca.h> >+-#endif >+- >+ #include <assert.h> >+ #include <ctype.h> >+ #include <errno.h> >diff --git a/security/0d1n/files/patch-0d1n__viewer_lib_krypton_src_ktypes.h b/security/0d1n/files/patch-0d1n__viewer_lib_krypton_src_ktypes.h >new file mode 100644 >index 000000000000..4f7527461d5f >--- /dev/null >+++ b/security/0d1n/files/patch-0d1n__viewer_lib_krypton_src_ktypes.h >@@ -0,0 +1,14 @@ >+--- 0d1n_viewer/lib/krypton/src/ktypes.h.orig 2023-02-20 12:36:40 UTC >++++ 0d1n_viewer/lib/krypton/src/ktypes.h >+@@ -18,11 +18,6 @@ >+ #define NS_INTERNAL >+ #endif >+ >+-/* C99 and later requires alloca.h. */ >+-#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199900L >+-#include <alloca.h> >+-#endif >+- >+ #include <assert.h> >+ #include <ctype.h> >+ #include <errno.h> >diff --git a/security/0d1n/files/patch-src_0d1n.c b/security/0d1n/files/patch-src_0d1n.c >new file mode 100644 >index 000000000000..1ebac768a042 >--- /dev/null >+++ b/security/0d1n/files/patch-src_0d1n.c >@@ -0,0 +1,12 @@ >+--- src/0d1n.c.orig 2023-02-20 12:38:21 UTC >++++ src/0d1n.c >+@@ -62,8 +62,7 @@ main (int argc, char ** argv) >+ /* remove comment to test the patch >+ */ >+ #ifdef __GNUC__ >+-# if __GNUC_PREREQ(10,0) >+- >++# if __GNUC__ >= 10 >+ scan_gcc_new(); >+ # else >+ scan_gcc_old(); >diff --git a/security/0d1n/files/patch-src_headers_file__ops.h b/security/0d1n/files/patch-src_headers_file__ops.h >new file mode 100644 >index 000000000000..d21f5b088ddc >--- /dev/null >+++ b/security/0d1n/files/patch-src_headers_file__ops.h >@@ -0,0 +1,10 @@ >+--- src/headers/file_ops.h.orig 2023-02-20 12:35:55 UTC >++++ src/headers/file_ops.h >+@@ -12,7 +12,6 @@ >+ #include <stdlib.h> >+ #include <unistd.h> >+ #include <errno.h> >+-#include <alloca.h> >+ #include "opt_extract.h" >+ >+ void end_datatable(char * path); >diff --git a/security/0d1n/files/patch-src_headers_results.h b/security/0d1n/files/patch-src_headers_results.h >new file mode 100644 >index 000000000000..6f0d7a8b9825 >--- /dev/null >+++ b/security/0d1n/files/patch-src_headers_results.h >@@ -0,0 +1,10 @@ >+--- src/headers/results.h.orig 2023-02-20 12:35:39 UTC >++++ src/headers/results.h >+@@ -4,7 +4,6 @@ >+ #include <string.h> >+ #include <stdlib.h> >+ #include <stdbool.h> >+-#include <alloca.h> >+ #include <unistd.h> >+ #include <sys/stat.h> >+ #include <time.h> >diff --git a/security/0d1n/files/patch-src_headers_spider.h b/security/0d1n/files/patch-src_headers_spider.h >new file mode 100644 >index 000000000000..7a9907e410c4 >--- /dev/null >+++ b/security/0d1n/files/patch-src_headers_spider.h >@@ -0,0 +1,10 @@ >+--- src/headers/spider.h.orig 2023-02-20 12:36:07 UTC >++++ src/headers/spider.h >+@@ -4,7 +4,6 @@ >+ #include <string.h> >+ #include <stdlib.h> >+ #include <stdbool.h> >+-#include <alloca.h> >+ #include <unistd.h> >+ #include <sys/stat.h> >+ #include <time.h> >diff --git a/security/0d1n/files/patch-src_mem__ops.c b/security/0d1n/files/patch-src_mem__ops.c >new file mode 100644 >index 000000000000..6eaea0440ca3 >--- /dev/null >+++ b/security/0d1n/files/patch-src_mem__ops.c >@@ -0,0 +1,11 @@ >+--- src/mem_ops.c.orig 2023-02-20 12:57:16 UTC >++++ src/mem_ops.c >+@@ -17,7 +17,7 @@ static void * >+ xmalloc_fatal(size_t size) >+ { >+ >+- DEBUG("\n Memory FAILURE...\n size dbg: %lu\n",size); >++ DEBUG("\n Memory FAILURE...\n size dbg: %zu\n",size); >+ >+ exit(0); >+ } >diff --git a/security/0d1n/files/patch-src_opt__extract.c b/security/0d1n/files/patch-src_opt__extract.c >new file mode 100644 >index 000000000000..e43d43eeda5f >--- /dev/null >+++ b/security/0d1n/files/patch-src_opt__extract.c >@@ -0,0 +1,11 @@ >+--- src/opt_extract.c.orig 2023-02-20 12:39:15 UTC >++++ src/opt_extract.c >+@@ -164,7 +164,7 @@ void >+ parser_opts (int argc, char **argv) >+ { >+ >+- char c; >++ int c; >+ >+ static struct option long_options[] = >+ { >diff --git a/security/0d1n/files/patch-src_strsec.c b/security/0d1n/files/patch-src_strsec.c >new file mode 100644 >index 000000000000..45dd79f5b0cf >--- /dev/null >+++ b/security/0d1n/files/patch-src_strsec.c >@@ -0,0 +1,15 @@ >+--- src/strsec.c.orig 2023-02-20 12:39:57 UTC >++++ src/strsec.c >+@@ -16,11 +16,11 @@ >+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+ */ >+ >++#include "strsec.h" >+ >+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \ >+ !defined(__bsdi__) && !defined(__APPLE__) >+ >+-#include "strsec.h" >+ /* >+ * Copy src to string dst of size siz. At most siz-1 characters >+ * will be copied. Always NUL terminates (unless siz == 0). >diff --git a/security/0d1n/pkg-plist b/security/0d1n/pkg-plist >new file mode 100644 >index 000000000000..98dc72b15278 >--- /dev/null >+++ b/security/0d1n/pkg-plist >@@ -0,0 +1,28 @@ >+bin/0d1n >+%%DATADIR%%/payloads/crlfinjection.txt >+%%DATADIR%%/payloads/dir_brute.txt >+%%DATADIR%%/payloads/find_responses.txt >+%%DATADIR%%/payloads/js_inject.txt >+%%DATADIR%%/payloads/ldap_injection.txt >+%%DATADIR%%/payloads/list.txt >+%%DATADIR%%/payloads/openredirect.txt >+%%DATADIR%%/payloads/passive_sqli.txt >+%%DATADIR%%/payloads/password_brute.txt >+%%DATADIR%%/payloads/path_traversal.txt >+%%DATADIR%%/payloads/path_traversal_win32.txt >+%%DATADIR%%/payloads/proxy.txt >+%%DATADIR%%/payloads/proxy_list.txt >+%%DATADIR%%/payloads/sqli.txt >+%%DATADIR%%/payloads/useragents.txt >+%%DATADIR%%/payloads/wordlist.txt >+%%DATADIR%%/payloads/xml_attack.txt >+%%DATADIR%%/payloads/xml_attacks.txt >+%%DATADIR%%/payloads/xpath_injection.txt >+%%DATADIR%%/payloads/xss.txt >+%%DATADIR%%/payloads/xss_robertux.txt >+%%DATADIR%%/payloads/xxe_fuzz.txt >+%%DATADIR%%/templates/hammer1.conf >+%%DATADIR%%/templates/hammer2.conf >+%%DATADIR%%/templates/template.conf >+%%PORTDOCS%%%%DOCSDIR%%/README.txt >+@dir %%DATADIR%%/view/response_sources >-- >2.39.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fuz
:
maintainer-approval?
(
rihaz.jerrin
)
Actions:
View
|
Diff
Attachments on
bug 269717
: 240282 |
240531