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)  

open_luks.c File Reference
#include "includes.h"
#include <libcryptsetup.h>
#include <fcntl.h>
#include <unistd.h>
#include "luks_external_header.h"
Include dependency graph for open_luks.c:

Go to the source code of this file.

Functions

static int zuluExit (int st, struct crypt_device *cd)
 
static int _open_luks_2 (const char *device, const resolve_path_t *opt)
 
int zuluCryptOpenLuks (const char *device, const char *mapper, const char *mode, const char *key, size_t key_len)
 
int zuluCryptOpenLuks_1 (const open_struct_t *opts)
 
int zuluCryptOpenLuks_2 (const open_struct_t *opts)
 

Function Documentation

◆ _open_luks_2()

static int _open_luks_2 ( const char *  device,
const resolve_path_t opt 
)
static

◆ zuluCryptOpenLuks()

int zuluCryptOpenLuks ( const char *  device,
const char *  mapping_name,
const char *  mode,
const char *  passphrase,
size_t  passphrase_size 
)

This function just opens a luks volume, doesnt create a mount point and doesnt mount it.

return values: 0 - success 1 - ERROR: presented key does not exist in the volume 2 - ERROR: failed to open device 3 - ERROR: device path does not point to a device 4 - ERROR: key file does not exist

Definition at line 104 of file open_luks.c.

References open_struct_t::device, open_struct_t::key, open_struct_t::key_len, open_struct_t::m_opts, open_struct_t::mapper_name, and zuluCryptOpenLuks_2().

Referenced by _create_volume().

◆ zuluCryptOpenLuks_1()

int zuluCryptOpenLuks_1 ( const open_struct_t opts)

Definition at line 120 of file open_luks.c.

References zuluCryptOpenLuks_2().

Referenced by _open_mapper().

◆ zuluCryptOpenLuks_2()

int zuluCryptOpenLuks_2 ( const open_struct_t opts)

◆ zuluExit()

static int zuluExit ( int  st,
struct crypt_device *  cd 
)
static

Definition at line 30 of file open_luks.c.

Referenced by _open_luks_2().