From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 528631391ED for ; Sat, 8 Mar 2014 05:51:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E8D24E0B12; Sat, 8 Mar 2014 05:51:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0BF2EE0B0A for ; Sat, 8 Mar 2014 05:51:19 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6B3E033FB81 for ; Sat, 8 Mar 2014 05:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 09663188F0 for ; Sat, 8 Mar 2014 05:51:16 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1389124125.4d597a585db0fa017b373d2e096906b3df85fee3.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qcache.c qcheck.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 4d597a585db0fa017b373d2e096906b3df85fee3 X-VCS-Branch: master Date: Sat, 8 Mar 2014 05:51:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f65ea837-8b9a-43c5-bc49-fdba74e48a54 X-Archives-Hash: 8ebe4f8ae3ec899b610a4de7fed05e8e commit: 4d597a585db0fa017b373d2e096906b3df85fee3 Author: Mike Frysinger gentoo org> AuthorDate: Tue Jan 7 19:48:45 2014 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Jan 7 19:48:45 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=4d597a58 qcache/qcheck: use O_CLOEXEC in more places --- qcache.c | 8 ++++---- qcheck.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qcache.c b/qcache.c index 1d9a6eb..1218417 100644 --- a/qcache.c +++ b/qcache.c @@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcache.c,v 1.46 2013/09/29 18:40:22 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcache.c,v 1.47 2014/01/07 19:48:45 vapier Exp $ * * Copyright 2006 Thomas A. Cort - */ @@ -47,7 +47,7 @@ static const char * const qcache_opts_help[] = { COMMON_OPTS_HELP }; -static const char qcache_rcsid[] = "$Id: qcache.c,v 1.46 2013/09/29 18:40:22 vapier Exp $"; +static const char qcache_rcsid[] = "$Id: qcache.c,v 1.47 2014/01/07 19:48:45 vapier Exp $"; #define qcache_usage(ret) usage(ret, QCACHE_FLAGS, qcache_long_opts, qcache_opts_help, lookup_applet_idx("qcache")) /********************************************************************/ @@ -236,7 +236,7 @@ static unsigned int qcache_count_lines(char *filename) int count, fd; char c; - if ((fd = open(filename, O_RDONLY)) != -1) { + if ((fd = open(filename, O_RDONLY|O_CLOEXEC)) != -1) { count = 0; while (read(fd, &c, 1) == 1) @@ -274,7 +274,7 @@ char **qcache_read_lines(char *filename) len = sizeof(char*) * (num_lines + 1); lines = xzalloc(len); - if ((fd = open(filename, O_RDONLY)) != -1) { + if ((fd = open(filename, O_RDONLY|O_CLOEXEC)) != -1) { for (i = 0; i < num_lines; i++) { count = 0; diff --git a/qcheck.c b/qcheck.c index a224a72..0cb5afe 100644 --- a/qcheck.c +++ b/qcheck.c @@ -1,7 +1,7 @@ /* * Copyright 2005-2011 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcheck.c,v 1.58 2013/04/21 04:28:10 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcheck.c,v 1.59 2014/01/07 19:48:45 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - * Copyright 2005-2011 Mike Frysinger - @@ -36,7 +36,7 @@ static const char * const qcheck_opts_help[] = { "Undo prelink when calculating checksums", COMMON_OPTS_HELP }; -static const char qcheck_rcsid[] = "$Id: qcheck.c,v 1.58 2013/04/21 04:28:10 vapier Exp $"; +static const char qcheck_rcsid[] = "$Id: qcheck.c,v 1.59 2014/01/07 19:48:45 vapier Exp $"; #define qcheck_usage(ret) usage(ret, QCHECK_FLAGS, qcheck_long_opts, qcheck_opts_help, lookup_applet_idx("qcheck")) #define qcprintf(fmt, args...) if (!state->bad_only) printf(_(fmt), ## args) @@ -71,7 +71,7 @@ static int qcheck_process_contents(q_vdb_pkg_ctx *pkg_ctx, struct qcheck_opt_sta fpx = NULL; - fd = q_vdb_pkg_openat(pkg_ctx, "CONTENTS", O_RDONLY); + fd = q_vdb_pkg_openat(pkg_ctx, "CONTENTS", O_RDONLY|O_CLOEXEC); if (fd == -1) return EXIT_SUCCESS; if (fstat(fd, &cst)) {