* 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:
Christopher Faylor 2005-10-12 20:38:38 +00:00
parent 48882f9a07
commit bf1550b6f8
4 changed files with 16 additions and 13 deletions

View File

@ -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

View File

@ -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;

View File

@ -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.

View File

@ -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