diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e78d2b4f6..e7043c0a4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2010-08-27 Corinna Vinschen + + * fhandler_proc.cc (format_proc_partitions): Improve comment. + 2010-08-26 Corinna Vinschen * fhandler_proc.cc (format_proc_partitions): Simplify code and enable diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 817bfac0c..3289acb15 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1098,8 +1098,13 @@ format_proc_partitions (void *, char *&destbuf) || !isdigit (devname[8])) continue; /* Construct path name for partitions, starting with 0, which is the - whole disk, and try to open. Let's assume we never have more than - 99 partitions per disk for now... */ + whole disk, and try to open. + Note that the correct way to do this would be to open the HarddiskX + directory and enumerate the Partition entries. However, while the + partition entries itself are accessible for query by everyone, the + HarddiskX parent directory is only queryable by SYSTEM and Admins. + This way we circumvent this nonsensical restriction. Let's assume + we never have more than 99 partitions per disk for now... */ for (int part_num = 0; part_num < 99; ++part_num) { wcscpy (wpath, dbi->ObjectName.Buffer);