From: Roland McGrath Date: Thu, 27 Jan 2000 19:58:38 +0000 (+0000) Subject: 2000-01-27 Roland McGrath X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e0adb69e757f75d2b0867126d6a8beb827ecfb8;p=thirdparty%2Fglibc.git 2000-01-27 Roland McGrath * hurd/set-host.c (_hurd_set_host_config): Pass O_WRITE in flags to dir_mkfile, so we will be permitted to do the io_write! --- diff --git a/hurd/set-host.c b/hurd/set-host.c index 889f5328853..4ac13e23b07 100644 --- a/hurd/set-host.c +++ b/hurd/set-host.c @@ -1,5 +1,5 @@ /* Set a host configuration item kept as the whole contents of a file. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996,97,99,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,8 +33,9 @@ _hurd_set_host_config (const char *item, const char *value, size_t valuelen) if (dir == MACH_PORT_NULL) return -1; - /* Create a new node. */ - err = __dir_mkfile (dir, O_CREAT|O_TRUNC, 0644, &new); + /* Create a new node. + Only O_READ|O_WRITE|O_EXEC are meaningful in FLAGS. */ + err = __dir_mkfile (dir, O_WRITE, 0644, &new); if (! err) { /* Write the contents. */