VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format/Format.vcxproj.user
blob: ace9a86acb77340247c6d79e985eca55840261de (plain)
1
2
3
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
ht .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 Derived from source code of TrueCrypt 7.1a, which is
 Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
 by the TrueCrypt License 3.0.

 Modifications and additions to the original source code (contained in this file) 
 and all other portions of this file are Copyright (c) 2013-2016 IDRIX
 and are governed by the Apache License 2.0 the full text of which is
 contained in the file License.txt included in VeraCrypt binary and source
 code distribution packages.
*/

#ifndef TC_HEADER_Core_CoreUnix
#define TC_HEADER_Core_CoreUnix

#include "System.h"
#include "Platform/Unix/Process.h"
#include "Core/CoreBase.h"
#include "Core/Unix/MountedFilesystem.h"

namespace VeraCrypt
{
	class CoreUnix : public CoreBase
	{
	public:
		CoreUnix ();
		virtual ~CoreUnix ();

		virtual void CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair = false) const; 
		virtual void DismountFilesystem (const DirectoryPath &mountPoint, bool force) const;
		virtual shared_ptr <VolumeInfo> DismountVolume (shared_ptr <VolumeInfo> mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false);
		virtual bool FilesystemSupportsLargeFiles (const FilePath &filePath) const;
		virtual DirectoryPath GetDeviceMountPoint (const DevicePath &devicePath) const;
		virtual uint32 GetDeviceSectorSize (const DevicePath &devicePath) const;
		virtual uint64 GetDeviceSize (const DevicePath &devicePath) const;
		virtual int GetOSMajorVersion () const { throw NotApplicable (SRC_POS); }
		virtual int GetOSMinorVersion () const { throw NotApplicable (SRC_POS); }
		virtual VolumeInfoList GetMountedVolumes (const VolumePath &volumePath = VolumePath()) const;
		virtual bool IsDevicePresent (const DevicePath &device) const { throw NotApplicable (SRC_POS); }
		virtual bool IsInPortableMode () const { return false; }
		virtual bool IsMountPointAvailable (const DirectoryPath &mountPoint) const;
		virtual bool IsOSVersion (int major, int minor) const { throw NotApplicable (SRC_POS); }
		virtual bool IsOSVersionLower (int major, int minor) const { throw NotApplicable (SRC_POS); }
		virtual bool IsPasswordCacheEmpty () const { throw NotApplicable (SRC_POS); }
		virtual bool HasAdminPrivileges () const { return getuid() == 0 || geteuid() == 0; }
		virtual VolumeSlotNumber MountPointToSlotNumber (const DirectoryPath &mountPoint) const;
		virtual shared_ptr <VolumeInfo> MountVolume (MountOptions &options);
		virtual void SetFileOwner (const FilesystemPath &path, const UserId &owner) const;
		virtual DirectoryPath SlotNumberToMountPoint (VolumeSlotNumber slotNumber) const;
		virtual void WipePasswordCache () const { throw NotApplicable (SRC_POS); }

	protected:
		virtual DevicePath AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const { throw NotApplicable (SRC_POS); }
		virtual void DetachLoopDevice (const DevicePath &devicePath) const { throw NotApplicable (SRC_POS); }
		virtual void DismountNativeVolume (shared_ptr <VolumeInfo> mountedVolume) const { throw NotApplicable (SRC_POS); }
		virtual bool FilesystemSupportsUnixPermissions (const DevicePath &devicePath) const;
		virtual string GetDefaultMountPointPrefix () const;
		virtual string GetFuseMountDirPrefix () const { return ".veracrypt_aux_mnt"; }
		virtual MountedFilesystemList GetMountedFilesystems (const DevicePath &devicePath = DevicePath(), const DirectoryPath &mountPoint = DirectoryPath()) const = 0;
		virtual uid_t GetRealUserId () const;
		virtual gid_t GetRealGroupId () const;
		virtual string GetTempDirectory () const;
		virtual void MountFilesystem (const DevicePath &devicePath, const DirectoryPath &mountPoint, const string &filesystemType, bool readOnly, const string &systemMountOptions) const;
		virtual void MountAuxVolumeImage (const DirectoryPath &auxMountPoint, const MountOptions &options) const;
		virtual void MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const { throw NotApplicable (SRC_POS); }
		
	private:
		CoreUnix (const CoreUnix &);
		CoreUnix &operator= (const CoreUnix &);
	};
}

#endif // TC_HEADER_Core_CoreUnix