From 84a1af74a218779daac9b1e2e2634701ecd5f388 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 25 Jun 2000 03:48:10 +0000 Subject: [PATCH] * grp.cc (read_etc_group): Open file in text mode. * pwd.cc (read_etc_passwd): Ditto. * shared.h: Bump PROC_MAGIC. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/grp.cc | 2 +- winsup/cygwin/passwd.cc | 2 +- winsup/cygwin/shared.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a5aa61761..c96a667e4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +Sat Jun 24 23:43:06 2000 Christopher Faylor + + * grp.cc (read_etc_group): Open file in text mode. + * pwd.cc (read_etc_passwd): Ditto. + * shared.h: Bump PROC_MAGIC. + Sat Jun 24 19:30:00 2000 Corinna Vinschen * fork.cc (fork): Fix error in copying SID pointer. diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 2009275c7..79b1157af 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -131,7 +131,7 @@ read_etc_group () strncpy (group_name, "Administrators", sizeof (group_name)); ++group_sem; - FILE *f = fopen (etc_group, "r"); + FILE *f = fopen (etc_group, "rt"); --group_sem; if (f) diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 33c1d6fe8..90a5d2520 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -109,7 +109,7 @@ read_etc_passwd () extern int passwd_sem; char linebuf[1024]; ++passwd_sem; - FILE *f = fopen ("/etc/passwd", "r"); + FILE *f = fopen ("/etc/passwd", "rt"); --passwd_sem; if (f) diff --git a/winsup/cygwin/shared.h b/winsup/cygwin/shared.h index 1c959eca8..51d287794 100644 --- a/winsup/cygwin/shared.h +++ b/winsup/cygwin/shared.h @@ -172,7 +172,7 @@ pinfo *__stdcall procinfo (int n); enum { - PROC_MAGIC = 0xaf07f000, + PROC_MAGIC = 0xaf08f000, PROC_FORK = PROC_MAGIC + 1, PROC_EXEC = PROC_MAGIC + 2, PROC_SPAWN = PROC_MAGIC + 3,