Bug 68893 - Password is re-requested FAR too often when Browsing a password protected share
Summary: Password is re-requested FAR too often when Browsing a password protected share
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: smb (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 42663 69067 71030 76760 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-23 23:44 UTC by Daniel Thaler
Modified: 2004-07-27 10:10 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Thaler 2003-11-23 23:44:48 UTC
Version:           unknown (using KDE 3.1.93 (CVS >= 20031111), compiled sources)
Compiler:          gcc version 3.3.2
OS:          Linux (i686) release 2.6.0-test9-mm4

When browsing a password protected smb-share, I am asked to type my password for every subfolder and file I open instead of only once for the entire share. This makes getting at files in subfolder a total pain!
Comment 1 Daniel Thaler 2003-11-23 23:47:46 UTC
BTW: This looks like bug #26069 (in kde 2.x) which is marked RESOLVED?!
Comment 2 Stephan Kulow 2003-11-24 00:25:50 UTC
The question is basically: do you use samba 2 or samba 3 (i.e. is your kio_smb linked against libsmbclient or not)
Comment 3 Daniel Thaler 2003-11-24 00:38:16 UTC
I'm using samba 3 and kio_smb is linked against libsmbclient.
Comment 4 Nilesh Bansal 2003-11-26 19:04:33 UTC
*** Bug 69067 has been marked as a duplicate of this bug. ***
Comment 5 Bart Verwilst 2003-12-19 22:59:48 UTC
This is a VERY annoying bug indeed... I hope this will get fixed soon? :$

Thanks in advance!
Comment 6 Stephan Kulow 2004-01-14 14:41:41 UTC
*** Bug 71030 has been marked as a duplicate of this bug. ***
Comment 7 Marcin Palka 2004-02-16 09:38:21 UTC
The same issue with 3.2 final on Mandrake. I am browsing smb resorces using konqi and smb:/ Password is prompted all the time when browsing different directories on the same machine in the net (e.g. when going deeper and deeper into shares tree). It's critical to fix it ASAP (IMHO).
Comment 8 andreas 2004-02-17 18:50:14 UTC
Same here with samba 3.0.2a and kio-smb-3.2.0-48926cl from Conectiva Linux snapshot. A simple refresh (F5) will make the password prompt appear again.

$ ldd /usr/lib/kde3/lib/kde3/kio_smb.so|grep smb
        libsmbclient.so.0 => /usr/lib/./libsmbclient.so.0 (0x4126a000)
$ rpm -qf /usr/lib/./libsmbclient.so.0
libsmbclient0-3.0.2a-49421cl
Comment 9 Stephan Kulow 2004-02-22 20:10:40 UTC
CVS commit by coolo: 

Making KDE Enterprise-Ready in redirecting in case the user name changed
CCMAIL: 68893-done@bugs.kde.org


  M +13 -11    kio_smb_browse.cpp   1.30


--- kdebase/kioslave/smb/kio_smb_browse.cpp  #1.29:1.30
@@ -44,6 +44,6 @@ using namespace KIO;
 int SMBSlave::cache_stat(const SMBUrl &url, struct stat* st )
 {
-    int result = smbc_stat(url.toSmbcUrl(), st);
-    kdDebug(KIO_SMB) << "smbc_stat " << url.toSmbcUrl() << " " << errno << " " << result << endl;
+    int result = smbc_stat( url.toSmbcUrl(), st);
+    kdDebug(KIO_SMB) << "smbc_stat " << url.prettyUrl() << " " << errno << " " << result << endl;
     return result;
 }
@@ -57,5 +57,4 @@ bool SMBSlave::browse_stat_path(const SM
     SMBUrl url = _url;
 
- again:
    if(cache_stat(url, &st) == 0)
    {
@@ -115,6 +114,8 @@ bool SMBSlave::browse_stat_path(const SM
        if (!ignore_errors) {
            if (errno == EPERM || errno == EACCES)
-               if (checkPassword(url))
-                   goto again;
+               if (checkPassword(url)) {
+                   redirection( url );
+                   return false;
+               }
 
            reportError(url);
@@ -140,5 +141,4 @@ void SMBSlave::stat( const KURL& kurl )
     {
         redirection(url);
-        finished();
         return;
     }
@@ -280,5 +280,5 @@ void SMBSlave::reportError(const SMBUrl 
 void SMBSlave::listDir( const KURL& kurl )
 {
-   kdDebug(KIO_SMB) << "SMBSlave::listDir on " << kurl << endl;
+   kdDebug(KIO_SMB) << "SMBSlave::listDir on " << kurl.url() << endl;
 
    // check (correct) URL
@@ -299,5 +299,4 @@ void SMBSlave::listDir( const KURL& kurl
    UDSAtom     atom;
 
- again:
    dirfd = smbc_opendir( m_current_url.toSmbcUrl() );
    kdDebug(KIO_SMB) << "SMBSlave::listDir open " << m_current_url.toSmbcUrl() << " " << m_current_url.getType() << " " << dirfd << endl;
@@ -406,6 +405,9 @@ void SMBSlave::listDir( const KURL& kurl
    {
        if (errno == EPERM || errno == EACCES)
-           if (checkPassword(m_current_url))
-               goto again;
+           if (checkPassword(m_current_url)) {
+               redirection( m_current_url );
+               finished();
+               return;
+           }
 
        reportError(m_current_url);


Comment 10 Tommi Tervo 2004-03-04 22:24:47 UTC
*** Bug 76760 has been marked as a duplicate of this bug. ***
Comment 11 Tommi Tervo 2004-03-18 22:16:54 UTC
*** Bug 42663 has been marked as a duplicate of this bug. ***