Symlink() bug
root at uokmet.UUCP.UUCP
root at uokmet.UUCP.UUCP
Sat Jul 12 05:07:00 AEST 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
More information about the Comp.bugs.2bsd
mailing list