mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
- Update to 2.14
- Convert to new optionsNG PR: ports/168736 Submitted by: Olivier Cochard-Labbe <olivier@cochard.me> (maintainer)
This commit is contained in:
parent
9f260c691c
commit
f2894a6ab8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298896
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= shellinabox
|
||||
PORTVERSION= 2.10
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 2.14
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= GOOGLE_CODE
|
||||
|
||||
@ -17,7 +16,8 @@ COMMENT= Publish command line shell through AJAX interface
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
OPTIONS= ENABLE_CORES "Patch shellinaboxd to enable core dumps." off
|
||||
OPTIONS_DEFINE= CORES MANPAGES
|
||||
CORES_DESC= Patch shellinaboxd to enable core dumps
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= \
|
||||
@ -29,7 +29,7 @@ USE_RC_SUBR= shellinaboxd
|
||||
USERS?= shellinabox
|
||||
GROUPS?= shellinabox
|
||||
|
||||
MAN1= shellinaboxd.1
|
||||
MAN1= shellinaboxd.1
|
||||
|
||||
PORTDOCS= AUTHORS ChangeLog INSTALL README COPYING GPL-2 NEWS TODO
|
||||
|
||||
@ -38,8 +38,6 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
||||
SUB_FILES= pkg-deinstall
|
||||
SUB_LIST= USERS=${USERS} GROUPS=${GROUPS}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "powerpc"
|
||||
@ -47,7 +45,7 @@ BROKEN= Does not load on powerpc
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if defined(WITH_ENABLE_CORES)
|
||||
.if ${PORT_OPTIONS:MCORES}
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's|prctl(PR_SET_DUMPABLE,|// &|' \
|
||||
-e 's|setrlimit(RLIMIT_CORE,|// &|' \
|
||||
@ -56,9 +54,12 @@ post-patch:
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/shellinaboxd ${PREFIX}/bin/
|
||||
.if !defined(NOPORTDOCS)
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${DOCSDIR}/
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
|
||||
|
||||
.endif
|
||||
${MKDIR} ${ETCDIR}/
|
||||
${CHMOD} 700 ${ETCDIR}/
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (shellinabox-2.10.tar.gz) = 9a2dfa14fcb050de6f450b3b53522f2106cdef4a5591e3e41bd00de1e11d43cb
|
||||
SIZE (shellinabox-2.10.tar.gz) = 513430
|
||||
SHA256 (shellinabox-2.14.tar.gz) = 4126eb7070869787c161102cc2781d24d1d50c8aef4e5a3e1b5446e65d691071
|
||||
SIZE (shellinabox-2.14.tar.gz) = 544919
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- ./Makefile.in.orig 2009-11-21 23:47:39.000000000 +0100
|
||||
+++ ./Makefile.in 2010-08-12 15:05:47.001428510 +0200
|
||||
@@ -372,6 +372,7 @@
|
||||
i[0-9]86) echo '-O elf32-i386 -B i386';; \
|
||||
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
||||
arm*) echo '-O elf32-littlearm -B arm';; \
|
||||
+ sparc64) echo '-O elf64-sparc -B sparc';; \
|
||||
esac
|
||||
|
||||
renamesymbols = \
|
@ -1,15 +0,0 @@
|
||||
--- ./config.h.in.orig 2009-11-21 23:47:44.000000000 +0100
|
||||
+++ ./config.h.in 2010-08-12 14:11:16.292619989 +0200
|
||||
@@ -105,6 +105,12 @@
|
||||
/* Define to 1 if you have the <utmp.h> header file. */
|
||||
#undef HAVE_UTMP_H
|
||||
|
||||
+/* Define to 1 if you have support for updwtmp */
|
||||
+#undef HAVE_UPDWTMP
|
||||
+
|
||||
+/* Define to 1 if you have support for updwtmpx */
|
||||
+#undef HAVE_UPDWTMPX
|
||||
+
|
||||
/* Define to 1 if zlib development files are installed */
|
||||
#undef HAVE_ZLIB
|
||||
|
@ -1,74 +0,0 @@
|
||||
--- ./shellinabox/launcher.c.orig 2009-11-21 23:20:39.000000000 +0100
|
||||
+++ ./shellinabox/launcher.c 2010-08-12 14:11:16.296619939 +0200
|
||||
@@ -495,6 +495,33 @@
|
||||
return utmp;
|
||||
}
|
||||
|
||||
+#if defined(HAVE_UPDWTMP) && !defined(HAVE_UPDWTMPX)
|
||||
+#define min(a,b) ({ typeof(a) _a=(a); typeof(b) _b=(b); _a < _b ? _a : _b; })
|
||||
+#define updwtmpx x_updwtmpx
|
||||
+static void updwtmpx(const char *wtmpx_file, const struct utmpx *utx) {
|
||||
+ struct utmp ut = { 0 };
|
||||
+ ut.ut_type = utx->ut_type;
|
||||
+ ut.ut_pid = utx->ut_pid;
|
||||
+ ut.ut_session = utx->ut_session;
|
||||
+ ut.ut_tv.tv_sec = utx->ut_tv.tv_sec;
|
||||
+ ut.ut_tv.tv_usec = utx->ut_tv.tv_usec;
|
||||
+ memcpy(&ut.ut_line, &utx->ut_line,
|
||||
+ min(sizeof(ut.ut_line), sizeof(utx->ut_line)));
|
||||
+ memcpy(&ut.ut_id, &utx->ut_id,
|
||||
+ min(sizeof(ut.ut_id), sizeof(utx->ut_id)));
|
||||
+ memcpy(&ut.ut_user, &utx->ut_user,
|
||||
+ min(sizeof(ut.ut_user), sizeof(utx->ut_user)));
|
||||
+ memcpy(&ut.ut_host, &utx->ut_host,
|
||||
+ min(sizeof(ut.ut_host), sizeof(utx->ut_host)));
|
||||
+ memcpy(&ut.ut_exit, &utx->ut_exit,
|
||||
+ min(sizeof(ut.ut_exit), sizeof(utx->ut_exit)));
|
||||
+ memcpy(&ut.ut_addr_v6, &utx->ut_addr_v6,
|
||||
+ min(sizeof(ut.ut_addr_v6), sizeof(utx->ut_addr_v6)));
|
||||
+ updwtmp(wtmpx_file, &ut);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
void destroyUtmp(struct Utmp *utmp) {
|
||||
if (utmp) {
|
||||
if (utmp->pty >= 0) {
|
||||
@@ -518,9 +545,12 @@
|
||||
setutxent();
|
||||
pututxline(&utmp->utmpx);
|
||||
endutxent();
|
||||
+
|
||||
+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
|
||||
if (!utmp->useLogin) {
|
||||
updwtmpx("/var/log/wtmp", &utmp->utmpx);
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Switch back to the lower privileges
|
||||
check(!setresgid(r_gid, e_gid, s_gid));
|
||||
@@ -1027,7 +1057,9 @@
|
||||
setutxent();
|
||||
pututxline(&utmp->utmpx);
|
||||
endutxent();
|
||||
+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
|
||||
updwtmpx("/var/log/wtmp", &utmp->utmpx);
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1308,12 +1340,14 @@
|
||||
}
|
||||
pututxline(&utmpx);
|
||||
endutxent();
|
||||
+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
|
||||
if (!utmp->useLogin) {
|
||||
memset(&utmpx.ut_user, 0, sizeof(utmpx.ut_user));
|
||||
strncat(&utmpx.ut_user[0], "LOGIN", sizeof(utmpx.ut_user));
|
||||
updwtmpx("/var/log/wtmp", &utmpx);
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
// Create session. We might have to fork another process as PAM wants us
|
||||
// to close the session when the child terminates. And we must retain
|
@ -1,12 +0,0 @@
|
||||
--- libhttp/ssl.c.orig 2010-07-01 12:15:40.000000000 +0200
|
||||
+++ libhttp/ssl.c 2010-07-01 12:16:56.000000000 +0200
|
||||
@@ -626,6 +626,9 @@
|
||||
return -1;
|
||||
}
|
||||
struct hostent *he = gethostbyname(name);
|
||||
+ if (!he) {
|
||||
+ return -1;
|
||||
+ }
|
||||
*ret = *he;
|
||||
if (result) {
|
||||
*result = ret;
|
Loading…
Reference in New Issue
Block a user