mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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…
x
Reference in New Issue
Block a user