From 8711eddd80efc5f05f19da613ce3ad7ebc66aa35 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 26 Dec 2004 02:10:30 +0000 Subject: * fhandler.cc (fhandler_base::fchmod): Do the right thing when changing an "on disk" device or fifo. (fhandler_base::fchown): Ditto for changing ownership. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate device files on ntfs partitions. * path.cc (path_conv::check): Use isfs function to figure out if a path exists on a filesystem to make sure that device files are caught. --- winsup/cygwin/fhandler.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 2507f322e..61f9cc01f 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1520,6 +1520,9 @@ fhandler_base::closedir (DIR *) int fhandler_base::fchmod (mode_t mode) { + extern int chmod_device (path_conv& pc, mode_t mode); + if (pc.is_fs_special ()) + return chmod_device (pc, mode); /* By default, just succeeds. */ return 0; } @@ -1527,6 +1530,8 @@ fhandler_base::fchmod (mode_t mode) int fhandler_base::fchown (__uid32_t uid, __gid32_t gid) { + if (pc.is_fs_special ()) + return ((fhandler_disk_file *) this)->fhandler_disk_file::fchown (uid, gid); /* By default, just succeeds. */ return 0; } -- cgit v1.2.3