summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--daemon/misc.c8
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 458a19f0..2815d188 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-05-09 Brian Cameron <brian.cameron@sun.com>
+ * daemon/misc.c: In gdm_fdgetc must used an unsigned char
+ buffer here because the GUI sends username/password data
+ as utf8 and the daemon will interpret any character sent
+ with its high bit set as EOF unless we used unsigned here.
+
+2007-05-09 Brian Cameron <brian.cameron@sun.com>
+
* daemon/slave.c: No longer unset MAIL when starting a user
session. Now set PWD before starting a user session which
fixes problems when the user's $HOME directory is a symlink.
diff --git a/daemon/misc.c b/daemon/misc.c
index a7ff2337..76e6887e 100644
--- a/daemon/misc.c
+++ b/daemon/misc.c
@@ -1073,9 +1073,15 @@ gdm_test_opt (const char *cmd, const char *help, const char *option)
int
gdm_fdgetc (int fd)
{
- char buf[1];
+ unsigned char buf[1];
int bytes;
+ /*
+ * Must used an unsigned char buffer here because the GUI sends
+ * username/password data as utf8 and the daemon will interpret
+ * any character sent with its high bit set as EOF unless we
+ * used unsigned here.
+ */
VE_IGNORE_EINTR (bytes = read (fd, buf, 1));
if (bytes != 1)
return EOF;