mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
Remove content process sandbox code.
This commit is contained in:
parent
d87cc84005
commit
369378d566
41 changed files with 1 additions and 1823 deletions
|
|
@ -738,14 +738,6 @@ GetSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory,
|
|||
}
|
||||
return rv;
|
||||
}
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
case Win_LocalAppdataLow: {
|
||||
// This should only really fail on versions pre-Vista, in which case this
|
||||
// shouldn't have been used in the first place.
|
||||
GUID localAppDataLowGuid = FOLDERID_LocalAppDataLow;
|
||||
return GetKnownFolder(&localAppDataLowGuid, aFile);
|
||||
}
|
||||
#endif
|
||||
case Win_Documents: {
|
||||
return GetLibrarySaveToPath(CSIDL_MYDOCUMENTS,
|
||||
FOLDERID_DocumentsLibrary,
|
||||
|
|
|
|||
|
|
@ -79,9 +79,6 @@ enum SystemDirectories {
|
|||
Win_Pictures = 233,
|
||||
Win_Music = 234,
|
||||
Win_Videos = 235,
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
Win_LocalAppdataLow = 236,
|
||||
#endif
|
||||
|
||||
Unix_LocalDirectory = 301,
|
||||
Unix_LibDirectory = 302,
|
||||
|
|
|
|||
|
|
@ -84,35 +84,6 @@
|
|||
|
||||
#define NS_APP_PERMISSION_PARENT_DIR "permissionDBPDir"
|
||||
|
||||
#if (defined(XP_WIN) || defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
|
||||
//
|
||||
// NS_APP_CONTENT_PROCESS_TEMP_DIR refers to a directory that is read and
|
||||
// write accessible from a sandboxed content process. The key may be used in
|
||||
// either process, but the directory is intended to be used for short-lived
|
||||
// files that need to be saved to the filesystem by the content process and
|
||||
// don't need to survive browser restarts. The directory is reset on startup.
|
||||
// The key is only valid when MOZ_CONTENT_SANDBOX is defined. When
|
||||
// MOZ_CONTENT_SANDBOX is defined, the directory the key refers to differs
|
||||
// depending on whether or not content sandboxing is enabled.
|
||||
//
|
||||
// When MOZ_CONTENT_SANDBOX is defined and sandboxing is enabled (versus
|
||||
// manually disabled via prefs), the content process replaces NS_OS_TEMP_DIR
|
||||
// with NS_APP_CONTENT_PROCESS_TEMP_DIR so that legacy code in content
|
||||
// attempting to write to NS_OS_TEMP_DIR will write to
|
||||
// NS_APP_CONTENT_PROCESS_TEMP_DIR instead. When MOZ_CONTENT_SANDBOX is
|
||||
// defined but sandboxing is disabled, NS_APP_CONTENT_PROCESS_TEMP_DIR
|
||||
// falls back to NS_OS_TEMP_DIR in both content and chrome processes.
|
||||
//
|
||||
// New code should avoid writing to the filesystem from the content process
|
||||
// and should instead proxy through the parent process whenever possible.
|
||||
//
|
||||
// At present, all sandboxed content processes use the same directory for
|
||||
// NS_APP_CONTENT_PROCESS_TEMP_DIR, but that should not be relied upon.
|
||||
//
|
||||
#define NS_APP_CONTENT_PROCESS_TEMP_DIR "ContentTmpD"
|
||||
#else
|
||||
// Otherwise NS_APP_CONTENT_PROCESS_TEMP_DIR must match NS_OS_TEMP_DIR.
|
||||
#define NS_APP_CONTENT_PROCESS_TEMP_DIR "TmpD"
|
||||
#endif // (defined(XP_WIN) || defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
|
||||
|
||||
#endif // nsAppDirectoryServiceDefs_h___
|
||||
|
|
|
|||
|
|
@ -490,27 +490,6 @@ nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider* aProv)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && defined(XP_WIN)
|
||||
static nsresult
|
||||
GetLowIntegrityTempBase(nsIFile** aLowIntegrityTempBase)
|
||||
{
|
||||
nsCOMPtr<nsIFile> localFile;
|
||||
nsresult rv = GetSpecialSystemDirectory(Win_LocalAppdataLow,
|
||||
getter_AddRefs(localFile));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = localFile->Append(NS_LITERAL_STRING(MOZ_USER_DIR));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
localFile.forget(aLowIntegrityTempBase);
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
// DO NOT ADD ANY LOCATIONS TO THIS FUNCTION UNTIL YOU TALK TO: dougt@netscape.com.
|
||||
// This is meant to be a place of xpcom or system specific file locations, not
|
||||
// application specific locations. If you need the later, register a callback for
|
||||
|
|
@ -684,12 +663,6 @@ nsDirectoryService::GetFile(const char* aProp, bool* aPersistent,
|
|||
rv = GetSpecialSystemDirectory(Win_Appdata, getter_AddRefs(localFile));
|
||||
} else if (inAtom == nsDirectoryService::sLocalAppdata) {
|
||||
rv = GetSpecialSystemDirectory(Win_LocalAppdata, getter_AddRefs(localFile));
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
} else if (inAtom == nsDirectoryService::sLocalAppdataLow) {
|
||||
rv = GetSpecialSystemDirectory(Win_LocalAppdataLow, getter_AddRefs(localFile));
|
||||
} else if (inAtom == nsDirectoryService::sLowIntegrityTempBase) {
|
||||
rv = GetLowIntegrityTempBase(getter_AddRefs(localFile));
|
||||
#endif
|
||||
} else if (inAtom == nsDirectoryService::sPrinthood) {
|
||||
rv = GetSpecialSystemDirectory(Win_Printhood, getter_AddRefs(localFile));
|
||||
} else if (inAtom == nsDirectoryService::sWinCookiesDirectory) {
|
||||
|
|
|
|||
|
|
@ -72,10 +72,6 @@ DIR_ATOM(sCommon_Desktopdirectory, NS_WIN_COMMON_DESKTOP_DIRECTORY)
|
|||
DIR_ATOM(sCommon_AppData, NS_WIN_COMMON_APPDATA_DIR)
|
||||
DIR_ATOM(sAppdata, NS_WIN_APPDATA_DIR)
|
||||
DIR_ATOM(sLocalAppdata, NS_WIN_LOCAL_APPDATA_DIR)
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
DIR_ATOM(sLocalAppdataLow, NS_WIN_LOCAL_APPDATA_LOW_DIR)
|
||||
DIR_ATOM(sLowIntegrityTempBase, NS_WIN_LOW_INTEGRITY_TEMP_BASE)
|
||||
#endif
|
||||
DIR_ATOM(sPrinthood, NS_WIN_PRINTHOOD)
|
||||
DIR_ATOM(sWinCookiesDirectory, NS_WIN_COOKIES_DIR)
|
||||
DIR_ATOM(sDefaultDownloadDirectory, NS_WIN_DEFAULT_DOWNLOAD_DIR)
|
||||
|
|
|
|||
|
|
@ -129,10 +129,6 @@
|
|||
#define NS_WIN_COMMON_APPDATA_DIR "CmAppData"
|
||||
#define NS_WIN_APPDATA_DIR "AppData"
|
||||
#define NS_WIN_LOCAL_APPDATA_DIR "LocalAppData"
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
#define NS_WIN_LOCAL_APPDATA_LOW_DIR "LocalAppDataLow"
|
||||
#define NS_WIN_LOW_INTEGRITY_TEMP_BASE "LowTmpDBase"
|
||||
#endif
|
||||
#define NS_WIN_PRINTHOOD "PrntHd"
|
||||
#define NS_WIN_COOKIES_DIR "CookD"
|
||||
#define NS_WIN_DEFAULT_DOWNLOAD_DIR "DfltDwnld"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue