tac_plus: fix compilation with GCC14

Missing declaration and wrong pointer type.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-05-15 19:30:23 -07:00
parent 4a07db85e8
commit 498d5697de
2 changed files with 22 additions and 1 deletions

View 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

View File

@ -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);