Commit 550e6915 authored by Michal Malý's avatar Michal Malý Committed by Elvis Angelaccio

Allow write access to Samba Shares' root

Summary: kio_smb plugin sets Samba Shares as read-only which results
in incorrect behavior when a user tries to write into a share.

CCBUG: 376344

Reviewers: elvisangelaccio

Differential Revision: https://phabricator.kde.org/D5947
parent 11e5303d
......@@ -380,10 +380,10 @@ void SMBSlave::listDir( const QUrl& kurl )
// Set type
udsentry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR );
// Set permissions
udsentry.insert(KIO::UDSEntry::UDS_ACCESS, (S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH));
if (dirp->smbc_type == SMBC_SERVER) {
udsentry.insert(KIO::UDSEntry::UDS_ACCESS, (S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH));
// QString workgroup = m_current_url.host().toUpper();
QUrl u("smb:/");
u.setHost(dirpName);
......@@ -394,7 +394,9 @@ void SMBSlave::listDir( const QUrl& kurl )
udsentry.insert(KIO::UDSEntry::UDS_URL, u.url());
udsentry.insert(KIO::UDSEntry::UDS_MIME_TYPE, QString::fromLatin1("application/x-smb-server"));
}
} else
udsentry.insert(KIO::UDSEntry::UDS_ACCESS, (S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH));
// Call base class to list entry
listEntry(udsentry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment