Added multiple security tests to pgp keyring against disk full and exceeded quota.

- copy files to tmp before appending new keys, then rename back to original.
- always check for disk full before syncing keyrings
- use tmp file to sync keyring
- new RsDirUtil::fileExists() method
- check system for disk space in pgp directory
- added RsPGPDirectory() method to RsInit


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6541 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-07-25 20:05:31 +00:00
parent d6104c0aa7
commit b84930b157
7 changed files with 94 additions and 10 deletions

View file

@ -291,6 +291,11 @@ int RsDirUtil::breakupDirList(const std::string& path,
return 1;
}
/**** Copied and Tweaked from ftcontroller ***/
bool RsDirUtil::fileExists(const std::string& filename)
{
return ( access( filename.c_str(), F_OK ) != -1 );
}
/**** Copied and Tweaked from ftcontroller ***/
bool RsDirUtil::copyFile(const std::string& source,const std::string& dest)