From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0108F158086 for ; Fri, 5 Nov 2021 10:25:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1AADFE08F2; Fri, 5 Nov 2021 10:25:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CBEDEE0893 for ; Fri, 5 Nov 2021 10:25:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 541C033BDC5 for ; Fri, 5 Nov 2021 10:25:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 767521A3 for ; Fri, 5 Nov 2021 10:25:02 +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: <1636104726.018f85d5c9f3e268b9dee96c022a66ff697042dc.vapier@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: src/ X-VCS-Repository: proj/sandbox X-VCS-Files: src/sandbox.c X-VCS-Directories: src/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 018f85d5c9f3e268b9dee96c022a66ff697042dc X-VCS-Branch: master Date: Fri, 5 Nov 2021 10:25:02 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0a64495c-0dfc-4d6b-a0f8-3bd7acdbb93f X-Archives-Hash: 3f06eab6ec9cfd9f922cdd0927b9d748 commit: 018f85d5c9f3e268b9dee96c022a66ff697042dc Author: Mike Frysinger gentoo org> AuthorDate: Fri Nov 5 09:32:06 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Nov 5 09:32:06 2021 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=018f85d5 sandbox: move verbose startup info behind debug knob These messages aren't super useful to most people, nor are needed on every invocation, so put them behind a debug knob to reduce log spam.x Signed-off-by: Mike Frysinger gentoo.org> src/sandbox.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sandbox.c b/src/sandbox.c index 063974d..02f4cbe 100644 --- a/src/sandbox.c +++ b/src/sandbox.c @@ -234,19 +234,22 @@ int main(int argc, char **argv) sb_err("not launching a new sandbox as one is already running in this process hierarchy"); /* determine the location of all the sandbox support files */ - dputs("Detection of the support files."); + if (opt_debug) + dputs("Detection of the support files."); if (-1 == setup_sandbox(&sandbox_info, print_debug)) sb_err("failed to setup sandbox"); /* verify the existance of required files */ - dputs("Verification of the required files."); + if (opt_debug) + dputs("Verification of the required files."); if (!rc_file_exists(sandbox_info.sandbox_rc)) sb_perr("could not open the sandbox rc file: %s", sandbox_info.sandbox_rc); /* set up the required environment variables */ - dputs("Setting up the required environment variables."); + if (opt_debug) + dputs("Setting up the required environment variables."); /* If not in portage, cd into it work directory */ if ('\0' != sandbox_info.work_dir[0]) @@ -346,9 +349,8 @@ int main(int argc, char **argv) sigaction(SIGHUP, &act_old[0], NULL); /* STARTING PROTECTED ENVIRONMENT */ - dputs("The protected environment has been started."); - dputs(sandbox_footer); - dputs("Process being started in forked instance."); + if (opt_debug) + dputs("The protected environment has been started."); /* Start Bash */ int shell_exit = spawn_shell(argv_bash, sandbox_environ, print_debug); @@ -359,8 +361,6 @@ int main(int argc, char **argv) argv_bash = NULL; sandbox_environ = NULL; - dputs("Cleaning up sandbox process"); - dputs(sandbox_banner); dputs("The protected environment has been shut down."); if (rc_file_exists(sandbox_info.sandbox_log)) {