From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqLZO-0001Ux-PJ for qemu-devel@nongnu.org; Thu, 26 Jan 2012 04:24:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqLZN-0007T4-Om for qemu-devel@nongnu.org; Thu, 26 Jan 2012 04:24:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqLZN-0007T0-HC for qemu-devel@nongnu.org; Thu, 26 Jan 2012 04:24:37 -0500 Message-ID: <4F211C9F.4030209@redhat.com> Date: Thu, 26 Jan 2012 10:27:59 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1327140203-3165-1-git-send-email-ronniesahlberg@gmail.com> <1327140203-3165-2-git-send-email-ronniesahlberg@gmail.com> <4F1DA1D5.1010600@redhat.com> <4F20266F.20409@redhat.com> <4F211813.7060404@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: Eric Blake , qemu-devel@nongnu.org Am 26.01.2012 10:18, schrieb ronnie sahlberg: > Kevin, > > Collissions are bad, but what about > > IF ! STRNCMP (filename, "/proc/self/fd/", 14) THEN > fopen(filename, "r") > ELSE > fdopen(atoi(filename+14), "r") > FI > > modulo better validation for the atio() arguments. > > > Probability of anyone using "/proc/self/fd/" as a prefix for normal > files is very small. > Small enough it will be justifiable to say "do that and you are on your own". ? Interesting idea. Maybe that could work. Kevin