mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5489: Query the user name and add it to the command while mounting a cifs share.
This commit is contained in:
parent
5594ea990f
commit
759d484d9a
|
|
@ -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('&', ',');
|
||||
|
|
|
|||
Loading…
Reference in New Issue