You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/12/17 09:49:37 UTC
git commit: updated refs/heads/master to 759d484
Updated Branches:
refs/heads/master 5594ea990 -> 759d484d9
CLOUDSTACK-5489: Query the user name and add it to the command while mounting a cifs share.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/759d484d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/759d484d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/759d484d
Branch: refs/heads/master
Commit: 759d484d9a707fb9cc41eda37bfbad72becd1d92
Parents: 5594ea9
Author: Devdeep Singh <de...@gmail.com>
Authored: Tue Dec 17 14:04:05 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Tue Dec 17 14:19:32 2013 +0530
----------------------------------------------------------------------
.../com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/759d484d/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java
index e6d8e1a..a30eb7d 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java
@@ -230,11 +230,15 @@ public class HypervManagerImpl implements HypervManager {
Script script = null;
String result = null;
if (scheme.equals("cifs")) {
+ String user = System.getProperty("user.name");
Script command = new Script(true, "mount", _timeout, s_logger);
command.add("-t", "cifs");
command.add(path);
command.add(mountPoint);
- command.add("-o", "uid=`whoami`,gid=`whoami`");
+
+ if (user != null) {
+ command.add("-o", "uid=" + user + ",gid=" + user);
+ }
if (query != null) {
query = query.replace('&', ',');