summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--login/ChangeLog4
-rw-r--r--login/utmp.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/login/ChangeLog b/login/ChangeLog
index 8bfdb3c1..80477012 100644
--- a/login/ChangeLog
+++ b/login/ChangeLog
@@ -1,3 +1,7 @@
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * utmp.c (return_data): Use mmap instead of vm_allocate.
+
Mon Aug 21 16:35:34 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
* utmp.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
diff --git a/login/utmp.c b/login/utmp.c
index 4333fa92..37d17421 100644
--- a/login/utmp.c
+++ b/login/utmp.c
@@ -1,6 +1,6 @@
/* Login record (utmp) server.
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -271,9 +271,9 @@ return_data(char *data, int data_len, char **buf, int *buf_len)
{
if (data_len > *buf_len)
{
- error_t err = vm_allocate(mach_task_self(), buf, data_len, 1);
- if (err)
- return err;
+ *buf = mmap (0, data_len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (*buf == (char *) -1))
+ return errno;
}
*buf_len = data_len;