Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!caip!clyde!cbatt!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!okstate.UUCP!uokmet.UUCP!root From: root@uokmet.UUCP.UUCP Newsgroups: net.bugs.2bsd Subject: Symlink() bug Message-ID: <1500018@uokmet.UUCP> Date: Fri, 11-Jul-86 15:07:00 EDT Article-I.D.: uokmet.1500018 Posted: Fri Jul 11 15:07:00 1986 Date-Received: Sun, 13-Jul-86 20:30:39 EDT Lines: 32 Nf-ID: #N:uokmet.UUCP:1500018:000:643 Nf-From: uokmet.UUCP!root Jul 11 14:07:00 1986 Subject: symlink bug Index: sys/sys3.c 2.9bsd Description: Symlink() always creates a link to "something", even if the original file doesn't exist. Repeat-By: ln -s xxx xxx [presto, a "funny" xxx file is created.] [Fortunately, nothing "fatal" happens. Attempts to look at the file gives EWOULDBLOCK.] Fix: In sys/sys3.c, function symlink(), after the line uap = (struct a *)u.u_ap; add ip = namei(uchar, LOOKUP, 1); if (ip == NULL) return; This is the exact same way link() does it in sys/sys2.c. Kevin W. Thomas Univ. of Oklahoma School of Meteorology Norman, OK UUCP: ...!ihnp4!okstate!uokvax!uokmet!kwthomas