Commit fa28a58f authored by Nong Hoang Tu's avatar Nong Hoang Tu Committed by Lorenzo "Palinuro" Faletra
Browse files

Import Debian changes 5.4-4parrot3

amap (5.4-4parrot3) UNRELEASED; urgency=medium
.
  * Update debian patches for new update
parents 42071b0d 358d2792
Pipeline #2527 failed
......@@ -34,14 +34,15 @@ debug: amap.c
$(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
install: all
@echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
test -e amap.exe || cp -fd amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
@echo Installing to $(PREFIX), change this by running ./configure --prefix=path
-mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
-mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
-mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
-test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
-test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
-cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
-cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
-test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
clean:
cd pcre-3.9 && make clean
......
......@@ -303,7 +303,10 @@ FILE *amap_open_file(char *fnam, char *type, char *extension, int verbose) {
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
if ((f = fopen(file_name, "r")) == NULL) {
strcpy(file_name, "/etc/amap/");
strcpy(file_name, AMAP_PREFIX);
if (file_name[strlen(file_name) - 1] != '/')
strcat(file_name, "/");
strcat(file_name, "etc/");
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
f = fopen(file_name, "r");
......@@ -2054,8 +2057,12 @@ int amap_main(amap_struct_options *opt, int argc, char *argv[]) {
// ONLINE UPDATE //
if (opt->update) {
printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
if (opt->filename == NULL)
opt->filename = strdup("/etc/amap/" AMAP_DEFAULT_FILENAME);
if (opt->filename == NULL) {
opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
strcpy(opt->filename, AMAP_PREFIX);
strcat(opt->filename, "/etc/");
strcat(opt->filename, AMAP_DEFAULT_FILENAME);
}
opt->file_log = malloc(strlen(opt->filename) + 6);
strcpy(opt->file_log, opt->filename);
opt->file_nmap = malloc(strlen(AMAP_RESOURCE) + strlen(opt->file_log) + 16);
......
Author: Nong Hoang Tu <dmknght@parrotsec.org>
Last-Update: 2021-03-23
--- amap-5.4.orig/Makefile.am
+++ amap-5.4/Makefile.am
@@ -34,15 +34,14 @@ debug: amap.c
$(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
install: all
- @echo Installing to $(PREFIX), change this by running ./configure --prefix=path
- -mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
- -mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
- -mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
- -test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
- -test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
- -cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
- -cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
- -test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
+ @echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
+ mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
+ mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
+ mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
+ test -e amap.exe || cp -fd amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
+ test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
+ cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
+ cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
clean:
cd pcre-3.9 && make clean
--- amap-5.4.orig/amap-lib.c
+++ amap-5.4/amap-lib.c
@@ -303,10 +303,7 @@ FILE *amap_open_file(char *fnam, char *t
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
if ((f = fopen(file_name, "r")) == NULL) {
- strcpy(file_name, AMAP_PREFIX);
- if (file_name[strlen(file_name) - 1] != '/')
- strcat(file_name, "/");
- strcat(file_name, "etc/");
+ strcpy(file_name, "/etc/amap/");
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
f = fopen(file_name, "r");
@@ -2057,12 +2054,8 @@ int amap_main(amap_struct_options *opt,
// ONLINE UPDATE //
if (opt->update) {
printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
- if (opt->filename == NULL) {
- opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
- strcpy(opt->filename, AMAP_PREFIX);
- strcat(opt->filename, "/etc/");
- strcat(opt->filename, AMAP_DEFAULT_FILENAME);
- }
+ if (opt->filename == NULL)
+ opt->filename = strdup("/etc/amap/" AMAP_DEFAULT_FILENAME);
opt->file_log = malloc(strlen(opt->filename) + 6);
strcpy(opt->file_log, opt->filename);
opt->file_nmap = malloc(strlen(AMAP_RESOURCE) + strlen(opt->file_log) + 16);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment