findutils-O_SEARCH 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --- gl/lib/chdir-long.c.orig 2012-12-15 10:42:45.000000000 -0300
  2. +++ gl/lib/chdir-long.c 2013-03-08 09:44:47.000000000 -0300
  3. @@ -72,7 +72,7 @@
  4. cdb_advance_fd (struct cd_buf *cdb, char const *dir)
  5. {
  6. int new_fd = openat (cdb->fd, dir,
  7. - O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
  8. + O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
  9. if (new_fd < 0)
  10. return -1;
  11. --- gl/lib/fts.c.orig 2012-12-15 10:42:45.000000000 -0300
  12. +++ gl/lib/fts.c 2013-03-08 09:47:00.000000000 -0300
  13. @@ -364,7 +364,7 @@
  14. internal_function
  15. diropen (FTS const *sp, char const *dir)
  16. {
  17. - int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
  18. + int open_flags = (O_DIRECTORY | O_NOCTTY | O_NONBLOCK
  19. | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)
  20. | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
  21. @@ -424,7 +424,7 @@
  22. later (where it'd be messier) that "." can in fact
  23. be opened. If not, revert to FTS_NOCHDIR mode. */
  24. int fd = open (".",
  25. - O_SEARCH | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
  26. + 0 | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
  27. if (fd < 0)
  28. {
  29. /* Even if "." is unreadable, don't revert to FTS_NOCHDIR mode
  30. @@ -1752,7 +1752,7 @@
  31. int fd = i_ring_pop (&fd_w);
  32. if (0 <= fd)
  33. {
  34. - int parent_fd = openat (cwd_fd, "..", O_SEARCH | O_NOATIME);
  35. + int parent_fd = openat (cwd_fd, "..", 0 | O_NOATIME);
  36. if (parent_fd < 0)
  37. {
  38. // Warn?
  39. --- gl/lib/openat-proc.c.orig 2012-12-15 10:42:45.000000000 -0300
  40. +++ gl/lib/openat-proc.c 2013-03-08 09:50:16.000000000 -0300
  41. @@ -75,7 +75,7 @@
  42. running on Solaris 10. */
  43. int proc_self_fd = open ("/proc/self/fd",
  44. - O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
  45. + O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
  46. if (proc_self_fd < 0)
  47. proc_status = -1;
  48. else
  49. --- gl/lib/openat.c.orig 2012-12-15 10:42:45.000000000 -0300
  50. +++ gl/lib/openat.c 2013-03-08 09:51:06.000000000 -0300
  51. @@ -265,7 +265,7 @@
  52. openat_needs_fchdir (void)
  53. {
  54. bool needs_fchdir = true;
  55. - int fd = open ("/", O_SEARCH);
  56. + int fd = open ("/", 0);
  57. if (0 <= fd)
  58. {
  59. --- gl/lib/save-cwd.c.orig 2012-12-15 10:42:45.000000000 -0300
  60. +++ gl/lib/save-cwd.c 2013-03-08 09:52:12.000000000 -0300
  61. @@ -64,7 +64,7 @@
  62. {
  63. cwd->name = NULL;
  64. - cwd->desc = open (".", O_SEARCH);
  65. + cwd->desc = open (".", 0);
  66. if (!GNULIB_FCNTL_SAFER)
  67. cwd->desc = fd_safer (cwd->desc);
  68. if (cwd->desc < 0)