diff options
-rw-r--r-- | libdiskfs/ChangeLog | 7 | ||||
-rw-r--r-- | libdiskfs/dir-lookup.c | 11 |
2 files changed, 10 insertions, 8 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index c04e69a4..6125f417 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,10 @@ +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>. + 2001-10-11 Roland McGrath <roland@frob.com> * dir-renamed.c (diskfs_rename_dir): Fix bogus assert. 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; |