string username = _url.getUsername();
string password = _url.getPassword();
- options["guest"]; // prevent smbmount from asking for password
+ // Use 'guest' option unless explicitly disabled (bnc #547354)
+ if ( options.has( "noguest" ) )
+ options.erase( "noguest" );
+ else
+ options["guest"];
if ( ! options.has( "rw" ) ) {
options["ro"];
* \code
* "cifs://servername/share/path/on/the/share"
* "cifs://username:passwd@servername/share/path/on/the/share?mountoptions=ro"
+ * "cifs://username:passwd@servername/share/path/on/the/share?mountoptions=noguest"
* "smb://servername/share/path/on/the/share"
* "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro"
* \endcode
* - Query parameters:
* - <tt>mountoptions</tt>:
* The mount options separated by a comma ','. Default are the
- * "ro" and "guest" options.
+ * "ro" and "guest" options. Specify "noguest" to turn off
+ * "guest". This is necessary if Samba is configured to reject
+ * guest connections.
* - <tt>workgroup</tt> or <tt>domain</tt>:
* The name of the workgroup.
* - <tt>username</tt>: