Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F660E39A for ; Thu, 14 Feb 2013 01:11:35 +0000 (UTC) Received: (qmail 3343 invoked by uid 500); 14 Feb 2013 01:11:29 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 2918 invoked by uid 500); 14 Feb 2013 01:11:28 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 2249 invoked by uid 99); 14 Feb 2013 01:11:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 01:11:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4023C32566F; Thu, 14 Feb 2013 01:11:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] git commit: refs/heads/storage_refactor - CLOUDSTACK-710: CitrixResourceBase, if dest dir is not found, mkdir -m 700 -p Message-Id: <20130214011127.4023C32566F@tyr.zones.apache.org> Date: Thu, 14 Feb 2013 01:11:27 +0000 (UTC) CLOUDSTACK-710: CitrixResourceBase, if dest dir is not found, mkdir -m 700 -p This is a security failsafe, so even if destination does not exist we mkdir the path with 0700 permission. If path exists mkdir -m 700 -p won't do anything. Signed-off-by: Rohit Yadav Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3a0c99b0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3a0c99b0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3a0c99b0 Branch: refs/heads/storage_refactor Commit: 3a0c99b0a430b12a492f2b93dec8d110603b43b4 Parents: 2e2ee2f Author: Rohit Yadav Authored: Wed Feb 13 22:45:32 2013 +0530 Committer: Rohit Yadav Committed: Wed Feb 13 22:45:32 2013 +0530 ---------------------------------------------------------------------- .../xen/resource/CitrixResourceBase.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a0c99b0/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index c7ff5c7..b3cb54f 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -4763,7 +4763,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe s_logger.debug("Copying " + f + " to " + d + " on " + hr.address + " with permission " + p); } try { - session.execCommand("mkdir -p " + d); + session.execCommand("mkdir -m 700 -p " + d); } catch (IOException e) { s_logger.debug("Unable to create destination path: " + d + " on " + hr.address + " but trying anyway");