mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 09:48:24 +02:00
Merge branch 'glibc-update' into thirteen
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
diff -Naur glibc-2.3.6.org/elf/dl-load.c glibc-2.3.6/elf/dl-load.c
|
||||
--- glibc-2.3.6.org/elf/dl-load.c 2005-04-06 04:50:10.000000000 +0200
|
||||
+++ glibc-2.3.6/elf/dl-load.c 2010-10-19 17:41:09.000000000 +0200
|
||||
@@ -176,8 +176,7 @@
|
||||
|
||||
|
||||
static size_t
|
||||
-is_dst (const char *start, const char *name, const char *str,
|
||||
- int is_path, int secure)
|
||||
+is_dst (const char *start, const char *name, const char *str, int is_path)
|
||||
{
|
||||
size_t len;
|
||||
bool is_curly = false;
|
||||
@@ -206,11 +205,6 @@
|
||||
&& (!is_path || name[len] != ':'))
|
||||
return 0;
|
||||
|
||||
- if (__builtin_expect (secure, 0)
|
||||
- && ((name[len] != '\0' && (!is_path || name[len] != ':'))
|
||||
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
|
||||
- return 0;
|
||||
-
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -225,13 +219,12 @@
|
||||
{
|
||||
size_t len;
|
||||
|
||||
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
|
||||
- is $ORIGIN alone) and it must always appear first in path. */
|
||||
+ /* $ORIGIN is not expanded for SUID/GUID programs. */
|
||||
++name;
|
||||
- if ((len = is_dst (start, name, "ORIGIN", is_path,
|
||||
- INTUSE(__libc_enable_secure))) != 0
|
||||
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
|
||||
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
|
||||
+ if (((len = is_dst (start, name, "ORIGIN", is_path)) != 0
|
||||
+ && !INTUSE(__libc_enable_secure))
|
||||
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
|
||||
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
|
||||
++cnt;
|
||||
|
||||
name = strchr (name + len, '$');
|
||||
@@ -263,12 +256,17 @@
|
||||
size_t len;
|
||||
|
||||
++name;
|
||||
- if ((len = is_dst (start, name, "ORIGIN", is_path,
|
||||
- INTUSE(__libc_enable_secure))) != 0)
|
||||
- repl = l->l_origin;
|
||||
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
|
||||
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
|
||||
+ {
|
||||
+ // Ignore this path at SUID/GUID
|
||||
+ if (INTUSE(__libc_enable_secure))
|
||||
+ repl = (const char *) -1;
|
||||
+ else
|
||||
+ repl = l->l_origin;
|
||||
+ }
|
||||
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
|
||||
repl = GLRO(dl_platform);
|
||||
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
|
||||
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
|
||||
repl = DL_DST_LIB;
|
||||
|
||||
if (repl != NULL && repl != (const char *) -1)
|
||||
@@ -1,45 +0,0 @@
|
||||
Submitted By: Dan Nicholson <dnicholson at linuxfromscratch dot org>
|
||||
Date: 2006-09-01
|
||||
Initial Package Version: 2.3.6
|
||||
Origin: udev-096, syscall functions generated by Alexander E. Patrakov
|
||||
Upstream Status: Added to syscall list in 2.4
|
||||
Description: Adds inotify syscall functions for use in userspace. Minimal
|
||||
syscall functions borrowed from udev local implementation to
|
||||
provide system inotify support.
|
||||
Testcase: dovecot-1.0rc2, ./configure --with-notify=inotify
|
||||
|
||||
diff -pNur glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h
|
||||
--- glibc-2.3.6.orig/sysdeps/unix/sysv/linux/inotify.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/inotify.h 2006-08-01 05:48:27.000000000 +0000
|
||||
@@ -0,0 +1,31 @@
|
||||
+/*
|
||||
+ * Inode based directory notification for Linux
|
||||
+ *
|
||||
+ * Copyright (C) 2005 John McCutchan
|
||||
+ */
|
||||
+
|
||||
+#ifndef _SYS_INOTIFY_H
|
||||
+#define _SYS_INOTIFY_H
|
||||
+
|
||||
+#include <stdint.h>
|
||||
+#include <linux/inotify.h>
|
||||
+#include <asm/unistd.h>
|
||||
+
|
||||
+extern long int syscall (long int __sysno, ...) __THROW;
|
||||
+
|
||||
+static inline int inotify_init(void)
|
||||
+{
|
||||
+ return syscall(__NR_inotify_init);
|
||||
+}
|
||||
+
|
||||
+static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
|
||||
+{
|
||||
+ return syscall(__NR_inotify_add_watch, fd, name, mask);
|
||||
+}
|
||||
+
|
||||
+static inline int inotify_rm_watch (int fd, uint32_t wd)
|
||||
+{
|
||||
+ return syscall(__NR_inotify_rm_watch, fd, wd);
|
||||
+}
|
||||
+
|
||||
+#endif /* _SYS_INOTIFY_H */
|
||||
@@ -1,33 +0,0 @@
|
||||
Submitted By: DJ Lucas <dj at linuxfromscratch dot org>
|
||||
Date: 2006-04-05
|
||||
Initial Package Version: 2.3.6
|
||||
Upstream Status: Committed
|
||||
Origin: Glibc CVS
|
||||
Description: Fixes build errors where linux/types.h is included after sys/kd.h.
|
||||
|
||||
diff -Naur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h
|
||||
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h 2001-07-05 23:56:21.000000000 -0500
|
||||
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h 2006-04-04 21:40:50.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1996, 1997, 2005 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
|
||||
@@ -21,9 +21,15 @@
|
||||
|
||||
/* Make sure the <linux/types.h> header is not loaded. */
|
||||
#ifndef _LINUX_TYPES_H
|
||||
-# define _LINUX_TYPES_H 1
|
||||
+# define _LINUX_TYPES_H 1
|
||||
+# define __undef_LINUX_TYPES_H
|
||||
#endif
|
||||
|
||||
#include <linux/kd.h>
|
||||
|
||||
+#ifdef __undef_LINUX_TYPES_H
|
||||
+# undef _LINUX_TYPES_H
|
||||
+# undef __undef_LINUX_TYPES_H
|
||||
+#endif
|
||||
+
|
||||
#endif /* sys/kd.h */
|
||||
Reference in New Issue
Block a user