* times.cc (utimes): Only consider fds opened with write access.
This commit is contained in:
parent
5a90915d41
commit
b27f0b2cf9
@ -1,3 +1,7 @@
|
||||
2005-10-19 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* times.cc (utimes): Only consider fds opened with write access.
|
||||
|
||||
2005-10-19 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_base::utimes_fs): Use existing handle
|
||||
|
@ -452,7 +452,8 @@ utimes (const char *path, const struct timeval *tvp)
|
||||
|
||||
cygheap_fdenum cfd;
|
||||
while (cfd.next () >= 0)
|
||||
if (strcmp (cfd->get_win32_name (), win32) == 0)
|
||||
if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE)
|
||||
&& strcmp (cfd->get_win32_name (), win32) == 0)
|
||||
{
|
||||
fh = cfd;
|
||||
fromfd = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user