Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-08-01 12:36:38 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-08-01 12:36:38 +0400
commit67629eb258e8c487c504dac7517ce787b2f338a9 (patch)
tree8c4358b98a86cdd00bb7e9f1728cd08719abfd9b /winsup/cygwin/fhandler.cc
parent2bee37bcaef5120a84b384a77fe01dc646d99386 (diff)
* fhandler.cc (check_posix_perms): Remove.
(fhandler_base::fpathconf): Return value of pc.has_acls () instead of calling check_posix_perms.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc27
1 files changed, 1 insertions, 26 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 16f87a765..0b7cc6138 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1584,31 +1584,6 @@ fhandler_base::fsync ()
return -1;
}
-/* Helper function for Cygwin specific pathconf flags _PC_POSIX_PERMISSIONS
- and _PC_POSIX_SECURITY. */
-static int
-check_posix_perm (const char *fname, int v)
-{
- if (!allow_ntsec)
- return 0;
-
- char *root = rootdir (fname, (char *)alloca (strlen (fname) + 2));
-
- if (!allow_smbntsec
- && ((root[0] == '\\' && root[1] == '\\')
- || GetDriveType (root) == DRIVE_REMOTE))
- return 0;
-
- DWORD vsn, len, flags;
- if (!GetVolumeInformation (root, NULL, 0, &vsn, &len, &flags, NULL, 16))
- {
- __seterrno ();
- return 0;
- }
-
- return (flags & FS_PERSISTENT_ACLS) ? 1 : 0;
-}
-
int
fhandler_base::fpathconf (int v)
{
@@ -1663,7 +1638,7 @@ fhandler_base::fpathconf (int v)
case _PC_POSIX_PERMISSIONS:
case _PC_POSIX_SECURITY:
if (get_device () == FH_FS)
- return check_posix_perm (get_win32_name (), v);
+ return pc.has_acls ();
set_errno (EINVAL);
break;
default: