mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
2002-05-13 Marcus Brinkmann <marcus@gnu.org>
* hurd/hurdchdir.c (_hurd_change_directory_port_from_name): Allocate three, not two, more than LEN when appending '/.'. * sysdeps/mach/hurd/chroot.c (chroot): Likewise. Don't check if NAME ends with '/.' if it is shorter than 2 chars. * mach/Makefile ($(mach-syscalls:%=$(objpfx)%.S)): Make the generated files #include <sysdep.h> instead of <mach/machine/syscall_sw.h>.
This commit is contained in:
parent
6f1428364a
commit
ab7dd85bfb
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
|||||||
|
2002-05-13 Marcus Brinkmann <marcus@gnu.org>
|
||||||
|
|
||||||
|
* hurd/hurdchdir.c (_hurd_change_directory_port_from_name):
|
||||||
|
Allocate three, not two, more than LEN when appending '/.'.
|
||||||
|
* sysdeps/mach/hurd/chroot.c (chroot): Likewise. Don't check
|
||||||
|
if NAME ends with '/.' if it is shorter than 2 chars.
|
||||||
|
|
||||||
2002-05-12 Roland McGrath <roland@frob.com>
|
2002-05-12 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
|
* mach/Makefile ($(mach-syscalls:%=$(objpfx)%.S)): Make the generated
|
||||||
|
files #include <sysdep.h> instead of <mach/machine/syscall_sw.h>.
|
||||||
|
|
||||||
* hurd/hurdexec.c (_hurd_exec): Reauthenticate ports/dtable used in
|
* hurd/hurdexec.c (_hurd_exec): Reauthenticate ports/dtable used in
|
||||||
file_exec to effect svuid=euid, svgid=egid if that is not a no-op.
|
file_exec to effect svuid=euid, svgid=egid if that is not a no-op.
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ _hurd_change_directory_port_from_name (struct hurd_port *portcell,
|
|||||||
lookup = name;
|
lookup = name;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *n = alloca (len + 2);
|
char *n = alloca (len + 3);
|
||||||
memcpy (n, name, len);
|
memcpy (n, name, len);
|
||||||
n[len] = '/';
|
n[len] = '/';
|
||||||
n[len + 1] = '.';
|
n[len + 1] = '.';
|
||||||
|
@ -96,8 +96,8 @@ ifndef mach-syscalls
|
|||||||
no_deps=t
|
no_deps=t
|
||||||
else
|
else
|
||||||
$(mach-syscalls:%=$(objpfx)%.S): $(objpfx)%.S: $(objpfx)mach-syscalls.mk
|
$(mach-syscalls:%=$(objpfx)%.S): $(objpfx)%.S: $(objpfx)mach-syscalls.mk
|
||||||
(echo '#include <mach/machine/syscall_sw.h>'; \
|
(echo '#include <sysdep.h>'; \
|
||||||
echo 'kernel_trap(__$*,$(sysno-$*),$(nargs-$*))'; \
|
echo 'kernel_trap (__$*,$(sysno-$*),$(nargs-$*))'; \
|
||||||
echo 'weak_alias (__$*, $*)') > $@-new
|
echo 'weak_alias (__$*, $*)') > $@-new
|
||||||
mv -f $@-new $@
|
mv -f $@-new $@
|
||||||
generated += $(mach-syscalls:=.S)
|
generated += $(mach-syscalls:=.S)
|
||||||
|
@ -36,11 +36,11 @@ chroot (const char *path)
|
|||||||
/* Append trailing "/." to directory name to force ENOTDIR if it's not a
|
/* Append trailing "/." to directory name to force ENOTDIR if it's not a
|
||||||
directory and EACCES if we don't have search permission. */
|
directory and EACCES if we don't have search permission. */
|
||||||
len = strlen (path);
|
len = strlen (path);
|
||||||
if (path[len - 2] == '/' && path[len - 1] == '.')
|
if (len >= 2 && path[len - 2] == '/' && path[len - 1] == '.')
|
||||||
lookup = path;
|
lookup = path;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *n = alloca (len + 2);
|
char *n = alloca (len + 3);
|
||||||
memcpy (n, path, len);
|
memcpy (n, path, len);
|
||||||
n[len] = '/';
|
n[len] = '/';
|
||||||
n[len + 1] = '.';
|
n[len + 1] = '.';
|
||||||
|
Loading…
Reference in New Issue
Block a user