r5200 - in glibc-package/trunk/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2012-04-24 22:08:25 +0000 (Tue, 24 Apr 2012)
New Revision: 5200
Added:
glibc-package/trunk/debian/patches/hurd-i386/cvs-symlink_dealloc.diff
Removed:
glibc-package/trunk/debian/patches/hurd-i386/tg-symlink_dealloc.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
patches/hurd-i386/tg-symlink_dealloc.diff: Replace with...
patches/hurd-i386/cvs-symlink_dealloc.diff: ... upstream version.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2012-04-24 09:47:09 UTC (rev 5199)
+++ glibc-package/trunk/debian/changelog 2012-04-24 22:08:25 UTC (rev 5200)
@@ -34,6 +34,8 @@
* debhelper.in/libc-dev.install.hurd-i386: Add libpthread.a and
libpthread2.a.
* control.in/libc,control: Make libc-dev replace the hurd package.
+ * patches/hurd-i386/tg-symlink_dealloc.diff: Replace with...
+ * patches/hurd-i386/cvs-symlink_dealloc.diff: ... upstream version.
-- Samuel Thibault <sthibault@debian.org> Mon, 23 Apr 2012 00:15:44 +0000
Added: glibc-package/trunk/debian/patches/hurd-i386/cvs-symlink_dealloc.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/cvs-symlink_dealloc.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/cvs-symlink_dealloc.diff 2012-04-24 22:08:25 UTC (rev 5200)
@@ -0,0 +1,94 @@
+commit 87ef29ca94bb5b4bb6a0b8ef40d387470d4baac3
+Author: Roland McGrath <roland@hack.frob.com>
+Date: Tue Apr 24 13:12:12 2012 -0700
+
+ Hurd: fix symlink/symlinkat error case not to do an extraneous __mach_port_deallocate.
+
+diff --git a/sysdeps/mach/hurd/symlink.c b/sysdeps/mach/hurd/symlink.c
+index 8bca405..0754b18 100644
+--- a/sysdeps/mach/hurd/symlink.c
++++ b/sysdeps/mach/hurd/symlink.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2012 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
+@@ -46,19 +46,22 @@ __symlink (from, to)
+ err = __dir_mkfile (dir, O_WRITE, 0777 & ~_hurd_umask, &node);
+
+ if (! err)
+- /* Set the node's translator to make it a symlink. */
+- err = __file_set_translator (node,
+- FS_TRANS_EXCL|FS_TRANS_SET,
+- FS_TRANS_EXCL|FS_TRANS_SET, 0,
+- buf, sizeof (_HURD_SYMLINK) + len,
+- MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
++ {
++ /* Set the node's translator to make it a symlink. */
++ err = __file_set_translator (node,
++ FS_TRANS_EXCL|FS_TRANS_SET,
++ FS_TRANS_EXCL|FS_TRANS_SET, 0,
++ buf, sizeof (_HURD_SYMLINK) + len,
++ MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
+
+- if (! err)
+- /* Link the node, now a valid symlink, into the target directory. */
+- err = __dir_link (dir, node, name, 1);
++ if (! err)
++ /* Link the node, now a valid symlink, into the target directory. */
++ err = __dir_link (dir, node, name, 1);
++
++ __mach_port_deallocate (__mach_task_self (), node);
++ }
+
+ __mach_port_deallocate (__mach_task_self (), dir);
+- __mach_port_deallocate (__mach_task_self (), node);
+
+ if (err)
+ return __hurd_fail (err);
+diff --git a/sysdeps/mach/hurd/symlinkat.c b/sysdeps/mach/hurd/symlinkat.c
+index 0fa667d..ff11ecd 100644
+--- a/sysdeps/mach/hurd/symlinkat.c
++++ b/sysdeps/mach/hurd/symlinkat.c
+@@ -1,6 +1,5 @@
+ /* Create a symbolic link named relative to an open directory. Hurd version.
+- Copyright (C) 1991,1992,1993,1994,1995,1996,1997,2006
+- Free Software Foundation, Inc.
++ Copyright (C) 1991-2012 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
+@@ -53,19 +52,22 @@ symlinkat (from, fd, to)
+ err = __dir_mkfile (dir, O_WRITE, 0777 & ~_hurd_umask, &node);
+
+ if (! err)
+- /* Set the node's translator to make it a symlink. */
+- err = __file_set_translator (node,
+- FS_TRANS_EXCL|FS_TRANS_SET,
+- FS_TRANS_EXCL|FS_TRANS_SET, 0,
+- buf, sizeof (_HURD_SYMLINK) + len,
+- MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
++ {
++ /* Set the node's translator to make it a symlink. */
++ err = __file_set_translator (node,
++ FS_TRANS_EXCL|FS_TRANS_SET,
++ FS_TRANS_EXCL|FS_TRANS_SET, 0,
++ buf, sizeof (_HURD_SYMLINK) + len,
++ MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
+
+- if (! err)
+- /* Link the node, now a valid symlink, into the target directory. */
+- err = __dir_link (dir, node, name, 1);
++ if (! err)
++ /* Link the node, now a valid symlink, into the target directory. */
++ err = __dir_link (dir, node, name, 1);
++
++ __mach_port_deallocate (__mach_task_self (), node);
++ }
+
+ __mach_port_deallocate (__mach_task_self (), dir);
+- __mach_port_deallocate (__mach_task_self (), node);
+
+ if (err)
+ return __hurd_fail (err);
Deleted: glibc-package/trunk/debian/patches/hurd-i386/tg-symlink_dealloc.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-symlink_dealloc.diff 2012-04-24 09:47:09 UTC (rev 5199)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-symlink_dealloc.diff 2012-04-24 22:08:25 UTC (rev 5200)
@@ -1,75 +0,0 @@
-From: Ludovic Courtès <ludo@gnu.org>
-Subject: [PATCH] Fix invalid port deallocation in `symlink'
-
-2012-03-18 Ludovic Courtès <address@hidden>
-
- * sysdeps/mach/hurd/symlink.c (__symlink): Deallocate NODE only
- when it is non-null.
- * sysdeps/mach/hurd/symlinkat.c (symlinkat): Likewise.
-
----
- sysdeps/mach/hurd/symlink.c | 7 +++++--
- sysdeps/mach/hurd/symlinkat.c | 7 +++++--
- 2 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/sysdeps/mach/hurd/symlink.c b/sysdeps/mach/hurd/symlink.c
-index 857e236..4a4e61f 100644
---- a/sysdeps/mach/hurd/symlink.c
-+++ b/sysdeps/mach/hurd/symlink.c
-@@ -1,4 +1,4 @@
--/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
-+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 12 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
-@@ -44,6 +44,7 @@ __symlink (from, to)
- return -1;
-
- /* Create a new, unlinked node in the target directory. */
-+ node = MACH_PORT_NULL;
- err = __dir_mkfile (dir, O_WRITE, 0777 & ~_hurd_umask, &node);
-
- if (! err)
-@@ -59,7 +60,9 @@ __symlink (from, to)
- err = __dir_link (dir, node, name, 1);
-
- __mach_port_deallocate (__mach_task_self (), dir);
-- __mach_port_deallocate (__mach_task_self (), node);
-+
-+ if (node != MACH_PORT_NULL)
-+ __mach_port_deallocate (__mach_task_self (), node);
-
- if (err)
- return __hurd_fail (err);
-diff --git a/sysdeps/mach/hurd/symlinkat.c b/sysdeps/mach/hurd/symlinkat.c
-index 9a51c66..71806d7 100644
---- a/sysdeps/mach/hurd/symlinkat.c
-+++ b/sysdeps/mach/hurd/symlinkat.c
-@@ -1,5 +1,5 @@
- /* Create a symbolic link named relative to an open directory. Hurd version.
-- Copyright (C) 1991,1992,1993,1994,1995,1996,1997,2006
-+ Copyright (C) 1991,1992,1993,1994,1995,1996,1997,2006,2012
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
-@@ -51,6 +51,7 @@ symlinkat (from, fd, to)
- return -1;
-
- /* Create a new, unlinked node in the target directory. */
-+ node = MACH_PORT_NULL;
- err = __dir_mkfile (dir, O_WRITE, 0777 & ~_hurd_umask, &node);
-
- if (! err)
-@@ -66,7 +67,9 @@ symlinkat (from, fd, to)
- err = __dir_link (dir, node, name, 1);
-
- __mach_port_deallocate (__mach_task_self (), dir);
-- __mach_port_deallocate (__mach_task_self (), node);
-+
-+ if (node != MACH_PORT_NULL)
-+ __mach_port_deallocate (__mach_task_self (), node);
-
- if (err)
- return __hurd_fail (err);
---
-tg: (0234227..) t/symlink_dealloc (depends on: baseline)
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2012-04-24 09:47:09 UTC (rev 5199)
+++ glibc-package/trunk/debian/patches/series 2012-04-24 22:08:25 UTC (rev 5200)
@@ -178,7 +178,7 @@
hurd-i386/tg-mach-nanosleep.diff
hurd-i386/cvs-mmap.diff
hurd-i386/cvs-hurd-socket-EAFNOSUPPORT.diff
-hurd-i386/tg-symlink_dealloc.diff
+hurd-i386/cvs-symlink_dealloc.diff
hurd-i386/tg-hooks.diff
hurd-i386/libpthread.diff
hurd-i386/libpthread_fix.diff
Reply to: