From patchwork Mon Jun 15 14:20:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 484317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id A87C314029E for ; Tue, 16 Jun 2015 00:20:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=QpAcEB0f; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E9D4EA36B5; Mon, 15 Jun 2015 14:20:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8L0caokhHvOP; Mon, 15 Jun 2015 14:20:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4E940A40F9; Mon, 15 Jun 2015 14:20:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3817A1C1567 for ; Mon, 15 Jun 2015 14:20:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 34FDE9211E for ; Mon, 15 Jun 2015 14:20:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P11ZMAurrz4Z for ; Mon, 15 Jun 2015 14:20:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id BB8D692133 for ; Mon, 15 Jun 2015 14:20:33 +0000 (UTC) Received: by wibdq8 with SMTP id dq8so80093312wib.1 for ; Mon, 15 Jun 2015 07:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=0CrZ+W1o+zyw2tDshdB8nhf0KVO0eMuAn/VLoFzLVE0=; b=QpAcEB0ftB8p4xYxV3OKqrWe4faKqIBKEQTp/ygCxTd1eyga9qeWPQtjDlo+vs6jnN kDeKaiSzljXQYmaSU5aphzJZMyV7r6z5gpT3i5mfC39LSStg0xUJWNnLAxwEEAkbpq6k Uy45tBcB8KDfwlBfaN8rfCPpbmSX1f58zzpaGRtF/q5S9y9rxiS0bMDsU/AKmEbA/7Dv HEF0xTwoD1ax8p4ErmzL6tuBeeO6sGAGx+zilHHmzRWaUMby5JhaWZ8rj3EvPRoPUR6S 7y6x+5UAY75Dn6OZJXGt+fIUiLJhWy7wIiOj89RKBjvX9HxVQIOAhxswtRMQIhWAeLJQ 5Rzw== X-Received: by 10.194.104.164 with SMTP id gf4mr52524391wjb.28.1434378032497; Mon, 15 Jun 2015 07:20:32 -0700 (PDT) Received: from vorel-pc.jablocom.intra ([77.104.250.125]) by mx.google.com with ESMTPSA id ny7sm16120633wic.11.2015.06.15.07.20.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 07:20:31 -0700 (PDT) From: Petr Vorel X-Google-Original-From: Petr Vorel To: buildroot@busybox.net Date: Mon, 15 Jun 2015 16:20:26 +0200 Message-Id: <1434378026-15007-1-git-send-email-vorel@jablocom.com> X-Mailer: git-send-email 2.1.4 Subject: [Buildroot] [PATCH 1/1] Fix umask settings for non-bash shells for root user X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Petr Vorel .bash_profile is not readed by some shells (e.g. busybox), so move umask into .profile. Here it's also loaded .bashrc, when presented and shell is bash. CREDITS: inspired by Debian skeleton files. Signed-off-by: Petr Vorel --- system/skeleton/root/.bash_profile | 7 ------- system/skeleton/root/.profile | 10 ++++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 system/skeleton/root/.bash_profile create mode 100644 system/skeleton/root/.profile diff --git a/system/skeleton/root/.bash_profile b/system/skeleton/root/.bash_profile deleted file mode 100644 index 0ee04a3..0000000 --- a/system/skeleton/root/.bash_profile +++ /dev/null @@ -1,7 +0,0 @@ -# .bash_profile - -umask 022 - -if [ -f ~/.bashrc ]; then - source ~/.bashrc -fi diff --git a/system/skeleton/root/.profile b/system/skeleton/root/.profile new file mode 100644 index 0000000..452ae20 --- /dev/null +++ b/system/skeleton/root/.profile @@ -0,0 +1,10 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +umask 022 + +if [ -n "$BASH_VERSION" ]; then + if [ -f ~/.bashrc ]; then + source ~/.bashrc + fi +fi