projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bootstrap: suppress stderr chatter
[gnulib.git]
/
lib
/
savewd.c
diff --git
a/lib/savewd.c
b/lib/savewd.c
index
dfb33b7
..
c5aec36
100644
(file)
--- a/
lib/savewd.c
+++ b/
lib/savewd.c
@@
-1,6
+1,6
@@
/* Save and restore the working directory, possibly using a child process.
/* Save and restore the working directory, possibly using a child process.
- Copyright (C) 2006
, 2007, 2009
Free Software Foundation, Inc.
+ Copyright (C) 2006
-2007, 2009-2012
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-31,7
+31,7
@@
#include <sys/wait.h>
#include <unistd.h>
#include <sys/wait.h>
#include <unistd.h>
-#include "d
ir
name.h"
+#include "d
os
name.h"
#include "fcntl-safer.h"
/* Save the working directory into *WD, if it hasn't been saved
#include "fcntl-safer.h"
/* Save the working directory into *WD, if it hasn't been saved
@@
-45,7
+45,7
@@
savewd_save (struct savewd *wd)
case INITIAL_STATE:
/* Save the working directory, or prepare to fall back if possible. */
{
case INITIAL_STATE:
/* Save the working directory, or prepare to fall back if possible. */
{
- int fd = open_safer (".", O_
RDONLY
);
+ int fd = open_safer (".", O_
SEARCH
);
if (0 <= fd)
{
wd->state = FD_STATE;
if (0 <= fd)
{
wd->state = FD_STATE;
@@
-105,7
+105,7
@@
savewd_chdir (struct savewd *wd, char const *dir, int options,
|| (options & (HAVE_WORKING_O_NOFOLLOW ? SAVEWD_CHDIR_NOFOLLOW : 0)))
{
fd = open (dir,
|| (options & (HAVE_WORKING_O_NOFOLLOW ? SAVEWD_CHDIR_NOFOLLOW : 0)))
{
fd = open (dir,
- (O_
RDONLY
| O_DIRECTORY | O_NOCTTY | O_NONBLOCK
+ (O_
SEARCH
| O_DIRECTORY | O_NOCTTY | O_NONBLOCK
| (options & SAVEWD_CHDIR_NOFOLLOW ? O_NOFOLLOW : 0)));
if (open_result)
| (options & SAVEWD_CHDIR_NOFOLLOW ? O_NOFOLLOW : 0)));
if (open_result)