Ticket #6659: linux-no_fchmod_at-r79468.patch
File linux-no_fchmod_at-r79468.patch, 1.3 KB (added by , 10 years ago) |
---|
-
libs/filesystem/src/operations.cpp
1396 1396 prms = current_status.permissions() & ~prms; 1397 1397 1398 1398 // Mac OS X Lion and some other platforms don't support fchmodat() 1399 // 1400 // Linux does not support permissions on symbolic links and has no plans to 1401 // support them in the future. The chmod() code is thus more practical, 1402 // rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW. 1403 // - See the 3rd paragraph of 1404 // "Symbolic link ownership, permissions, and timestamps" at: 1405 // "http://man7.org/linux/man-pages/man7/symlink.7.html" 1406 // - See the fchmodat() Linux man page: 1407 // "http://man7.org/linux/man-pages/man2/fchmodat.2.html" 1399 1408 # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \ 1400 && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100) 1409 && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100) \ 1410 && !(defined(linux) || defined(__linux) || defined(__linux__)) 1401 1411 if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms), 1402 1412 !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW)) 1403 1413 # else // fallback if fchmodat() not supported