From owner-svn-ports-all@freebsd.org Wed Mar 13 15:04:39 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A7621535E4E; Wed, 13 Mar 2019 15:04:39 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07DEE82FCC; Wed, 13 Mar 2019 15:04:39 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3A98C342; Wed, 13 Mar 2019 15:04:38 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2DF4cvQ060741; Wed, 13 Mar 2019 15:04:38 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2DF4cnS060740; Wed, 13 Mar 2019 15:04:38 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201903131504.x2DF4cnS060740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Wed, 13 Mar 2019 15:04:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495579 - in head/shells/scponly: . files X-SVN-Group: ports-head X-SVN-Commit-Author: garga X-SVN-Commit-Paths: in head/shells/scponly: . files X-SVN-Commit-Revision: 495579 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07DEE82FCC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 15:04:39 -0000 Author: garga Date: Wed Mar 13 15:04:38 2019 New Revision: 495579 URL: https://svnweb.freebsd.org/changeset/ports/495579 Log: shells/scponly: fix segfault on FreeBSD 11 Patch introduced in r493861 to fix segfault on FreeBSD 12+ broke it on FreeBSD 11. This new version fixes it on both versions. While here, pet portlint a bit moving USES to proper place and removing RUN_DEPENDS := BUILD_DEPENDS adding individual run depends where it's necessary. PR: 235810 Submitted by: Stewart Morgan Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/shells/scponly/Makefile head/shells/scponly/files/patch-helper.c Modified: head/shells/scponly/Makefile ============================================================================== --- head/shells/scponly/Makefile Wed Mar 13 14:58:04 2019 (r495578) +++ head/shells/scponly/Makefile Wed Mar 13 15:04:38 2019 (r495579) @@ -3,7 +3,7 @@ PORTNAME= scponly PORTVERSION= 4.8.20110526 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= shells security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-snapshots DISTNAME= ${PORTNAME}-20110526 @@ -13,9 +13,9 @@ COMMENT= Tiny shell that only permits scp and sftp LICENSE= BSD2CLAUSE -PORTDOCS= BUILDING-JAILS.TXT INSTALL README SECURITY - USES= tar:tgz + +PORTDOCS= BUILDING-JAILS.TXT INSTALL README SECURITY GNU_CONFIGURE= yes OPTIONS_DEFINE= WILDCARDS GFTP CHROOT RSYNC SCP SVN SVNSERVE UNISON WINSCP \ @@ -34,7 +34,8 @@ WINSCP_DESC= WinSCP support OPTIONS_SUB= yes .if !exists(/usr/bin/sftp) -BUILD_DEPENDS= ${LOCALBASE}/bin/sftp:security/openssh-portable +BUILD_DEPENDS+= openssh-portable>0:security/openssh-portable +RUN_DEPENDS+= openssh-portable>0:security/openssh-portable .endif DEFAULT_CHDIR_CONFIGURE_ON= --with-default-chdir=${SCPONLY_DEFAULT_CHDIR} WILDCARDS_CONFIGURE_ENABLE= wildcards @@ -42,17 +43,19 @@ GFTP_CONFIGURE_ENABLE= gftp-compat CHROOT_CONFIGURE_ENABLE= chrooted-binary CHROOT_USE= RC_SUBR=scponlyc RSYNC_BUILD_DEPENDS= rsync:net/rsync +RSYNC_RUN_DEPENDS= rsync:net/rsync RSYNC_CONFIGURE_ENABLE= rsync-compat SCP_CONFIGURE_ENABLE= scp-compat SVN_CONFIGURE_ENABLE= svn-compat SVN_BUILD_DEPENDS= svn:devel/subversion +SVN_RUN_DEPENDS= svn:devel/subversion SVNSERVE_BUILD_DEPENDS= svn:devel/subversion +SVNSERVE_RUN_DEPENDS= svn:devel/subversion SVNSERVE_CONFIGURE_ENABLE= svnserv-compat UNISON_BUILD_DEPENDS= unison:net/unison +UNISON_RUN_DEPENDS= unison:net/unison UNISON_CONFIGURE_ENABLE= unison-compat WINSCP_CONFIGURE_ENABLE= winscp-compat - -RUN_DEPENDS:= ${BUILD_DEPENDS} post-patch: @${ECHO_MSG} "In addition to knobs available from the OPTIONS dialog," Modified: head/shells/scponly/files/patch-helper.c ============================================================================== --- head/shells/scponly/files/patch-helper.c Wed Mar 13 14:58:04 2019 (r495578) +++ head/shells/scponly/files/patch-helper.c Wed Mar 13 15:04:38 2019 (r495579) @@ -1,26 +1,27 @@ --- helper.c.orig 2010-09-08 05:58:11 UTC +++ helper.c -@@ -323,16 +323,20 @@ int valid_arg_vector(char **av) +@@ -323,16 +323,22 @@ int valid_arg_vector(char **av) char *substitute_known_path(char *request) { cmd_t *cmd=commands; - char *stripped_req=strdup(basename(request)); -+ char *stripped_req=strdup(request); -+ stripped_req=basename(stripped_req); ++ char *mrequest=strdup(request); ++ char *stripped_req=strdup(basename(mrequest)); ++ free(mrequest); while (cmd != NULL) { -+ char *nname; ++ char *mname; if (cmd->name == NULL) break; - if (exact_match(basename(cmd->name),stripped_req)) -+ nname = strdup(cmd->name); -+ if (exact_match(basename(nname),stripped_req)) ++ mname = strdup(cmd->name); ++ if (exact_match(basename(mname),stripped_req)) { free(stripped_req); /* discard old pathname */ -- return (strdup(cmd->name)); -+ return (nname); ++ free(mname); + return (strdup(cmd->name)); } -+ free(nname); ++ free(mname); cmd++; } return (stripped_req);