NetBSD Problem Report #34448

From mlelstv@henery.1st.de  Fri Sep  1 21:10:06 2006
Return-Path: <mlelstv@henery.1st.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 2B7D963BA3E
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  1 Sep 2006 21:10:06 +0000 (UTC)
Message-Id: <200609012109.k81L9qsk028099@henery.1st.de>
Date: Fri, 1 Sep 2006 23:09:52 +0200 (CEST)
From: mlelstv@serpens.de
Reply-To: mlelstv@serpens.de
To: gnats-bugs@NetBSD.org
Subject: NFS fails with creat(...,0)
X-Send-Pr-Version: 3.95

>Number:         34448
>Category:       kern
>Synopsis:       NFS fails to ftruncate() after creat(...,0)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 01 21:15:00 +0000 2006
>Originator:     Michael van Elst
>Release:        NetBSD 3.1_RC1
>Organization:
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."
>Environment:


System: NetBSD henery 3.1_RC1 NetBSD 3.1_RC1 (HENERY) #35: Wed Aug 23 23:44:43 CEST 2006 src@henery:/usr/obj/home/src/sys/arch/i386/compile/HENERY i386
Architecture: i386
Machine: i386
>Description:
On UNIX filesystems you can creat() a file with mode 0 (either by
specifying a mode argument of 0 or by using a umask of 777) but
still access the created file through the newly opened file handle.
An NFS server emulates this behaviour by ignoring permissions for
file operations when the file is accessed by its owner.

On NetBSD this fails when the subsequent operation is ftruncate().
As a result the iozone benchmark program fails.

>How-To-Repeat:

use Fcntl;

sysopen F,"foo",O_RDWR|O_CREAT,0
        or die "sysopen: $!\n";
truncate F,0
        or die "truncate: $!\n";

>Fix:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.