From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 00:33:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06DD7C2E; Sun, 4 Jan 2015 00:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E74333918; Sun, 4 Jan 2015 00:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040XgEV070081; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040XgoC070080; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501040033.t040XgoC070080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Jan 2015 00:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276646 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:33:43 -0000 Author: kib Date: Sun Jan 4 00:33:41 2015 New Revision: 276646 URL: https://svnweb.freebsd.org/changeset/base/276646 Log: Do not erronously export 'openat' symbol from rtld. The symbol leaked after r276630 since lib/libc/sys/openat.c defines versions for openat using .symver (version script cannot assign two versions to one symbol), and rtld uses openat. Instead, directly use __sys_openat(). Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Jan 4 00:12:30 2015 (r276645) +++ head/libexec/rtld-elf/rtld.c Sun Jan 4 00:33:41 2015 (r276646) @@ -166,6 +166,8 @@ static bool matched_symbol(SymLook *, co void r_debug_state(struct r_debug *, struct link_map *) __noinline; void _r_debug_postinit(struct link_map *) __noinline; +int __sys_openat(int, const char *, int, ...); + /* * Data declarations. */ @@ -2824,7 +2826,7 @@ search_library_pathfds(const char *name, dirfd = parse_libdir(fdstr); if (dirfd < 0) break; - fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC); + fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC); if (fd >= 0) { *fdp = fd; len = strlen(fdstr) + strlen(name) + 3;