From owner-freebsd-bugs Tue May 9 13:46:08 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA25547 for bugs-outgoing; Tue, 9 May 1995 13:46:08 -0700 Received: from mail.Germany.EU.net (mail.Germany.EU.net [192.76.144.65]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA25540 for ; Tue, 9 May 1995 13:46:04 -0700 From: Bernard.Steiner@Germany.EU.net Received: by mail.Germany.EU.net with ESMTP (8.6.5:29/EUnetD-2.5.1.f) via EUnet id WAA25870; Tue, 9 May 1995 22:47:43 +0200 Message-Id: <199505092047.WAA17816@qwerty.Germany.EU.net> Received: from localhost.Germany.EU.net by qwerty.Germany.EU.net with SMTP (8.6.4/EUnetDlan-1.14-1.2.0) via EUnet for [mail.germany.eu.net] id WAA17816; Tue, 9 May 1995 22:47:42 +0200 To: freebsd-bugs@FreeBSD.org Subject: strange symlinks Date: Tue, 09 May 1995 22:47:40 +0200 Sender: bugs-owner@FreeBSD.org Precedence: bulk Folks, while playing with my FreeBSD 2.0R I came across the following oddity: Assumption: directory /tmp exits, owned by bin.bin mode 1777 then ln -s /tmp/foo /tmp/bar produces symlink /tmp/bar *owned* by bin regardless of who issued the symlink command, and subsequent rm /tmp/bar is refused for non-owner, i.e. any normal user except for bin and root. This is bogus. The next one may be a general 4.4 problem... assumption: /tmp/foo does not exist, /tmp/bar is a symlink to /tmp/foo. chdir("/tmp/bar") fails with ENOENT, but at the same time mkdir("/tmp/bar", 0x777) fails with EEXIST. Okay, so that is as per the specs in the PRM (and, thusly, probably POSIX). However, it seems sort of stranke, doesn't it ? IMHO the mkdir ought to produce a directory /tmp/foo and not fail. Third, whatever happened to the fchdir() syscall that I vaguely remember having had in (at least) 386BSD0.1 ? Thanks, Bernard