Author: sthibault Date: 2014-08-27 22:15:05 +0000 (Wed, 27 Aug 2014) New Revision: 6258
Modified: glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask.diff glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask2.diff Log: upstream review Modified: glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask.diff =================================================================== --- glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask.diff 2014-08-27 21:24:09 UTC (rev 6257) +++ glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask.diff 2014-08-27 22:15:05 UTC (rev 6258) @@ -20,21 +20,19 @@ char *n; dir = __file_name_split (name, &n); -@@ -61,36 +61,38 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad +@@ -61,36 +61,32 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad MACH_MSG_TYPE_COPY_SEND); if (! err) { - /* Link the node, now a socket, into the target directory. */ - err = __dir_link (dir, node, n, 1); - if (err == EEXIST) -- err = EADDRINUSE; + enum retry_type doretry; + char retryname[1024]; + /* Get a port to the ifsock translator. */ + err = __dir_lookup (node, "", 0, 0, &doretry, retryname, &ifsock); -+ if (! err) -+ if (doretry != FS_RETRY_NORMAL || retryname[0] != '\0') -+ err = EADDRINUSE; ++ if (! err && (doretry != FS_RETRY_NORMAL || retryname[0] != '\0')) + err = EADDRINUSE; } - __mach_port_deallocate (__mach_task_self (), node); if (! err) @@ -42,23 +40,18 @@ - /* Get a port to the ifsock translator. */ - file_t ifsock = __file_name_lookup_under (dir, n, 0, 0); - if (ifsock == MACH_PORT_NULL) -- { -- err = errno; -- /* If we failed, get rid of the node we created. */ -- __dir_unlink (dir, n); -- } -- else + /* Get the address port. */ + err = __ifsock_getsockaddr (ifsock, &aport); + if (err == MIG_BAD_ID || err == EOPNOTSUPP) -+ /* We are not talking to /hurd/ifsock. Probably -+ someone came in after we linked our node, unlinked -+ it, and replaced it with a different node, before we -+ did our lookup. Treat it as if our link had failed -+ with EEXIST. */ -+ err = EADDRINUSE; ++ err = EGRATUITOUS; + if (! err) { +- err = errno; +- /* If we failed, get rid of the node we created. */ +- __dir_unlink (dir, n); +- } +- else +- { - /* Get the address port. */ - err = __ifsock_getsockaddr (ifsock, &aport); - if (err == MIG_BAD_ID || err == EOPNOTSUPP) @@ -68,7 +61,7 @@ - did our lookup. Treat it as if our link had failed - with EEXIST. */ + /* Link the node, now a socket with proper mode, into the -+ * target directory. */ ++ target directory. */ + err = __dir_link (dir, node, n, 1); + if (err == EEXIST) err = EADDRINUSE; Modified: glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask2.diff =================================================================== --- glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask2.diff 2014-08-27 21:24:09 UTC (rev 6257) +++ glibc-package/trunk/debian/patches/hurd-i386/submitted-bind_umask2.diff 2014-08-27 22:15:05 UTC (rev 6258) @@ -22,12 +22,12 @@ if (! err) { -@@ -82,11 +82,16 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad - err = EADDRINUSE; +@@ -76,11 +76,16 @@ __bind (int fd, __CONST_SOCKADDR_ARG ad + err = EGRATUITOUS; if (! err) { - /* Link the node, now a socket with proper mode, into the -- * target directory. */ +- target directory. */ - err = __dir_link (dir, node, n, 1); - if (err == EEXIST) - err = EADDRINUSE; @@ -36,7 +36,7 @@ + if (! err) + { + /* Link the node, now a socket with proper mode, into the -+ * target directory. */ ++ target directory. */ + err = __dir_link (dir, node, n, 1); + if (err == EEXIST) + err = EADDRINUSE; -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1xmluf-0006k6...@moszumanska.debian.org