Sun Jan 28 17:25:38 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>

* setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
	make C++ happy.
	* alpha/jmp_buf.h: Likewise.
	* m68k/jmp_buf.h: Likewise.
	* mips/jmp_buf.h: Likewise.
	* sparc/jmp_buf.h: Likewise.
	* vax/jmp_buf.h: Likewise.
Sun Jan 28 17:25:38 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
	make C++ happy.
	* alpha/jmp_buf.h: Likewise.
	* m68k/jmp_buf.h: Likewise.
	* mips/jmp_buf.h: Likewise.
	* sparc/jmp_buf.h: Likewise.
	* vax/jmp_buf.h: Likewise.

	* sysdeps/generic/memmem.c: Fix return value in case where
	NEEDLE_LEN==0.

	* hurd/hurdlookup.c (__file_name_lookup_under,
	__file_name_lookup): Restrict mode with umask.
	* sysdeps/mach/hurd/xmknod.c: Restrict mode with umask.
	* sysdeps/mach/hurd/mkdir.c: Restrict mode with umask.
This commit is contained in:
Roland McGrath 1996-01-28 22:47:31 +00:00
parent eb8c0f2de5
commit dc825f85f4
6 changed files with 31 additions and 11 deletions

View File

@ -1,3 +1,21 @@
Sun Jan 28 17:25:38 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
make C++ happy.
* alpha/jmp_buf.h: Likewise.
* m68k/jmp_buf.h: Likewise.
* mips/jmp_buf.h: Likewise.
* sparc/jmp_buf.h: Likewise.
* vax/jmp_buf.h: Likewise.
* sysdeps/generic/memmem.c: Fix return value in case where
NEEDLE_LEN==0.
* hurd/hurdlookup.c (__file_name_lookup_under,
__file_name_lookup): Restrict mode with umask.
* sysdeps/mach/hurd/xmknod.c: Restrict mode with umask.
* sysdeps/mach/hurd/mkdir.c: Restrict mode with umask.
Fri Jan 26 12:20:45 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* stdlib/strtol.c: Undo last change. ANSI C changed since the

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 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
@ -352,7 +352,7 @@ __file_name_lookup (const char *file_name, int flags, mode_t mode)
file_t result;
err = __hurd_file_name_lookup (&_hurd_ports_use, &__getdport,
file_name, flags, mode,
file_name, flags, mode & ~_hurd_umask,
&result);
return err ? (__hurd_fail (err), MACH_PORT_NULL) : result;
@ -388,7 +388,7 @@ __file_name_lookup_under (file_t startdir,
}
err = __hurd_file_name_lookup (&use_init_port, &__getdport,
file_name, flags, mode,
file_name, flags, mode & ~_hurd_umask,
&result);
return err ? (__hurd_fail (err), MACH_PORT_NULL) : result;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@ -32,7 +32,7 @@ __BEGIN_DECLS
#include <sigset.h> /* Get `__sigset_t'. */
/* Calling environment, plus possibly a saved signal mask. */
typedef struct
typedef struct __jmp_buf /* C++ doesn't like tagless structs. */
{
/* NOTE: The machine-dependent definitions of `__sigsetjmp'
assume that a `jmp_buf' begins with a `__jmp_buf'.
@ -54,7 +54,7 @@ extern int __sigsetjmp __P ((jmp_buf __env, int __savemask));
The ANSI C standard says `setjmp' is a macro. */
#define setjmp(env) __sigsetjmp ((env), 0)
#else
/* We are in 4.3 BSD-compatibility mode in which `setjmp'
/* We are in 4.3 BSD-compatibility mode in which `setjmp'
saves the signal mask like `sigsetjmp (ENV, 1)'. */
#define setjmp(env) __sigsetjmp ((env), 1)
#endif /* Favor BSD. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1993, 1994, 1996 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,7 +33,9 @@ DEFUN(memmem, (haystack, haystack_len,
= (CONST char *) haystack + haystack_len - needle_len;
if (needle_len == 0)
return (PTR) &((CONST char *) haystack)[needle_len - 1];
/* The first occurrence of the empty string is deemed to occur at
the end of the string. */
return (PTR) &((CONST char *) haystack)[haystack_len - 1];
for (begin = (CONST char *) haystack; begin <= last_possible; ++begin)
if (begin[0] == ((CONST char *) needle)[0] &&

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1993, 1994, 1995, 1996 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
@ -31,7 +31,7 @@ DEFUN(__mkdir, (file_name, mode), CONST char *file_name AND mode_t mode)
file_t parent = __file_name_split (file_name, (char **) &name);
if (parent == MACH_PORT_NULL)
return -1;
err = __dir_mkdir (parent, name, mode);
err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
__mach_port_deallocate (__mach_task_self (), parent);
if (err)
return __hurd_fail (err);

View File

@ -90,7 +90,7 @@ __xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
return -1;
/* Create a new, unlinked node in the target directory. */
err = __dir_mkfile (dir, O_WRITE, mode & ~S_IFMT & _hurd_umask, &node);
err = __dir_mkfile (dir, O_WRITE, (mode & ~S_IFMT) & ~_hurd_umask, &node);
if (! err)
/* Set the node's translator to make it a device. */