added: functions: chmod, chown

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@587 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-02-16 18:34:41 +00:00
parent 4fe3d4339f
commit 87747fab06
17 changed files with 275 additions and 60 deletions

View File

@@ -12,6 +12,7 @@
#include "log.h"
#include "db.h"
#include "data.h"
#include "request.h"
void Dirs::Clear()
@@ -26,7 +27,17 @@ void Dirs::CheckRootDir()
DirContainer::Iterator i = dir_table.GetRoot();
if( i != dir_table.End() )
{
if( !request.HasReadExecAccessForRoot(*i) )
{
i->privileges = 0755;
log << log1 << "Dirs: there is no access for root (admin) to the root dir, setting 0755 for root dir" << logend;
db.EditPrivById(*i, i->id);
}
return;
}
log << log1 << "Dirs: there is no a root dir in the database (creating one)" << logend;
@@ -272,7 +283,8 @@ void Dirs::SplitPath(const std::string & path, std::string & dir, std::string &
// !! przeniesc to do rm
// mamy juz interfejs do chodzenia po parentach
void Dirs::DeleteDir(long id)
{
DirContainer::ParentIterator pnext, p = dir_table.FindFirstParent(id);