Tweaks to get functionality

This commit is contained in:
Hibby 2024-11-29 16:13:51 +00:00
parent c0637b3841
commit 6bd281ab30
No known key found for this signature in database
5 changed files with 26 additions and 167 deletions

11
debian/changelog vendored
View File

@ -1,3 +1,9 @@
linbpq (6.0.24.51+repack-2~hibbian+1) UNRELEASED; urgency=medium
* Roll back some patches
-- Dave Hibberd <hibby@debian.org> Fri, 29 Nov 2024 14:26:32 +0000
linbpq (6.0.24.51+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
* New upstream import
@ -6,6 +12,11 @@ linbpq (6.0.24.51+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
* Big build system review, now using Debian CFLAGS and LDFLAGS
- Hardening enabled, mostly
- A debug symbols package is now available
* Oh yeah, everything is now dynamic linking
- libpng
- libpaho-mqtt
- libjansson
- libminiupnpc
-- Dave Hibberd <hibby@debian.org> Fri, 29 Nov 2024 13:08:38 +0000

2
debian/control vendored
View File

@ -6,7 +6,7 @@ Standards-Version: 4.7.0.0
Vcs-Browser: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode
Vcs-Git: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode.git
Homepage: https://www.cantab.net/users/john.wiseman/Documents/
Build-Depends: debhelper-compat (= 13), libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev, libpaho-mqtt-dev, libjansson-dev
Build-Depends: debhelper-compat (= 13), libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev, libpaho-mqtt-dev, libjansson-dev, libpng-dev
Rules-Requires-Root: no
Package: linbpq

View File

@ -9,59 +9,6 @@
memcpy(&rlen, &Decoded[5], 4);
@@ -1612,7 +1612,7 @@
if (Sess ==NULL)
return 0;
- Len = sprintf(Reply, StatusPage);
+ Len = sprintf(Reply, "%s", StatusPage);
while (Sess)
{
@@ -1670,7 +1670,7 @@
Sess = Sess->Next;
}
- Len += sprintf(&Reply[Len], StatusTail);
+ Len += sprintf(&Reply[Len], "%s", StatusTail);
return Len;
}
--- a/bpqmail.h
+++ b/bpqmail.h
@@ -611,7 +611,7 @@
char status;
int number;
int length;
- int xdatereceived;
+ time_t xdatereceived;
char bbsfrom[7]; // ? BBS we got it from ?
char via[41];
char from[7];
@@ -643,9 +643,9 @@
// For 64 bit time_t compatibility define as long long
// (so struct is same with 32 or 64 bit time_t)
- long long datereceived;
- long long datecreated;
- long long datechanged;
+ time_t datereceived;
+ time_t datecreated;
+ time_t datechanged;
char Spare[61 - 24]; // For future use
} ;
@@ -695,8 +695,8 @@
unsigned char Type;
unsigned char changed;
unsigned short seen;
- long long last_modif;
- long long last_seen;
+ time_t last_modif;
+ time_t last_seen;
char first_homebbs[41];
char secnd_homebbs[41];
char first_zip[9];
--- a/AGWAPI.c
+++ b/AGWAPI.c
@@ -128,7 +128,7 @@
@ -73,112 +20,3 @@
int AGWDataSocket_Disconnect( struct AGWSocketConnectionInfo * sockptr);
int SendRawPacket(struct AGWSocketConnectionInfo * sockptr, char *txmsg, int Length);
int ShowApps();
--- a/APRSCode.c
+++ b/APRSCode.c
@@ -7666,7 +7666,7 @@
}
- OutputLen += sprintf(&OutBuffer[OutputLen], WebTrailer);
+ OutputLen += sprintf(&OutBuffer[OutputLen], "%s", WebTrailer);
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
sendandcheck(sock, Header, HeaderLen);
@@ -7711,7 +7711,7 @@
}
- OutputLen += sprintf(&OutBuffer[OutputLen], WebTrailer);
+ OutputLen += sprintf(&OutBuffer[OutputLen], "%s", WebTrailer);
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
sendandcheck(sock, Header, HeaderLen);
--- a/LinBPQ.c
+++ b/LinBPQ.c
@@ -667,7 +667,7 @@
// Replace CR with CRLF
- printf(ptr);
+ printf("%c", ptr);
if (ptr2)
printf("\r\n");
@@ -816,7 +816,7 @@
{
case 'h':
- printf(HelpScreen);
+ printf("%c", HelpScreen);
exit (0);
case 'l':
--- a/RigControl.c
+++ b/RigControl.c
@@ -1291,7 +1291,7 @@
// use text command
- Len = sprintf(CmdPtr, ptr1);
+ Len = sprintf(CmdPtr,"%c", ptr1);
break;
case YAESU:
--- a/FreeDATA.c
+++ b/FreeDATA.c
@@ -867,7 +867,7 @@
char Message[256];
int Len, ret;
- Len = sprintf(Message, TXF);
+ Len = sprintf(Message,"%c",TXF);
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
if (buffptr)
@@ -2476,7 +2476,7 @@
char Message[256];
int Len, ret;
- Len = sprintf(Message, CQ);
+ Len = sprintf(Message, "%c", CQ);
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
}
@@ -2491,7 +2491,7 @@
if (Interval > 0)
Len = sprintf(Message, Template1, Interval);
else
- Len = sprintf(Message, Template2);
+ Len = sprintf(Message, "%c", Template2);
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
}
@@ -3682,7 +3682,7 @@
// return FreeDataSendCommand(TNC, "D");
- Len = sprintf(Msg, Disconnect);
+ Len = sprintf(Msg,"%c", Disconnect);
return send(TNC->TCPDataSock, Msg, Len, 0);
}
@@ -3694,7 +3694,7 @@
char Msg[128];
int Len;
- Len = sprintf(Msg, GetData);
+ Len = sprintf(Msg, "%c", GetData);
return send(TNC->TCPDataSock, Msg, Len, 0);
}
--- a/rigcontrol.h
+++ b/rigcontrol.h
@@ -2,7 +2,7 @@
#define RIGCONTROL
#ifndef LINBPQ
-#include "Rigresource.h"
+#include "rigresource.h"
#endif
#define IDI_ICON2 2

View File

@ -1,6 +1,16 @@
--- a/makefile
+++ b/makefile
@@ -18,9 +18,12 @@
@@ -2,8 +2,7 @@
# To exclude i2c support run make noi2c
-OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pngwutil.o\
- pngread.o pngwrite.o png.o pngerror.o pngget.o pngmem.o APRSIconData.o AISCommon.o\
+OBJS = APRSIconData.o AISCommon.o\
upnp.o APRSStdPages.o HSMODEM.o WinRPR.o KISSHF.o TNCEmulators.o bpqhdlc.o SerialPort.o\
adif.o WebMail.o utf8Routines.o VARA.o LzFind.o Alloc.o LzmaDec.o LzmaEnc.o LzmaLib.o \
Multicast.o ARDOP.o IPCode.o FLDigi.o linether.o CMSAuth.o APRSCode.o BPQtoAGW.o KAMPactor.o\
@@ -18,9 +17,12 @@
# Configuration:
CC = gcc
@ -12,11 +22,11 @@
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
+all: CFLAGS += -DLINBPQ -MMD -g -fcommon
+all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lrt -lm -lz -lpthread -lconfig -lpcap
+all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lrt -lm -lz -lpthread -lconfig -lpcap -lpng
all: linbpq
@@ -32,12 +35,15 @@
@@ -32,12 +34,15 @@
linbpq: $(OBJS)

2
debian/rules vendored
View File

@ -1,6 +1,6 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-format qa=-bug-implicit-func
export DEB_BUILD_MAINT_OPTIONS=hardening=-all,-format qa=-bug-implicit-func
%:
dh $@