Date: Tue, 27 May 2014 16:41:50 +0000 (UTC) From: Joe Marcus Clarke <marcus@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r355543 - in head/net/netatalk3: . files Message-ID: <201405271641.s4RGfo8n004154@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcus Date: Tue May 27 16:41:50 2014 New Revision: 355543 URL: http://svnweb.freebsd.org/changeset/ports/355543 QAT: https://qat.redports.org/buildarchive/r355543/ Log: Fix some potential segfaults on amd64 as well as misuse of APIs with respect to their counterparts on Linux. Submitted by: Sean Fagan <sef@ixsystems.com> Added: head/net/netatalk3/files/patch-libatalk_adouble_ad_open.c (contents, props changed) Modified: head/net/netatalk3/Makefile head/net/netatalk3/files/patch-libatalk_vfs_extattr.c Modified: head/net/netatalk3/Makefile ============================================================================== --- head/net/netatalk3/Makefile Tue May 27 16:34:03 2014 (r355542) +++ head/net/netatalk3/Makefile Tue May 27 16:41:50 2014 (r355543) @@ -3,7 +3,7 @@ PORTNAME= netatalk PORTVERSION= 3.1.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= net MASTER_SITES= SF Added: head/net/netatalk3/files/patch-libatalk_adouble_ad_open.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/netatalk3/files/patch-libatalk_adouble_ad_open.c Tue May 27 16:41:50 2014 (r355543) @@ -0,0 +1,11 @@ +--- libatalk/adouble/ad_open.c.orig 2014-05-27 12:33:15.000000000 -0400 ++++ libatalk/adouble/ad_open.c 2014-05-27 12:34:00.000000000 -0400 +@@ -586,7 +586,7 @@ static int ad_convert_osx(const char *pa + + origlen = ad_getentryoff(ad, ADEID_RFORK) + ad_getentrylen(ad, ADEID_RFORK); + +- map = mmap(NULL, origlen, PROT_WRITE, MAP_SHARED, ad_reso_fileno(ad), 0); ++ map = mmap(NULL, origlen, PROT_READ | PROT_WRITE, MAP_SHARED, ad_reso_fileno(ad), 0); + if (map == MAP_FAILED) { + LOG(log_error, logtype_ad, "mmap AppleDouble: %s\n", strerror(errno)); + EC_FAIL; Modified: head/net/netatalk3/files/patch-libatalk_vfs_extattr.c ============================================================================== --- head/net/netatalk3/files/patch-libatalk_vfs_extattr.c Tue May 27 16:34:03 2014 (r355542) +++ head/net/netatalk3/files/patch-libatalk_vfs_extattr.c Tue May 27 16:41:50 2014 (r355543) @@ -1,6 +1,15 @@ ---- libatalk/vfs/extattr.c.orig 2014-05-09 13:42:40.000000000 -0400 -+++ libatalk/vfs/extattr.c 2014-05-09 13:45:39.000000000 -0400 -@@ -241,6 +241,10 @@ ssize_t sys_lgetxattr (const char *path, +--- libatalk/vfs/extattr.c.orig 2013-10-18 07:57:33.000000000 -0400 ++++ libatalk/vfs/extattr.c 2014-05-27 12:31:57.000000000 -0400 +@@ -193,6 +193,8 @@ ssize_t sys_fgetxattr (int filedes, cons + const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1; + + if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) { ++ if (size == 0) ++ return retval; + if(retval > size) { + errno = ERANGE; + return -1; +@@ -241,6 +243,10 @@ ssize_t sys_lgetxattr (const char *path, #elif defined(HAVE_EXTATTR_GET_LINK) ssize_t retval; if((retval=extattr_get_link(path, EXTATTR_NAMESPACE_USER, uname, NULL, 0)) >= 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405271641.s4RGfo8n004154>