ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #05175
[Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into lp:ubuntu-filemanager-app
Carlos Jose Mazieri has proposed merging lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into lp:ubuntu-filemanager-app with lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 as a prerequisite.
Commit message:
ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/273337
ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 16:04:23 +0000
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp 2015-10-04 16:04:23 +0000
@@ -342,7 +342,7 @@
Smb::FileHandler fd = 0;
::memset(st, 0, sizeof(struct stat));
if ((fd=openDir(context, smb_path)) )
- {
+ {
ret = guessDirType(context,fd);
closeHandle(context, fd);
if (ret == StatDir)
@@ -356,7 +356,7 @@
}
}
else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
- {
+ {
errno = 0;
ret = getStat(context, smb_path,st);
}
@@ -636,6 +636,10 @@
{
return false;
}
+ if (::strcmp(shareName, "ADMIN$") == 0)
+ {
+ return false;
+ }
return true;
}
@@ -727,7 +731,7 @@
bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
{
- int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+ int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
if (ret < 0)
{
SHOW_ERRNO(smb_path);
Follow ups