* dir.cc (mkdir): Abandon use of PC_WRITABLE.
(rmdir): Ditto. * path.h (PC_WRITABLE): Delete. * path.cc (path_conv::check): Remove PC_WRITABLE accommodations. Revisit later.
This commit is contained in:
parent
48882f9a07
commit
bf1550b6f8
|
@ -1,3 +1,11 @@
|
|||
2005-10-12 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* dir.cc (mkdir): Abandon use of PC_WRITABLE.
|
||||
(rmdir): Ditto.
|
||||
* path.h (PC_WRITABLE): Delete.
|
||||
* path.cc (path_conv::check): Remove PC_WRITABLE accommodations.
|
||||
Revisit later.
|
||||
|
||||
2005-10-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Convert an
|
||||
|
|
|
@ -265,7 +265,7 @@ mkdir (const char *dir, mode_t mode)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW | PC_WRITABLE)))
|
||||
if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
|
||||
goto done; /* errno already set */;
|
||||
|
||||
if (fh->error ())
|
||||
|
@ -299,13 +299,16 @@ rmdir (const char *dir)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW | PC_WRITABLE)))
|
||||
if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
|
||||
goto done; /* errno already set */;
|
||||
|
||||
if (fh->error ())
|
||||
{
|
||||
debug_printf ("got %d error from build_fh_name", fh->error ());
|
||||
set_errno (fh->error ());
|
||||
if (fh->error ())
|
||||
set_errno (EROFS);
|
||||
else
|
||||
set_errno (fh->error ());
|
||||
}
|
||||
else if (!fh->rmdir ())
|
||||
res = 0;
|
||||
|
|
|
@ -925,14 +925,7 @@ virtual_component_retry:
|
|||
|
||||
out:
|
||||
bool strip_tail = false;
|
||||
/* If the user wants a directory, do not return a symlink */
|
||||
if ((opt & PC_WRITABLE) && (path_flags & PATH_RO))
|
||||
{
|
||||
debug_printf ("%s is on a read-only filesystem", path);
|
||||
error = EROFS;
|
||||
return;
|
||||
}
|
||||
else if (dev.devn == FH_NETDRIVE && component)
|
||||
if (dev.devn == FH_NETDRIVE && component)
|
||||
{
|
||||
/* This case indicates a non-existant resp. a non-retrievable
|
||||
share. This happens for instance if the share is a printer.
|
||||
|
|
|
@ -46,8 +46,7 @@ enum pathconv_arg
|
|||
PC_NULLEMPTY = 0x0020,
|
||||
PC_CHECK_EA = 0x0040,
|
||||
PC_POSIX = 0x0080,
|
||||
PC_NO_ACCESS_CHECK = 0x00800000,
|
||||
PC_WRITABLE = 0x00400000
|
||||
PC_NO_ACCESS_CHECK = 0x00800000
|
||||
};
|
||||
|
||||
enum case_checking
|
||||
|
|
Loading…
Reference in New Issue