cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devd...@apache.org
Subject git commit: updated refs/heads/4.3 to 079baaf
Date Tue, 17 Dec 2013 08:34:31 GMT
Updated Branches:
  refs/heads/4.3 edbc80ba6 -> 079baafce


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/079baafc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/079baafc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/079baafc

Branch: refs/heads/4.3
Commit: 079baafceaa7ae55c730f528e50b7e984cf667b5
Parents: edbc80b
Author: Devdeep Singh <devdeep@gmail.com>
Authored: Tue Dec 17 14:04:05 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Tue Dec 17 14:04:05 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/079baafc/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 5271fe0..9ee3c8a 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
@@ -227,11 +227,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('&', ',');


Mime
View raw message