tac_plus: fix compilation with GCC14
authorRosen Penev <redacted>
Thu, 16 May 2024 02:30:23 +0000 (19:30 -0700)
committerRosen Penev <redacted>
Fri, 17 May 2024 06:45:24 +0000 (23:45 -0700)
Missing declaration and wrong pointer type.

Signed-off-by: Rosen Penev <redacted>
net/tac_plus/Makefile
net/tac_plus/patches/020-gcc14.patch [new file with mode: 0644]

index 381a044a61750e901d6b51494c905c41a9650780..5d087696705af68fa18679af9d492e20a306b6fc 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=tac_plus
 PKG_VERSION:=4.0.4.28
 PKG_REV:=259251e6f1c2d5c98081a43c6f66d9eb2989cfd8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_VERSION:=$(PKG_REV)
 PKG_SOURCE_DATE:=2019.02.11
diff --git a/net/tac_plus/patches/020-gcc14.patch b/net/tac_plus/patches/020-gcc14.patch
new file mode 100644 (file)
index 0000000..914c3b4
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/tacacs-F4.0.4.28/pwlib.c
++++ b/tacacs-F4.0.4.28/pwlib.c
+@@ -354,7 +354,7 @@ etc_passwd_file_verify(char *user, char
+        * password expiration routines work correctly.
+        */
+       if (spwd->sp_expire > 0) {
+-          long secs = spwd->sp_expire * 24 * 60 * 60;
++          time_t secs = spwd->sp_expire * 24 * 60 * 60;
+           char *p = ctime(&secs);
+           memcpy(buf, p + 4, 7);
+--- a/tacacs-F4.0.4.28/tac_plus.h
++++ b/tacacs-F4.0.4.28/tac_plus.h
+@@ -418,6 +418,7 @@ char       *cfg_get_host_key(char *);
+ int   cfg_get_host_noenablepwd(char *);
+ #endif
+ char  *cfg_get_host_prompt(char *);
++int   cfg_get_logauthor(void);
+ char  *cfg_get_login_secret(char *, int);
+ #ifdef MSCHAP
+ char  *cfg_get_mschap_secret(char *, int);
git clone https://git.99rst.org/PROJECT