Date: Tue, 5 Sep 2006 10:37:14 +0200 (CEST) From: Knut Anders Hatlen <kahatlen@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/102897: linux_base-fc-4 - remove() function does not delete empty directories Message-ID: <200609050837.k858bEwB005523@ugle.hatlen.net> Resent-Message-ID: <200609050840.k858eL9s027560@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <stdio.h> 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609050837.k858bEwB005523>