@@ -70,7 +70,7 @@ func (c cifsDriver) Mount(r volume.Request) volume.Response {
7070 return volume.Response {Err : err .Error ()}
7171 }
7272
73- if err := c .mountVolume (source , hostdir , c .getCreds (host )); err != nil {
73+ if err := c .mountVolume (r . Name , source , hostdir , c .getCreds (host )); err != nil {
7474 return volume.Response {Err : err .Error ()}
7575 }
7676 c .mountm .Add (r .Name , hostdir )
@@ -127,7 +127,7 @@ func (c cifsDriver) parseHost(r volume.Request) string {
127127 return name
128128}
129129
130- func (s cifsDriver ) mountVolume (source , dest string , creds * cifsCreds ) error {
130+ func (s cifsDriver ) mountVolume (name , source , dest string , creds * cifsCreds ) error {
131131 var opts bytes.Buffer
132132
133133 opts .WriteString ("-o " )
@@ -136,8 +136,8 @@ func (s cifsDriver) mountVolume(source, dest string, creds *cifsCreds) error {
136136 var domain = creds .domain
137137 var security = creds .security
138138
139- if s .mountm .HasOptions (dest ) {
140- mopts := s .mountm .GetOptions (dest )
139+ if s .mountm .HasOptions (name ) {
140+ mopts := s .mountm .GetOptions (name )
141141 if v , found := mopts [UsernameOpt ]; found {
142142 user = v
143143 }
@@ -173,7 +173,7 @@ func (s cifsDriver) mountVolume(source, dest string, creds *cifsCreds) error {
173173
174174 opts .WriteString (fmt .Sprintf ("%s %s" , source , dest ))
175175 cmd := fmt .Sprintf ("mount -t cifs %s" , opts .String ())
176- log .Debugf ("Executing: %s\n " , strings .Replace (cmd , pass , "" , 1 ))
176+ log .Debugf ("Executing: %s\n " , strings .Replace (cmd , "password=" + pass , "password=**** " , 1 ))
177177 return run (cmd )
178178}
179179
0 commit comments