* path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.
Add comment.
This commit is contained in:
parent
668b4a9519
commit
6c8c58e7f4
|
@ -1,3 +1,8 @@
|
||||||
|
2007-09-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.
|
||||||
|
Add comment.
|
||||||
|
|
||||||
2007-09-17 Corinna Vinschen <corinna@vinschen.de>
|
2007-09-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::open): Partly revert change from
|
* fhandler.cc (fhandler_base::open): Partly revert change from
|
||||||
|
|
|
@ -3535,8 +3535,18 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt)
|
||||||
debug_printf ("%p = NtQueryAttributesFile (%S)", status, &upath);
|
debug_printf ("%p = NtQueryAttributesFile (%S)", status, &upath);
|
||||||
fileattr = INVALID_FILE_ATTRIBUTES;
|
fileattr = INVALID_FILE_ATTRIBUTES;
|
||||||
|
|
||||||
/* One of the inner path components is invalid. Bail out. */
|
/* One of the inner path components is invalid, or the path contains
|
||||||
if (status == STATUS_OBJECT_PATH_NOT_FOUND)
|
invalid characters. Bail out with ENOENT.
|
||||||
|
|
||||||
|
Note that additional STATUS_OBJECT_PATH_INVALID and
|
||||||
|
STATUS_OBJECT_PATH_SYNTAX_BAD status codes exist. The first one
|
||||||
|
is seemingly not generated by NtQueryAttributesFile, the latter
|
||||||
|
is only generated if the path is no absolute path within the
|
||||||
|
NT name space, which should not happen and would point to an
|
||||||
|
error in get_nt_native_path. Both status codes are deliberately
|
||||||
|
not tested here unless proved necessary. */
|
||||||
|
if (status == STATUS_OBJECT_PATH_NOT_FOUND
|
||||||
|
|| status == STATUS_OBJECT_NAME_INVALID)
|
||||||
{
|
{
|
||||||
set_error (ENOENT);
|
set_error (ENOENT);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue