diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2001-10-29 23:24:54 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2001-10-29 23:24:54 +0000 |
commit | b2067230354500e86d125c788c94238e78d95b03 (patch) | |
tree | 72559e22c9733385c59a6c51042416552306981a /libdiskfs/dir-lookup.c | |
parent | 31dcf4789b00beee17dff2200271047f02f67104 (diff) | |
download | hurd-b2067230354500e86d125c788c94238e78d95b03.tar.gz hurd-b2067230354500e86d125c788c94238e78d95b03.tar.bz2 hurd-b2067230354500e86d125c788c94238e78d95b03.zip |
2001-10-30 Marcus Brinkmann <marcus@gnu.org>
* dir-lookup.c (diskfs_S_dir_lookup): When looking up the next
pathname component, remove assertion for DS and allocate DS if 0.
Allow creation of files through symlink with non-existant target.
From Roland McGrath <roland@frob.com>.
Diffstat (limited to 'libdiskfs/dir-lookup.c')
-rw-r--r-- | libdiskfs/dir-lookup.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 402371d4..018b7503 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -118,8 +118,8 @@ diskfs_S_dir_lookup (struct protid *dircred, /* diskfs_lookup the next pathname component */ if (lastcomp && create) { - assert (!ds); - ds = alloca (diskfs_dirstat_size); + if (!ds) + ds = alloca (diskfs_dirstat_size); error = diskfs_lookup (dnp, path, CREATE, &np, ds, dircred); } else @@ -367,12 +367,7 @@ diskfs_S_dir_lookup (struct protid *dircred, } if (lastcomp) - { - lastcomp = 0; - /* Symlinks to nonexistent files aren't allowed to cause - creation, so clear the flag here. */ - create = 0; - } + lastcomp = 0; diskfs_nput (np); np = 0; |