summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-04-06 20:44:55 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-04-06 20:44:55 +0000
commit6af3d60df9649865ff4edae8ddcd8966021ef1f8 (patch)
tree7faadfb18e2acc41e21d0ebeae3e1993417e71a2 /winsup
parent2f9ee8fc90c6cfbc6c2540a8cb7ce00e143cd0b9 (diff)
downloadcygnal-6af3d60df9649865ff4edae8ddcd8966021ef1f8.tar.gz
cygnal-6af3d60df9649865ff4edae8ddcd8966021ef1f8.tar.bz2
cygnal-6af3d60df9649865ff4edae8ddcd8966021ef1f8.zip
* libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/libc/rexec.cc6
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 39d2396c5..31ba03bad 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-06 Earl Chew <earl_chew@agilent.com>
+
+ * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
+
2009-04-06 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc: Add comment to explain why we can't support JIS
diff --git a/winsup/cygwin/libc/rexec.cc b/winsup/cygwin/libc/rexec.cc
index ca253f83e..3760e6a3a 100644
--- a/winsup/cygwin/libc/rexec.cc
+++ b/winsup/cygwin/libc/rexec.cc
@@ -159,7 +159,7 @@ ruserpass(const char *host, char **aname, char **apass, char **aacct)
char myname[INTERNET_MAX_HOST_NAME_LENGTH + 1];
const char *mydomain;
int t, i, c, usedefault = 0;
- struct stat stb;
+ struct __stat64 stb;
hdir = getenv("HOME");
if (hdir == NULL)
@@ -218,7 +218,7 @@ next:
break;
case PASSWD:
if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
- fstat(fileno(cfile), &stb) >= 0 &&
+ fstat64(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
warnx("Remove password or make file unreadable by others.");
@@ -230,7 +230,7 @@ next:
}
break;
case ACCOUNT:
- if (fstat(fileno(cfile), &stb) >= 0
+ if (fstat64(fileno(cfile), &stb) >= 0
&& (stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
warnx("Remove account or make file unreadable by others.");