From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52717 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUx0W-0002hl-5q for qemu-devel@nongnu.org; Tue, 21 Dec 2010 02:51:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUx0V-0008Vi-2K for qemu-devel@nongnu.org; Tue, 21 Dec 2010 02:51:39 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:40918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUx0U-0008VO-P1 for qemu-devel@nongnu.org; Tue, 21 Dec 2010 02:51:38 -0500 Received: by wyg36 with SMTP id 36so3956776wyg.4 for ; Mon, 20 Dec 2010 23:51:37 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1292908848-8381-1-git-send-email-harsh@linux.vnet.ibm.com> References: <1292908848-8381-1-git-send-email-harsh@linux.vnet.ibm.com> Date: Tue, 21 Dec 2010 07:51:37 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH v2] hw/virtio-9p-local.c: Remove unnecessary null char in symlink file From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Harsh Prateek Bora Cc: qemu-devel@nongnu.org On Tue, Dec 21, 2010 at 5:20 AM, Harsh Prateek Bora wrote: > This patch removes the addition of null char in symlink file > which is being appended to file in case of mapped security model. > Without this patch, the extra null char causes LTP testcase lstat03 > to fail and hence this fix is required. Looks good. Related note: local_readlink() with fs_sm == SM_MAPPED reads the contents of *any* file. I don't see a check that the file is actually a symlink. What if an application relies on the EINVAL return value when calling readlink() on something that is not a file (not sure how this maps through to 9p though)? Stefan