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)  

create_mount_point.c File Reference
#include "includes.h"
#include "../lib/includes.h"
#include <sys/stat.h>
#include <unistd.h>
#include "mount_prefix_path.h"
#include "reuse_mount_point.h"
#include <grp.h>
#include <pwd.h>
Include dependency graph for create_mount_point.c:

Go to the source code of this file.

Functions

static void _chown (const char *x, uid_t y, gid_t z)
 
static void _chmod (const char *x, mode_t y)
 
static void _mkdir (const char *x, mode_t y)
 
static void _stat (const char *x, struct stat *y)
 
int zuluCryptReuseMountPoint (void)
 
static string_t _create_path_0 (const char *m_point, uid_t uid, string_t path)
 
static string_t _create_path (uid_t uid, string_t path, int need_privileges)
 
static string_t _create_mount_point_1 (const char *device, uid_t uid, string_t path, int need_privileges)
 
static string_t _create_home_default_mount_point (const char *device, uid_t uid, string_t path)
 
static string_t _create_default_mount_point (const char *device, uid_t uid, string_t path)
 
static string_t _create_mount_point_0 (const char *label, uid_t uid, string_t path, int need_privileges)
 
static string_t _create_home_custom_mount_point (const char *label, uid_t uid, string_t path)
 
static string_t _create_custom_mount_point (const char *label, uid_t uid, string_t path)
 
static string_t create_home_mount_point (const char *device, const char *label, uid_t uid)
 
static int mount_point_prefix_match_0 (const char *m_path, uid_t uid, string_t *m_point, int home_prefix)
 
static int home_mount_point_prefix_match (const char *m_path, uid_t uid, string_t *m_point)
 
static int mount_point_prefix_match (const char *m_path, uid_t uid, string_t *m_point)
 
static void _zuluCryptCreateMountPath (const char *path)
 
void zuluCryptCreateMountPath (const char *path)
 
static string_t create_mount_point (const char *device, const char *label, uid_t uid)
 
static int home_mount_prefix (void)
 
void zuluCryptCreateMountPointPrefix (uid_t uid)
 
string_t zuluCryptCreateMountPoint (const char *device, const char *label, const char *m_opts, uid_t uid)
 
int zuluCryptMountPointPrefixMatch (const char *m_path, uid_t uid, string_t *m_point)
 

Function Documentation

◆ _chmod()

static void _chmod ( const char *  x,
mode_t  y 
)
static

Definition at line 45 of file create_mount_point.c.

Referenced by _zuluCryptCreateMountPath(), and create_mount_point().

◆ _chown()

static void _chown ( const char *  x,
uid_t  y,
gid_t  z 
)
static

◆ _create_custom_mount_point()

static string_t _create_custom_mount_point ( const char *  label,
uid_t  uid,
string_t  path 
)
static

Definition at line 214 of file create_mount_point.c.

References _create_mount_point_0().

Referenced by create_mount_point().

◆ _create_default_mount_point()

static string_t _create_default_mount_point ( const char *  device,
uid_t  uid,
string_t  path 
)
static

Definition at line 154 of file create_mount_point.c.

References _create_mount_point_1().

Referenced by create_mount_point().

◆ _create_home_custom_mount_point()

static string_t _create_home_custom_mount_point ( const char *  label,
uid_t  uid,
string_t  path 
)
static

Definition at line 209 of file create_mount_point.c.

References _create_mount_point_0().

Referenced by create_home_mount_point().

◆ _create_home_default_mount_point()

static string_t _create_home_default_mount_point ( const char *  device,
uid_t  uid,
string_t  path 
)
static

Definition at line 149 of file create_mount_point.c.

References _create_mount_point_1().

Referenced by create_home_mount_point().

◆ _create_mount_point_0()

static string_t _create_mount_point_0 ( const char *  label,
uid_t  uid,
string_t  path,
int  need_privileges 
)
static

◆ _create_mount_point_1()

static string_t _create_mount_point_1 ( const char *  device,
uid_t  uid,
string_t  path,
int  need_privileges 
)
static

◆ _create_path()

static string_t _create_path ( uid_t  uid,
string_t  path,
int  need_privileges 
)
static

◆ _create_path_0()

static string_t _create_path_0 ( const char *  m_point,
uid_t  uid,
string_t  path 
)
static

◆ _mkdir()

static void _mkdir ( const char *  x,
mode_t  y 
)
static

Definition at line 49 of file create_mount_point.c.

Referenced by _zuluCryptCreateMountPath().

◆ _stat()

static void _stat ( const char *  x,
struct stat *  y 
)
static

Definition at line 53 of file create_mount_point.c.

Referenced by _zuluCryptCreateMountPath().

◆ _zuluCryptCreateMountPath()

static void _zuluCryptCreateMountPath ( const char *  path)
static

Definition at line 278 of file create_mount_point.c.

References _chmod(), _chown(), _mkdir(), and _stat().

Referenced by zuluCryptCreateMountPath().

◆ create_home_mount_point()

static string_t create_home_mount_point ( const char *  device,
const char *  label,
uid_t  uid 
)
static

◆ create_mount_point()

◆ home_mount_point_prefix_match()

static int home_mount_point_prefix_match ( const char *  m_path,
uid_t  uid,
string_t m_point 
)
static

Definition at line 268 of file create_mount_point.c.

References mount_point_prefix_match_0().

Referenced by zuluCryptMountPointPrefixMatch().

◆ home_mount_prefix()

static int home_mount_prefix ( void  )
static

◆ mount_point_prefix_match()

static int mount_point_prefix_match ( const char *  m_path,
uid_t  uid,
string_t m_point 
)
static

Definition at line 273 of file create_mount_point.c.

References mount_point_prefix_match_0().

Referenced by zuluCryptMountPointPrefixMatch().

◆ mount_point_prefix_match_0()

static int mount_point_prefix_match_0 ( const char *  m_path,
uid_t  uid,
string_t m_point,
int  home_prefix 
)
static

◆ zuluCryptCreateMountPath()

void zuluCryptCreateMountPath ( const char *  path)

◆ zuluCryptCreateMountPoint()

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

◆ zuluCryptCreateMountPointPrefix()

void zuluCryptCreateMountPointPrefix ( uid_t  uid)

◆ zuluCryptMountPointPrefixMatch()

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

◆ zuluCryptReuseMountPoint()

int zuluCryptReuseMountPoint ( void  )