diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2023-02-13 16:03:23 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2023-05-26 11:26:35 +0000 |
commit | 813d9ae984a99e739b99cf694a9d5b24d0a6b7a7 (patch) | |
tree | 60c14d40d77a3c702c8a72887662d97c0b8f3e99 /chromium/base/files/file_util.h | |
parent | eb596ba9fe579987eb93f6b4021ca156885b48c2 (diff) |
BASELINE: Update Chromium to 110.0.5481.111
Change-Id: I2b5f5ed66fee2a6f8da61c9b17fd1b25bb5b3a4e
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/464348
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/files/file_util.h')
-rw-r--r-- | chromium/base/files/file_util.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/chromium/base/files/file_util.h b/chromium/base/files/file_util.h index e2bd557a4e6..733a6209db0 100644 --- a/chromium/base/files/file_util.h +++ b/chromium/base/files/file_util.h @@ -367,6 +367,12 @@ BASE_EXPORT ScopedFILE CreateAndOpenTemporaryStreamInDir(const FilePath& dir, // the format of prefixyyyy. // NOTE: prefix is ignored in the POSIX implementation. // If success, return true and output the full path of the directory created. +// +// For Windows, this directory is usually created in a secure location under +// %ProgramFiles% if the caller is admin. This is because the default %TEMP% +// folder for Windows is insecure, since low privilege users can get the path of +// folders under %TEMP% after creation and are able to create subfolders and +// files within these folders which can lead to privilege escalation. BASE_EXPORT bool CreateNewTempDirectory(const FilePath::StringType& prefix, FilePath* new_temp_path); @@ -604,26 +610,6 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path); // the directory |path|, in the number of FilePath::CharType, or -1 on failure. BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) -// Broad categories of file systems as returned by statfs() on Linux. -enum FileSystemType { - FILE_SYSTEM_UNKNOWN, // statfs failed. - FILE_SYSTEM_0, // statfs.f_type == 0 means unknown, may indicate AFS. - FILE_SYSTEM_ORDINARY, // on-disk filesystem like ext2 - FILE_SYSTEM_NFS, - FILE_SYSTEM_SMB, - FILE_SYSTEM_CODA, - FILE_SYSTEM_MEMORY, // in-memory file system - FILE_SYSTEM_CGROUP, // cgroup control. - FILE_SYSTEM_OTHER, // any other value. - FILE_SYSTEM_TYPE_COUNT -}; - -// Attempts determine the FileSystemType for |path|. -// Returns false if |path| doesn't exist. -BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type); -#endif - #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) // Get a temporary directory for shared memory files. The directory may depend // on whether the destination is intended for executable files, which in turn |