zuluCrypt  5.7.1
About: zuluCrypt is a simple but feature rich solution for hard drives encryption. It can manage PLAIN dm-crypt, LUKS, TrueCrypt and VeraCrypt encrypted volumes.
  Fossies Dox: zuluCrypt-5.7.1.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

includes.h File Reference
#include "../utility/string/String.h"
#include "../utility/string/StringList.h"
#include "../constants.h"
#include "../lib/libzuluCrypt.h"
#include "../utility/socket/socket.h"
#include "../utility/process/process.h"
#include "libzuluCrypt-exe.h"
#include "security.h"
#include "locale_path.h"
#include "../lib/includes.h"
Include dependency graph for includes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tvcrypt
 

Macros

#define STRING_MEMORY_HACK   1
 
#define VOLUME_HEADER_RESTORE   1
 
#define VOLUME_HEADER_SAVE   0
 

Functions

void zuluCryptTrueCryptVeraCryptVolumeInfo (const char *type, tvcrypt *e)
 
int zuluCryptSecurityConvertUID (uid_t uid, const char *u_id)
 
int zuluCryptVolumeIsInSystemVolumeList (const char *device)
 
void zuluCryptPrepareSocketPath (uid_t uid)
 
stringList_t zuluCryptCreateKeyFiles (const char *const *list, int s)
 
stringList_t veraCryptVolumePIMValue (info_t *s, const char *type)
 
void zuluCryptDeleteKeyFiles (stringList_t stl)
 
string_t GetKeyFromModule (const char *path, uid_t)
 
void zuluCryptGetKeyFromSocket (const char *path, string_t *, uid_t uid)
 
string_t zuluCryptGetUserHomePath (uid_t)
 
int zuluCryptPartitionIsSystemPartition (const char *dev, uid_t uid)
 
int zuluCryptVolumeIsNotLuks (const char *dev)
 
int zuluCryptPrintDeviceProperties (int type)
 
const char * zuluCryptVolumeType (blkid_probe blkid, const char *device)
 
int zuluCryptSecurityCheckPartitionPermissions (uid_t uid)
 
char * zuluCryptDeviceFromLabel (const char *label)
 
int zuluCryptSecurityPathIsValid (const char *path, uid_t uid)
 
void zuluCryptEXEGetOptsSetDefault (struct_opts *stopts)
 
int zuluCryptMountFlagsAreNotCorrect (const char *mode, uid_t uid, unsigned long *flags)
 
int zuluCryptSecurityGainElevatedPrivileges (void)
 
int zuluCryptSecurityDropElevatedPrivileges (void)
 
string_t zuluCryptSecurityGetFileSystemFromDevice (const char *path)
 
int zuluCryptPathStartsWith (const char *path, const char *start)
 
int zuluCryptPathDoesNotStartsWith (const char *path, const char *start)
 
int zulucryptFileSystemIsNotSupported (const char *fs)
 
char * zuluCryptRealPath (const char *path)
 
void zuluCryptClearDeadMappers (uid_t uid, int)
 
void zuluCryptDeleteDeadMountPoints (uid_t, stringList_t)
 
int zuluCryptHeaderMatchBackUpHeader (const char *device, const char *header_backup, uid_t uid)
 
int zuluCryptBindUnmountVolume (stringList_t mountinfo, const char *device, uid_t uid)
 
int zuluCryptBindMountVolume (const char *device, string_t, unsigned long flags)
 
int zuluCryptBindSharedMountPointPathTaken (string_t path)
 
string_t zuluCryptPluginManagerGetKeyFromModule (const char *device, const char *name, const char *uuid, uid_t uid, const struct_opts *opts, const char *run_path, int *r)
 
stringList_t zuluCryptGetPartitionFromCrypttab (void)
 
stringList_t zuluCryptGetPartitionFromConfigFile (const char *path)
 
stringList_t zuluCryptPartitionList (void)
 
string_t zuluCryptCreateMountPoint (const char *device, const char *m_point, const char *m_opts, uid_t uid)
 
void zuluCryptCreateMountPointPrefix (uid_t uid)
 
void zuluCryptCreateMountPath (const char *path)
 
int zuluCryptMountPointPrefixMatch (const char *path, uid_t uid, string_t *m_point)
 
int zuluCryptGetPassFromFile (int *socket_path, const char *path, uid_t uid, string_t *st)
 
char * zuluCryptUUIDFromPath (const char *device)
 
char * zuluCryptEvaluateDeviceTags (const char *tag, const char *path)
 
int zuluCryptRunTest (void)
 
int zuluCryptDeviceIsSupported (const char *device, uid_t uid)
 
stringList_t zuluCryptPartitions (int option, uid_t uid)
 
u_int64_t zuluCryptGetVolumeSize (const char *device)
 
stringList_t zuluCryptGetAListOfAllVolumes (void)
 
int zuluCryptReuseMountPoint (void)
 

Variables

uid_t global_variable_user_uid
 

Macro Definition Documentation

◆ STRING_MEMORY_HACK

#define STRING_MEMORY_HACK   1

Definition at line 24 of file includes.h.

◆ VOLUME_HEADER_RESTORE

#define VOLUME_HEADER_RESTORE   1

Definition at line 47 of file includes.h.

◆ VOLUME_HEADER_SAVE

#define VOLUME_HEADER_SAVE   0

Definition at line 48 of file includes.h.

Function Documentation

◆ GetKeyFromModule()

string_t GetKeyFromModule ( const char *  path,
uid_t   
)

◆ veraCryptVolumePIMValue()

◆ zuluCryptBindMountVolume()

◆ zuluCryptBindSharedMountPointPathTaken()

int zuluCryptBindSharedMountPointPathTaken ( string_t  path)

◆ zuluCryptBindUnmountVolume()

int zuluCryptBindUnmountVolume ( stringList_t  mountinfo,
const char *  device,
uid_t  uid 
)

◆ zuluCryptClearDeadMappers()

◆ zuluCryptCreateKeyFiles()

◆ zuluCryptCreateMountPath()

void zuluCryptCreateMountPath ( const char *  path)

◆ zuluCryptCreateMountPoint()

string_t zuluCryptCreateMountPoint ( const char *  device,
const char *  m_point,
const char *  m_opts,
uid_t  uid 
)

◆ zuluCryptCreateMountPointPrefix()

void zuluCryptCreateMountPointPrefix ( uid_t  uid)

◆ zuluCryptDeleteDeadMountPoints()

void zuluCryptDeleteDeadMountPoints ( uid_t  ,
stringList_t   
)

◆ zuluCryptDeleteKeyFiles()

◆ zuluCryptDeviceFromLabel()

char* zuluCryptDeviceFromLabel ( const char *  label)

Definition at line 47 of file blkid_evaluate_tag.c.

Referenced by zuluCryptEvaluateDeviceTags(), and zuluCryptGetFstabList().

◆ zuluCryptDeviceIsSupported()

int zuluCryptDeviceIsSupported ( const char *  device,
uid_t  uid 
)

◆ zuluCryptEvaluateDeviceTags()

char* zuluCryptEvaluateDeviceTags ( const char *  tag,
const char *  path 
)

◆ zuluCryptEXEGetOptsSetDefault()

◆ zulucryptFileSystemIsNotSupported()

int zulucryptFileSystemIsNotSupported ( const char *  fs)

◆ zuluCryptGetAListOfAllVolumes()

stringList_t zuluCryptGetAListOfAllVolumes ( void  )

◆ zuluCryptGetKeyFromSocket()

◆ zuluCryptGetPartitionFromConfigFile()

◆ zuluCryptGetPartitionFromCrypttab()

◆ zuluCryptGetPassFromFile()

◆ zuluCryptGetUserHomePath()

string_t zuluCryptGetUserHomePath ( uid_t  )

Definition at line 23 of file user_home_path.c.

References String_1().

Referenced by create_home_mount_point(), and mount_point_prefix_match_0().

◆ zuluCryptGetVolumeSize()

◆ zuluCryptHeaderMatchBackUpHeader()

int zuluCryptHeaderMatchBackUpHeader ( const char *  device,
const char *  header_backup,
uid_t  uid 
)

◆ zuluCryptMountFlagsAreNotCorrect()

int zuluCryptMountFlagsAreNotCorrect ( const char *  mode,
uid_t  uid,
unsigned long *  flags 
)

◆ zuluCryptMountPointPrefixMatch()

int zuluCryptMountPointPrefixMatch ( const char *  path,
uid_t  uid,
string_t m_point 
)

◆ zuluCryptPartitionIsSystemPartition()

◆ zuluCryptPartitionList()

stringList_t zuluCryptPartitionList ( void  )

◆ zuluCryptPartitions()

◆ zuluCryptPathDoesNotStartsWith()

int zuluCryptPathDoesNotStartsWith ( const char *  path,
const char *  start 
)

Definition at line 66 of file real_path.c.

References StringFree(), StringPrefixEqual(), and zuluCryptRealPath().

◆ zuluCryptPathStartsWith()

int zuluCryptPathStartsWith ( const char *  path,
const char *  start 
)

Definition at line 55 of file real_path.c.

References StringFree(), StringPrefixEqual(), and zuluCryptRealPath().

Referenced by crypt_opt().

◆ zuluCryptPluginManagerGetKeyFromModule()

◆ zuluCryptPrepareSocketPath()

void zuluCryptPrepareSocketPath ( uid_t  uid)

Definition at line 108 of file path_access.c.

Referenced by zuluCryptEXEOpenVolume(), and zuluCryptGetPassFromFile().

◆ zuluCryptPrintDeviceProperties()

int zuluCryptPrintDeviceProperties ( int  type)

◆ zuluCryptRealPath()

◆ zuluCryptReuseMountPoint()

int zuluCryptReuseMountPoint ( void  )

◆ zuluCryptRunTest()

int zuluCryptRunTest ( void  )

Referenced by main().

◆ zuluCryptSecurityCheckPartitionPermissions()

int zuluCryptSecurityCheckPartitionPermissions ( uid_t  uid)

◆ zuluCryptSecurityConvertUID()

int zuluCryptSecurityConvertUID ( uid_t  uid,
const char *  u_id 
)

Definition at line 81 of file security.c.

References StringConvertToInt().

Referenced by main().

◆ zuluCryptSecurityDropElevatedPrivileges()

int zuluCryptSecurityDropElevatedPrivileges ( void  )

Definition at line 109 of file security.c.

References global_variable_user_uid, and zuluCryptSecurityPrivilegeElevationError.

Referenced by _checkUnmount(), _create_path(), _create_work_directory(), _delete_mount_point(), _device_path(), _open_volume(), _print_device_properties(), _printOpenedVolumes(), _printResult(), _remove_btfs_multiple_devices(), _restore_header(), _save_header(), _secure_copy_file(), _secure_file_path(), _zuluCryptBindUnmountVolume(), _zuluCryptCheckEmptySlots(), _zuluCryptExECheckEmptySlots(), _zuluCryptGetFileSystemFromDevice(), _zuluCryptVolumeList_0(), _zuluMountExe(), _zuluMountPartitionAccess(), _zuluMountprintAListOfMountedVolumes(), _zuluMountPrintVolumeDeviceName(), _zuluPartitionHasCryptoFs(), create_mount_point(), main(), open_plain_as_me_1(), path_is_accessible(), zuluCryptBindMountVolume(), zuluCryptCheckInvalidKey(), zuluCryptClearDeadMappers(), zuluCryptCreateKeyFiles(), zuluCryptDeleteKeyFiles(), zuluCryptEvaluateDeviceTags(), zuluCryptEXEAddKey(), zuluCryptEXECheckEmptySlots(), zuluCryptEXECheckIfLuks(), zuluCryptEXECheckIfTcrypt(), zuluCryptEXECloseVolume(), zuluCryptEXECreateVolume(), zuluCryptEXEGetDevice(), zuluCryptEXEOpenVolume(), zuluCryptEXERemoveKey(), zuluCryptEXEVolumeInfo(), zuluCryptEXEWriteDeviceWithJunk(), zuluCryptGetPartitionFromConfigFile(), zuluCryptGetPassFromFile(), zuluCryptHeaderMatchBackUpHeader(), zuluCryptPartitions(), zuluCryptPrintPartitionProperties(), zuluCryptUUIDFromPath(), zuluExit_1(), zuluMountMount(), zuluMountPartitionProperties(), zuluMountPrintDeviceProperties(), zuluMountUMount(), and zuluMountUnEncryptedVolumeStatus().

◆ zuluCryptSecurityGainElevatedPrivileges()

int zuluCryptSecurityGainElevatedPrivileges ( void  )

Definition at line 64 of file security.c.

References zuluCryptSecurityPrivilegeElevationError.

Referenced by _checkUnmount(), _create_path(), _create_work_directory(), _delete_mount_point(), _device_path(), _modify_tcrypt(), _open_volume(), _print_device_properties(), _printOpenedVolumes(), _printResult(), _remove_btfs_multiple_devices(), _restore_header(), _save_header(), _secure_copy_file(), _secure_file_path(), _zuluCryptBindUnmountVolume(), _zuluCryptCheckEmptySlots(), _zuluCryptExECheckEmptySlots(), _zuluCryptGetFileSystemFromDevice(), _zuluCryptVolumeList_0(), _zuluMountExe(), _zuluMountPartitionAccess(), _zuluMountprintAListOfMountedVolumes(), _zuluMountPrintVolumeDeviceName(), _zuluPartitionHasCryptoFs(), create_mount_point(), open_plain_as_me_1(), path_is_accessible(), zuluCryptBindMountVolume(), zuluCryptCheckInvalidKey(), zuluCryptClearDeadMappers(), zuluCryptCreateKeyFiles(), zuluCryptDeleteKeyFiles(), zuluCryptEvaluateDeviceTags(), zuluCryptEXEAddKey(), zuluCryptEXECheckEmptySlots(), zuluCryptEXECheckIfLuks(), zuluCryptEXECheckIfTcrypt(), zuluCryptEXECloseVolume(), zuluCryptEXECreateVolume(), zuluCryptEXEGetDevice(), zuluCryptEXEOpenVolume(), zuluCryptEXERemoveKey(), zuluCryptEXEVolumeInfo(), zuluCryptEXEWriteDeviceWithJunk(), zuluCryptGetPartitionFromConfigFile(), zuluCryptGetVolumeSize(), zuluCryptHeaderMatchBackUpHeader(), zuluCryptPartitions(), zuluCryptPrintPartitionProperties(), zuluCryptUUIDFromPath(), zuluExit_1(), zuluMountMount(), zuluMountPartitionProperties(), zuluMountPrintDeviceProperties(), zuluMountUMount(), and zuluMountUnEncryptedVolumeStatus().

◆ zuluCryptSecurityGetFileSystemFromDevice()

string_t zuluCryptSecurityGetFileSystemFromDevice ( const char *  path)

◆ zuluCryptSecurityPathIsValid()

int zuluCryptSecurityPathIsValid ( const char *  path,
uid_t  uid 
)

◆ zuluCryptTrueCryptVeraCryptVolumeInfo()

void zuluCryptTrueCryptVeraCryptVolumeInfo ( const char *  type,
tvcrypt e 
)

◆ zuluCryptUUIDFromPath()

◆ zuluCryptVolumeIsInSystemVolumeList()

int zuluCryptVolumeIsInSystemVolumeList ( const char *  device)

◆ zuluCryptVolumeIsNotLuks()

int zuluCryptVolumeIsNotLuks ( const char *  dev)

Definition at line 63 of file is_luks.c.

Referenced by _add_key(), _remove_key(), and zuluCryptOpenVolume_2().

◆ zuluCryptVolumeType()

const char* zuluCryptVolumeType ( blkid_probe  blkid,
const char *  device 
)

Variable Documentation

◆ global_variable_user_uid

uid_t global_variable_user_uid