Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <libzypp> master : CIFS/SMB: Support mountoption 'noguest' in URL (bnc #547354)
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Mon, 2 Nov 2009 20:09:57 +0100
  • Message-id: <E1N52KV-0004HF-Pa@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit ff252a47b6f207ca63cacd24fd20bbe1ea0d52b3
Author: Michael Andres <ma@xxxxxxx>
Date: Mon Nov 2 20:08:00 2009 +0100

CIFS/SMB: Support mountoption 'noguest' in URL (bnc #547354)
---
zypp/media/MediaCIFS.cc | 6 +++++-
zypp/media/MediaManager.h | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/zypp/media/MediaCIFS.cc b/zypp/media/MediaCIFS.cc
index 7d5215e..bbd9a5e 100644
--- a/zypp/media/MediaCIFS.cc
+++ b/zypp/media/MediaCIFS.cc
@@ -174,7 +174,11 @@ namespace zypp {
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"];
diff --git a/zypp/media/MediaManager.h b/zypp/media/MediaManager.h
index dbadab9..c0c411e 100644
--- a/zypp/media/MediaManager.h
+++ b/zypp/media/MediaManager.h
@@ -313,6 +313,7 @@ namespace zypp
* \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
@@ -321,7 +322,9 @@ namespace zypp
* - 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>:
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages