Index: head/net/xrdp-devel/Makefile =================================================================== --- head/net/xrdp-devel/Makefile (revision 455190) +++ head/net/xrdp-devel/Makefile (revision 455191) @@ -1,106 +1,107 @@ # Created by: alepulver # $FreeBSD$ PORTNAME= xrdp PORTVERSION= 0.9.4 DISTVERSIONPREFIX= v +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net PKGNAMESUFFIX= -devel DIST_SUBDIR?= ${PORTNAME} MAINTAINER= meta+ports@vmeta.jp COMMENT= Open source Remote Desktop Protocol (RDP) server LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/COPYING # pulseaudio's built source is required for audio redirection BUILD_DEPENDS= ${NONEXISTENT}:audio/pulseaudio:configure \ ${LOCALBASE}/bin/nasm:devel/nasm RUN_DEPENDS= ${LOCALBASE}/lib/xorg/modules/libxorgxrdp.so:x11-drivers/xorgxrdp USES= autoreconf:build jpeg libtool pkgconfig ssl USE_XORG= ice pixman sm x11 xfixes xrandr GNU_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/lib/xrdp USE_GITHUB= yes GH_ACCOUNT= neutrinolabs GH_PROJECT= xrdp librfxcodec:librfxcodec libpainter:libpainter GH_TAGNAME= v0.1.3:librfxcodec v0.1.1:libpainter CONFIGURE_ARGS= --localstatedir=/var --enable-strict-locations \ --with-pkgconfigdir=${LOCALBASE}/libdata/pkgconfig \ --enable-jpeg --enable-pixman --enable-rfxcodec --enable-painter LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} -lssl CFLAGS+= -I${LOCALBASE}/include -L${OPENSSLINC} CONFLICTS= xrdp-[0-9]* INSTALL_TARGET= install-strip SUB_FILES= pkg-install pkg-message SUB_LIST= OPENSSLBASE=${OPENSSLBASE} OPTIONS_DEFINE= DEBUG FUSE IPV6 OPTIONS_DEFAULT= FDKAAC MP3LAME OPUS OPTIONS_GROUP= AUDIO_CODEC OPTIONS_GROUP_AUDIO_CODEC= FDKAAC MP3LAME OPUS FDKAAC_DESC= Enable Fraunhofer FDK AAC for audio redirection FUSE_DESC= Enable drive redirection via FUSE (experimental) MP3LAME_DESC= Enable MP3 Lame for audio redirection OPUS_DESC= Enable Opus for audio redirection DEBUG_CONFIGURE_ENABLE= xrdpdebug FDKAAC_CONFIGURE_ENABLE= fdkaac FDKAAC_LIB_DEPENDS= libfdk-aac.so:audio/fdk-aac FUSE_CONFIGURE_ENABLE= fuse FUSE_USES= fuse IPV6_CONFIGURE_ENABLE= ipv6 MP3LAME_CONFIGURE_ENABLE= mp3lame MP3LAME_LIB_DEPENDS= libmp3lame.so:audio/lame OPUS_CONFIGURE_ENABLE= opus OPUS_LIB_DEPENDS= libopus.so:audio/opus # don't forget to increase PORTREVISION after pulseaudio update PULSE_VERSION= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VPORTVERSION PULSE_WRKSRC= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VWRKSRC post-extract: # librfxcodec is provided as git submodule @${CP} -r ${WRKSRC_librfxcodec}/ ${WRKSRC}/librfxcodec/ @${CP} -r ${WRKSRC_libpainter}/ ${WRKSRC}/libpainter/ post-patch: @${REINPLACE_CMD} \ -e "s|^PULSE_SCRIPT=/etc/xrdp/pulse/default.pa|PULSE_SCRIPT=${PREFIX}/etc/xrdp/pulse/default.pa|" \ ${WRKSRC}/sesman/sesman.ini @${REINPLACE_CMD} \ -e "s|^PULSE_DIR = .*|PULSE_DIR = `${PULSE_WRKSRC}`|" \ -e "s|-Wall -O2|-Wall -O2 -I${LOCALBASE}/include|" \ ${WRKSRC}/sesman/chansrv/pulse/Makefile pre-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./bootstrap post-build: # build pulseaudio module @${CP} -r "`${PULSE_WRKSRC}`" ${WRKDIR} @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} -C sesman/chansrv/pulse post-install: # install pulseaudio module ${MKDIR} "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" .for f in module-xrdp-sink.so module-xrdp-source.so ${INSTALL_LIB} -m 0755 ${WRKSRC}/sesman/chansrv/pulse/$f \ "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" .endfor # substitute pkg-plist not using PLIST_SUB ${REINPLACE_CMD} -e "s|%%PULSE_VERSION%%|`${PULSE_VERSION}`|g" ${TMPPLIST} post-stage: @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/rsakeys.ini @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/cert.pem @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/key.pem .for f in sesman.ini startwm.sh reconnectwm.sh xrdp.ini xrdp_keyboard.ini @${MV} ${STAGEDIR}${PREFIX}/etc/xrdp/$f ${STAGEDIR}${PREFIX}/etc/xrdp/$f.sample .endfor .include Index: head/net/xrdp-devel/files/patch-CVE-2017-16927 =================================================================== --- head/net/xrdp-devel/files/patch-CVE-2017-16927 (nonexistent) +++ head/net/xrdp-devel/files/patch-CVE-2017-16927 (revision 455191) @@ -0,0 +1,133 @@ +--- sesman/libscp/libscp_v0.c.orig 2017-09-28 02:25:19 UTC ++++ sesman/libscp/libscp_v0.c +@@ -161,7 +161,7 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + struct SCP_SESSION *session = 0; + tui16 sz; + tui32 code = 0; +- char buf[257]; ++ char *buf = 0; + + if (!skipVchk) + { +@@ -226,27 +226,31 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + + /* reading username */ + in_uint16_be(c->in_s, sz); +- buf[sz] = '\0'; ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); +- ++ buf[sz] = '\0'; + if (0 != scp_session_set_username(session, buf)) + { + scp_session_destroy(session); + log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting username", __LINE__); ++ g_free(buf); + return SCP_SERVER_STATE_INTERNAL_ERR; + } ++ g_free(buf); + + /* reading password */ + in_uint16_be(c->in_s, sz); +- buf[sz] = '\0'; ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); +- ++ buf[sz] = '\0'; + if (0 != scp_session_set_password(session, buf)) + { + scp_session_destroy(session); + log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting password", __LINE__); ++ g_free(buf); + return SCP_SERVER_STATE_INTERNAL_ERR; + } ++ g_free(buf); + + /* width */ + in_uint16_be(c->in_s, sz); +@@ -272,9 +276,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + + if (sz > 0) + { ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); + buf[sz] = '\0'; + scp_session_set_domain(session, buf); ++ g_free(buf); + } + } + +@@ -285,9 +291,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + + if (sz > 0) + { ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); + buf[sz] = '\0'; + scp_session_set_program(session, buf); ++ g_free(buf); + } + } + +@@ -298,9 +306,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + + if (sz > 0) + { ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); + buf[sz] = '\0'; + scp_session_set_directory(session, buf); ++ g_free(buf); + } + } + +@@ -311,9 +321,11 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + + if (sz > 0) + { ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); + buf[sz] = '\0'; + scp_session_set_client_ip(session, buf); ++ g_free(buf); + } + } + } +@@ -332,29 +344,35 @@ scp_v0s_accept(struct SCP_CONNECTION *c, + scp_session_set_type(session, SCP_GW_AUTHENTICATION); + /* reading username */ + in_uint16_be(c->in_s, sz); +- buf[sz] = '\0'; ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); ++ buf[sz] = '\0'; + + /* g_writeln("Received user name: %s",buf); */ + if (0 != scp_session_set_username(session, buf)) + { + scp_session_destroy(session); + /* until syslog merge log_message(s_log, LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting username", __LINE__);*/ ++ g_free(buf); + return SCP_SERVER_STATE_INTERNAL_ERR; + } ++ g_free(buf); + + /* reading password */ + in_uint16_be(c->in_s, sz); +- buf[sz] = '\0'; ++ buf = g_new0(char, sz); + in_uint8a(c->in_s, buf, sz); ++ buf[sz] = '\0'; + + /* g_writeln("Received password: %s",buf); */ + if (0 != scp_session_set_password(session, buf)) + { + scp_session_destroy(session); + /* until syslog merge log_message(s_log, LOG_LEVEL_WARNING, "[v0:%d] connection aborted: error setting password", __LINE__); */ ++ g_free(buf); + return SCP_SERVER_STATE_INTERNAL_ERR; + } ++ g_free(buf); + } + else + { Property changes on: head/net/xrdp-devel/files/patch-CVE-2017-16927 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property