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)  

main.c File Reference
#include "includes.h"
#include <signal.h>
#include "../zuluCrypt-cli/lib/includes.h"
#include "../zuluCrypt-cli/bin/includes.h"
#include <sys/resource.h>
#include <locale.h>
#include <libintl.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <grp.h>
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define _hide(z)   strncpy( ( char * )z,"x",StringLength( *k ) )
 

Functions

static void _seteuid (uid_t uid)
 
static void _setuid (uid_t uid)
 
static int _mount_get_opts (int argc, char *argv[], ARGS *args)
 
int _zuluExit (int st, string_t z, char *q, const char *msg)
 
static int _zuluExit_2 (int st, stringList_t z, stringList_t q, const char *msg)
 
int _zuluExit_1 (int st, stringList_t z, char *q, const char *msg)
 
static int _zuluMountDeviceList (uid_t uid)
 
static int _zuluMountNonSystemDeviceList (uid_t uid)
 
static int _zuluMountSystemDeviceList (uid_t uid)
 
static int _zuluMountMountedList (uid_t uid)
 
static string_t _zuluCryptGetFileSystemFromDevice (const char *device)
 
static int _zuluPartitionHasCryptoFs (const char *device)
 
static int _zuluMountPrintVolumeDeviceName (const char *device)
 
static int _checkUnmount (const char *device, uid_t uid)
 
static int _zuluMountExe (ARGS *args)
 
static int _mount_help ()
 
static void ExitOnMemoryExaustion (void)
 
static int _zuluMountDoAction (ARGS *args)
 
static void _privilegeEvelationError (const char *msg)
 
static void _forceTerminateOnSeriousError (int sig)
 
static int _create_mount_point (const char *label, const char *m_opts, uid_t uid)
 
static int _delete_mount_point (const char *m_path, uid_t uid)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ _hide

#define _hide (   z)    strncpy( ( char * )z,"x",StringLength( *k ) )

Function Documentation

◆ _checkUnmount()

◆ _create_mount_point()

static int _create_mount_point ( const char *  label,
const char *  m_opts,
uid_t  uid 
)
static

Definition at line 523 of file main.c.

References StringDelete(), StringVoid, and zuluCryptCreateMountPoint().

Referenced by main().

◆ _delete_mount_point()

static int _delete_mount_point ( const char *  m_path,
uid_t  uid 
)
static

◆ _forceTerminateOnSeriousError()

static void _forceTerminateOnSeriousError ( int  sig)
static

Definition at line 516 of file main.c.

Referenced by main().

◆ _mount_get_opts()

static int _mount_get_opts ( int  argc,
char *  argv[],
ARGS args 
)
static

Definition at line 50 of file main.c.

References args::offset, and TRUECRYPT_MAX_KEYFILES.

Referenced by main().

◆ _mount_help()

static int _mount_help ( )
static

Definition at line 410 of file main.c.

Referenced by main().

◆ _privilegeEvelationError()

static void _privilegeEvelationError ( const char *  msg)
static

Definition at line 510 of file main.c.

Referenced by main().

◆ _seteuid()

static void _seteuid ( uid_t  uid)
static

Definition at line 36 of file main.c.

Referenced by main().

◆ _setuid()

static void _setuid ( uid_t  uid)
static

Definition at line 41 of file main.c.

Referenced by main().

◆ _zuluCryptGetFileSystemFromDevice()

static string_t _zuluCryptGetFileSystemFromDevice ( const char *  device)
static

◆ _zuluExit()

int _zuluExit ( int  st,
string_t  z,
char *  q,
const char *  msg 
)

Definition at line 108 of file main.c.

References StringDelete(), and StringFree().

◆ _zuluExit_1()

int _zuluExit_1 ( int  st,
stringList_t  z,
char *  q,
const char *  msg 
)

Definition at line 134 of file main.c.

References StringFree(), StringListDelete(), and zuluCryptSecurityUnlockMemory().

Referenced by _zuluMountExe().

◆ _zuluExit_2()

static int _zuluExit_2 ( int  st,
stringList_t  z,
stringList_t  q,
const char *  msg 
)
static

Definition at line 121 of file main.c.

References StringListMultipleDelete(), and zuluCryptSecurityUnlockMemory().

Referenced by main().

◆ _zuluMountDeviceList()

static int _zuluMountDeviceList ( uid_t  uid)
static

Definition at line 150 of file main.c.

References ZULUCRYPTallPartitions, and zuluCryptPrintPartitions().

Referenced by main().

◆ _zuluMountDoAction()

static int _zuluMountDoAction ( ARGS args)
static

Definition at line 465 of file main.c.

References _zuluMountExe(), StringFree(), zuluCryptDeviceIsSupported(), and zuluCryptGetDeviceFileProperties().

Referenced by main().

◆ _zuluMountExe()

◆ _zuluMountMountedList()

static int _zuluMountMountedList ( uid_t  uid)
static

Definition at line 178 of file main.c.

References zuluMountPrintVolumesProperties().

Referenced by main().

◆ _zuluMountNonSystemDeviceList()

static int _zuluMountNonSystemDeviceList ( uid_t  uid)
static

Definition at line 160 of file main.c.

References ZULUCRYPTnonSystemPartitions, and zuluCryptPrintPartitions().

Referenced by main().

◆ _zuluMountPrintVolumeDeviceName()

static int _zuluMountPrintVolumeDeviceName ( const char *  device)
static

◆ _zuluMountSystemDeviceList()

static int _zuluMountSystemDeviceList ( uid_t  uid)
static

Definition at line 169 of file main.c.

References zuluCryptPrintPartitions(), and ZULUCRYPTsystemPartitions.

Referenced by main().

◆ _zuluPartitionHasCryptoFs()

static int _zuluPartitionHasCryptoFs ( const char *  device)
static

◆ ExitOnMemoryExaustion()

static void ExitOnMemoryExaustion ( void  )
static

Definition at line 459 of file main.c.

Referenced by main().

◆ main()