Update talk to 59410372.

R=jiayl@webrtc.org, wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6929004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5367 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mallinath@webrtc.org
2014-01-11 01:26:23 +00:00
parent 023cc5abc7
commit 0f3356e20b
50 changed files with 974 additions and 746 deletions

View File

@@ -50,7 +50,6 @@
#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <unistd.h>
#endif // POSIX && !OSX
#if defined(LINUX)
@@ -368,6 +367,8 @@ bool UnixFilesystem::GetAppPathname(Pathname* path) {
if (success)
path->SetPathname(path8);
return success;
#elif defined(__native_client__)
return false;
#else // OSX
char buffer[NAME_MAX+1];
size_t len = readlink("/proc/self/exe", buffer, ARRAY_SIZE(buffer) - 1);
@@ -453,6 +454,7 @@ bool UnixFilesystem::GetAppDataFolder(Pathname* path, bool per_user) {
if (!CreateFolder(*path, 0700)) {
return false;
}
#if !defined(__native_client__)
// If the folder already exists, it may have the wrong mode or be owned by
// someone else, both of which are security problems. Setting the mode
// avoids both issues since it will fail if the path is not owned by us.
@@ -460,6 +462,7 @@ bool UnixFilesystem::GetAppDataFolder(Pathname* path, bool per_user) {
LOG_ERR(LS_ERROR) << "Can't set mode on " << path;
return false;
}
#endif
return true;
}
@@ -553,3 +556,11 @@ char* UnixFilesystem::CopyString(const std::string& str) {
}
} // namespace talk_base
#if defined(__native_client__)
extern "C" int __attribute__((weak))
link(const char* oldpath, const char* newpath) {
errno = EACCES;
return -1;
}
#endif