From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 5 08:40:33 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6224116A4DA for ; Tue, 5 Sep 2006 08:40:33 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B08B443D68 for ; Tue, 5 Sep 2006 08:40:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k858eLFE027561 for ; Tue, 5 Sep 2006 08:40:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k858eL9s027560; Tue, 5 Sep 2006 08:40:21 GMT (envelope-from gnats) Resent-Date: Tue, 5 Sep 2006 08:40:21 GMT Resent-Message-Id: <200609050840.k858eL9s027560@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, Knut Anders Hatlen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA09216A4DE for ; Tue, 5 Sep 2006 08:38:02 +0000 (UTC) (envelope-from kahatlen@gmail.com) Received: from smtp.bluecom.no (smtp.bluecom.no [193.75.75.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 725E043D45 for ; Tue, 5 Sep 2006 08:38:02 +0000 (GMT) (envelope-from kahatlen@gmail.com) Received: from ugle.hatlen.net (unknown [193.71.105.147]) by smtp.bluecom.no (Postfix) with ESMTP id D540516F8AD for ; Tue, 5 Sep 2006 10:37:52 +0200 (CEST) Received: from ugle.hatlen.net (localhost [127.0.0.1]) by ugle.hatlen.net (8.13.6/8.13.6) with ESMTP id k858bEL5005524 for ; Tue, 5 Sep 2006 10:37:14 +0200 (CEST) (envelope-from kah@ugle.hatlen.net) Received: (from kah@localhost) by ugle.hatlen.net (8.13.6/8.13.6/Submit) id k858bEwB005523; Tue, 5 Sep 2006 10:37:14 +0200 (CEST) (envelope-from kah) Message-Id: <200609050837.k858bEwB005523@ugle.hatlen.net> Date: Tue, 5 Sep 2006 10:37:14 +0200 (CEST) From: Knut Anders Hatlen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/102897: linux_base-fc-4 - remove() function does not delete empty directories X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Knut Anders Hatlen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 08:40:33 -0000 >Number: 102897 >Category: ports >Synopsis: linux_base-fc-4 - remove() function does not delete empty directories >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: Tue Sep 05 08:40:20 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Knut Anders Hatlen >Release: FreeBSD 6.1-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD ugle.hatlen.net 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #4: Mon Sep 4 22:19:20 CEST 2006 root@ugle.hatlen.net:/usr/obj/usr/src/sys/KAH-KERNEL-I386 i386 linux_base-fc-4_8 >Description: After upgrading linux_base from the RedHat port to FC4, I noticed that a Linux application was unable to remove empty directories (it could with the RedHat port). When investigating the issue further, it seems like FC4 has changed the behaviour of the remove() function. With the RedHat port, it behaves as rmdir() on directories and as unlink() otherwise (which is the correct behaviour according to the manual for the GNU C Library). With the FC4 port, it always behaves as unlink() and therefore fails when it is used on directories. >How-To-Repeat: % cat removetest.c #include int main() { if (remove("emptydir") == -1) { perror("error"); } return 0; } % /usr/compat/linux/usr/bin/gcc removetest.c % mkdir emptydir % ./a.out error: Operation not permitted >Fix: >Release-Note: >Audit-Trail: >Unformatted: