summaryrefslogtreecommitdiff
path: root/libdiskfs/lookup.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1998-06-29 23:28:19 +0000
committerThomas Bushnell <thomas@gnu.org>1998-06-29 23:28:19 +0000
commitf66818fe3a2c568faa9afe6d72339a57b1d0d621 (patch)
treeee0c0ab1501161211091d61bd74e4fd8c14aa512 /libdiskfs/lookup.c
parent494c7bbf6d34ed6bec3ee7359ec9abf038244f20 (diff)
Mon Jun 29 18:54:23 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
* lookup.c (diskfs_lookup): If NAME is empty, return an error.
Diffstat (limited to 'libdiskfs/lookup.c')
-rw-r--r--libdiskfs/lookup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
index df8b4bff..71d8dbf8 100644
--- a/libdiskfs/lookup.c
+++ b/libdiskfs/lookup.c
@@ -1,5 +1,5 @@
/* Wrapper for diskfs_lookup_hard
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -93,6 +93,12 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
return ENOTDIR;
}
+ if (name[0] == '\0')
+ {
+ diskfs_null_dirstat (ds);
+ return EINVAL;
+ }
+
err = fshelp_access (&dp->dn_stat, S_IEXEC, cred->user);
if (err)
{