From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 10 03:40:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0DA86E98 for ; Thu, 10 Jan 2013 03:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E7ABB111 for ; Thu, 10 Jan 2013 03:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0A3e1tI011380 for ; Thu, 10 Jan 2013 03:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0A3e17E011379; Thu, 10 Jan 2013 03:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 10 Jan 2013 03:40:01 GMT Resent-Message-Id: <201301100340.r0A3e17E011379@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Chad J. Milios" Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9E9EDE81 for ; Thu, 10 Jan 2013 03:36:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 86096100 for ; Thu, 10 Jan 2013 03:36:05 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r0A3a5xK035936 for ; Thu, 10 Jan 2013 03:36:05 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r0A3a51W035935; Thu, 10 Jan 2013 03:36:05 GMT (envelope-from nobody) Message-Id: <201301100336.r0A3a51W035935@red.freebsd.org> Date: Thu, 10 Jan 2013 03:36:05 GMT From: "Chad J. Milios" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/175173: [PATCH] netatalk3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2013 03:40:02 -0000 >Number: 175173 >Category: ports >Synopsis: [PATCH] netatalk3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 10 03:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Chad J. Milios >Release: 9.1-RELEASE >Organization: Crop Circle Systems, Inc. >Environment: FreeBSD seed.ccsys.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r245163: Tue Jan 8 13:35:18 UTC 2013 root@seed.ccsys.com:/usr/obj/usr/src/sys/GENERIC amd64 >Description: To be clear, I have a 100% ZFS system, root /boot /home, everything ZFS, this may only affect ZFS, I don't know, I didn't try this on UFS or on Linux. I fixed it for myself and moved on. The fix was small and innocent-looking enough, I don't think it should adversely affect anyone. In my googling I found at least two other people having exactly the same problem, both on FreeBSD 9.0 and ZFS. I backported this small fix from the Netatalk 3.0.2 development repository with no modification, but by their comments, it doesn't seem like they know this patch fixes this problem, or are aware of this problem. Apparently it also fixes a memory leak, according to their changelog. So, I built netatalk-3.0.1,1 from ports with default options, configured a [Homes] section to point to /home (a zfs dataset), logged in from a MacOS 10.8.2 machine and got this error: "Something wrong with the volume's CNID DB, using temporary CNID DB instead. Check server messages for details! Switching to read-only mode." /var/log/messages then contained the lines: Jan 7 03:45:38 seed afpd[1734]: AFP3.3 Login by joe Jan 7 03:45:38 seed afpd[1734]: Cannot find module named [] in registered module list! Jan 7 03:45:38 seed afpd[1734]: Can't open volume "/home/joe" CNID backend "" Jan 7 03:45:38 seed afpd[1734]: Reopen volume /home/joe using in memory temporary CNID DB. >How-To-Repeat: Install netatalk-3.0.1,1, configure and log in. May need FreeBSD 9.x, 9.1, or ZFS /home on 9.x to trigger the problem for all I know. >Fix: Put the attached patchfile into the files directory of the netatalk3 port. This is grabbed from https://github.com/franklahm/Netatalk/commit/1fa0166843eac60947d08f92c90a686fc8bcbff5 Patch attached with submission follows: --- ./libatalk/util/netatalk_conf.c.orig 2013-01-07 12:21:30.309544508 +0000 +++ ./libatalk/util/netatalk_conf.c 2013-01-07 12:23:22.360529479 +0000 @@ -563,7 +563,7 @@ EC_INIT; struct vol *volume = NULL; int i, suffixlen, vlen, tmpvlen, u8mvlen, macvlen; - char *tmpname; + char tmpname[AFPVOL_U8MNAMELEN+1]; ucs2_t u8mtmpname[(AFPVOL_U8MNAMELEN+1)*2], mactmpname[(AFPVOL_MACNAMELEN+1)*2]; char suffix[6]; /* max is #FFFF */ uint16_t flags; @@ -643,7 +643,7 @@ EC_NULL( volume->v_maccodepage = strdup(obj->options.maccodepage) ); vlen = strlen(name); - tmpname = strdup(name); + strlcpy(tmpname, name, sizeof(tmpname)); for(i = 0; i < vlen; i++) if(tmpname[i] == '/') tmpname[i] = ':'; >Release-Note: >Audit-Trail: >Unformatted: