From owner-freebsd-bugs Fri Apr 19 6:20: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 84BA437B417 for ; Fri, 19 Apr 2002 06:20:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3JDK1337902; Fri, 19 Apr 2002 06:20:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 12B3837B400 for ; Fri, 19 Apr 2002 06:15:25 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3JDFPY36910; Fri, 19 Apr 2002 06:15:25 -0700 (PDT) (envelope-from nobody) Message-Id: <200204191315.g3JDFPY36910@freefall.freebsd.org> Date: Fri, 19 Apr 2002 06:15:25 -0700 (PDT) From: Nino Dehne To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/37250: [PATCH] ftpd(8) cannot delete stale symlinks Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37250 >Category: bin >Synopsis: [PATCH] ftpd(8) cannot delete stale symlinks >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 19 06:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Nino Dehne >Release: FreeBSD 4.5-RELEASE-p2 i386 >Organization: Clan-Planet GmbH >Environment: FreeBSD [...] 4.5-RELEASE-p2 FreeBSD 4.5-RELEASE-p2 #1: Tue Mar 19 18:17:09 CET 2002 root@[...] i386 >Description: When trying to delete a file via ftp(1) (or any other client, it doesn't matter), ftpd(8) does a stat(2) on the file to verify it's there. However, if the file to delete is a symlink the target of the link gets checked, not the link itself thus making stale links impossible to delete via ftp. This occured when local users had symlinks in their home which point to /usr/local/something but are rendered stale when users log in via ftp (due to using chroot() feature of ftpd(8)). >How-To-Repeat: Create a symlink inside a user's home which points outside of the user's home. Log in as that user via ftp while chroot()'ing him using /etc/ftpchroot. Try to delete said link. This should also work with "ordinary" stale symlinks, i.e. not involving any chroot'ing behaviour of ftpd(8). >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message