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_volumes.c
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2011-2015
4  * name : Francis Banyikwa
5  * email: mhogomchungu@gmail.com
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include "includes.h"
21 #include "../lib/includes.h"
22 #include <libintl.h>
23 #include <locale.h>
24 #include <stdio.h>
25 #include <sys/stat.h>
26 
27 static int zuluExit( int st,stringList_t stl )
28 {
29  /*
30  * this function is defined in ../string/StringList.c
31  */
32  StringListClearDelete( &stl ) ;
33 
34  switch ( st ){
35  case 0 : printf( gettext( "SUCCESS: volume created successfully\n" ) ) ; break ;
36  case 1 : printf( gettext( "ERROR: Presented file system is not supported,see documentation for more information\n" ) ) ;break ;
37  case 2 : printf( gettext( "ERROR: Insufficient privilege to open a system device in read/write mode,\n\
38 only root user or members of group zulucrypt-system can do that\n" ) ) ; break ;
39  case 3 : printf( gettext( "ERROR: Could not create an encrypted volume\n" ) ) ; break ;
40  case 4 : printf( gettext( "ERROR: Could not open volume for writing\n" ) ) ; break ;
41  case 5 : printf( gettext( "ERROR: There seem to be an opened mapper associated with the device\n" ) ); break ;
42  case 6 : printf( gettext( "ERROR: Can not create a volume on a mounted device\n" ) ) ; break ;
43  case 7 : printf( gettext( "ERROR: Container file must be bigger than 3MB\n" ) ) ; break ;
44  case 8 : printf( "ERROR: %s not found \n",ZULUCRYPTmkfs ) ; break ;
45  case 9 : printf( gettext( "ERROR: Insufficient memory to hold your response\n" ) ) ; break ;
46  case 10: printf( gettext( "INFO: Operation terminated per user request\n" ) ) ; break ;
47  case 11: printf( gettext( "ERROR: Could not get passphrase in silent mode\n" ) ) ; break ;
48  case 12: printf( gettext( "ERROR: Insufficient memory to hold the passphrase\n" ) ) ; break ;
49  case 13: printf( gettext( "ERROR: Passphrases do not match\n" ) ) ; break ;
50  case 14: printf( gettext( "ERROR: Invalid path to key file\n" ) ) ; break ;
51  case 15: printf( gettext( "ERROR: Could not get a key from a key file\n" ) ) ; break ;
52  case 16: printf( gettext( "ERROR: Couldnt get enought memory to hold the key file\n" ) ) ; break ;
53  case 17: printf( gettext( "ERROR: Could not get a key from a socket\n" ) ) ; break ;
54  case 18: printf( gettext( "ERROR: One or more required argument(s) for this operation is missing\n" )); break ;
55  case 19: printf( gettext( "ERROR: Can not get passphrase in silent mode\n" ) ) ; break ;
56  case 20: printf( gettext( "ERROR: Insufficient memory to hold passphrase\n" ) ) ; break ;
57  case 21: printf( gettext( "ERROR: Passphrases do not match\n" ) ) ; break ;
58  case 22: printf( gettext( "ERROR: Failed to create a volume\n" ) ) ; break ;
59  case 23: printf( gettext( "ERROR: Wrong argument detected for tcrypt volume\n" ) ) ; break ;
60  default: printf( gettext( "ERROR: Unrecognized error with status number %d encountered\n" ),st ) ;
61  }
62  return st ;
63 }
64 
65 static int zuluExit_1( const char * type,stringList_t stl )
66 {
67  printf( gettext( "SUCCESS: Volume created successfully\n" ) ) ;
68 
69  if( StringAtLeastOneMatch_1( type,"luks","luks1","luks2","tcrypt","truecrypt","veracrypt","vera","vcrypt",NULL ) ){
70 
71  printf( gettext( "\nCreating a backup of the \"%s\" volume header is strongly adviced.\n" ),type ) ;
72  printf( gettext( "Please read documentation on why this is important\n\n" ) ) ;
73  }
74 
75  StringListClearDelete( &stl ) ;
76 
77  return 0 ;
78 }
79 
80 int zuluCryptEXECreateVolume( const struct_opts * opts,const char * mapping_name,uid_t uid )
81 {
82  int ask_confirmation = opts->ask_confirmation ;
83  const char * device = opts->device ;
84  const char * fs = opts->fs ;
85  const char * type = opts->type ;
86  const char * key_source = opts->key_source ;
87  const char * pass = opts->key ;
88  const char * rng = opts->rng ;
89  const char * const * tcrypt_keyfiles = opts->tcrypt_multiple_keyfiles ;
90 
91  /*
92  * Below is a form of memory management.All strings are collected in a stringlist object to easily delete them
93  * when the function returns.This allows for the function to have multiple exit points without risks of leaking
94  * memory from manually examining each exit point to make sure all strings are deleted or go with multiple goto
95  * code deleting blocks to take into account different exit points.
96  */
97  stringList_t stl ;
98  string_t * stringArray = StringListArray( &stl,6 ) ;
99  string_t * pass_1 = &stringArray[ 0 ] ;
100  string_t * pass_2 = &stringArray[ 1 ] ;
101  string_t * confirm = &stringArray[ 2 ] ;
102  string_t * mapper = &stringArray[ 3 ] ;
103  string_t * pass_3 = &stringArray[ 4 ] ;
104  string_t * pass_4 = &stringArray[ 5 ] ;
105 
108 
109  string_t p = StringVoid ;
110 
111  const char * volkey = "" ;
112  size_t volkeysize = 0 ;
113  const char * volkey_h = "" ;
114  size_t volkeysize_h = 0 ;
115 
116  int tcrypt_source = TCRYPT_PASSPHRASE ;
117  int tcrypt_source_h = TCRYPT_PASSPHRASE ;
118 
119  int socket_path ;
120 
121  int st ;
122 
123  int j ;
124  int k ;
125 
126  int truecrypt_volume = 0 ;
127  int veracrypt_volume = 0 ;
128 
129  u_int64_t hidden_volume_size = 0 ;
130 
131  u_int64_t size ;
132 
134 
135  const char * tcrypt_hidden_volume_size = opts->tcrypt_hidden_volume_size ;
136  const char * tcrypt_hidden_volume_key = opts->tcrypt_hidden_volume_key ;
137  const char * tcrypt_hidden_volume_key_file = opts->existing_key ;
138  const char * const * tcrypt_hidden_volume_keyFiles = opts->tcrypt_hidden_volume_multiple_keyfiles ;
139 
140  /*
141  * zulucryptFileSystemIsNotSupported() is defined in ../lib/mount_fs_options.c
142  */
143  if( !zulucryptFileSystemIsSupported( fs ) ){
144 
145  return zuluExit( 1,stl ) ;
146  }
147  /*
148  * zuluCryptPartitionIsSystemPartition() is defined in ./volumess.c
149  */
150  if( zuluCryptPartitionIsSystemPartition( device,uid ) ){
151 
153 
154  if( !zuluCryptUserIsAMemberOfAGroup( uid,"zulucrypt" ) ){
155 
156  return zuluExit( 2,stl ) ;
157  }
158  }
159  }
160 
161  /*
162  * zuluCryptSecurityDeviceIsWritable() is defined in path_access.c
163  */
164  st = zuluCryptCanOpenPathForWriting( device,uid ) ;
165  /*
166  * 1-permissions denied
167  * 2-invalid path
168  * 3-shenanigans
169  * 4-common error
170  */
171  switch( st ){
172 
173  case 0 : break ;
174  case 1 : return zuluExit( 4,stl ) ;
175  case 2 : return zuluExit( 4,stl ) ;
176  case 3 : return zuluExit( 4,stl ) ;
177  case 4 : return zuluExit( 4,stl ) ;
178  default: return zuluExit( 4,stl ) ;
179  }
180 
181  /*
182  * ZULUCRYPTlongMapperPath is set in ../constants.h
183  * zuluCryptCreateMapperName() is defined at ../lib/create_mapper_name.c
184  */
185  *mapper = zuluCryptCreateMapperName( device,mapping_name,uid,ZULUCRYPTlongMapperPath ) ;
186 
187  j = zuluCryptCheckOpenedMapper( StringContent( *mapper ) ) ;
188 
189  /*
190  * defined in ../lib/mountinfo.c
191  */
192  k = zuluCryptPartitionIsMounted( device ) ;
193 
194  if( j == 1 ){
195 
196  return zuluExit( 5,stl ) ;
197  }
198  if( k == 1 ){
199 
200  return zuluExit( 6,stl ) ;
201  }
202 
203  if( StringPrefixEqual( device,"/dev/loop" ) ){
204 
206  /*
207  * zuluCryptGetVolumeSize() is defined in volumes.c
208  */
209  size = zuluCryptGetVolumeSize( device ) ;
210 
212 
213  if( size < 3145728 ){
214 
215  return zuluExit( 7,stl ) ;
216  }
217  }
218 
219  /*
220  * ZULUCRYPTmkfs is defined at "../constants.h"
221  * File systems are created not through file systems APIs but through mkfs.xxx executables started using exec call.
222  */
224 
225  return zuluExit( 8,stl ) ;
226  }
227  if( ask_confirmation ){
228 
229  printf( gettext( "\nThis operation will destroy all data in a device at: \"%s\"\n" ),device ) ;
230  printf( gettext( "Are you sure you want to proceed?\n" ) ) ;
231  printf( gettext( "Type \"YES\" and press enter if you want to process: " ) ) ;
232 
233  *confirm = StringGetFromTerminal_1( 3 ) ;
234 
235  if( *confirm == StringVoid ){
236 
237  return zuluExit( 9,stl ) ;
238  }else{
239  if( StringsAreNotEqual_2( *confirm,gettext( "YES" ) ) ){
240 
241  return zuluExit( 10,stl ) ;
242  }
243  }
244  }
245 
246  truecrypt_volume = StringAtLeastOneMatch_1( type,"tcrypt","truecrypt",NULL ) ;
247  veracrypt_volume = StringAtLeastOneMatch_1( type,"vcrypt","veracrypt","vera",NULL ) ;
248 
249  if( key_source == NULL ){
250 
251  printf( gettext( "Enter passphrase: " ) ) ;
252 
253  /*
254  * ZULUCRYPT_KEY_MAX_SIZE is set in ../constants.h
255  */
256 
258 
259  case 1 : return zuluExit( 11,stl ) ;
260  case 2 : return zuluExit( 12,stl ) ;
261  }
262 
263  printf( gettext( "\nRe enter passphrase: " ) ) ;
264 
266 
267  case 1 : return zuluExit( 11,stl ) ;
268  case 2 : return zuluExit( 12,stl ) ;
269  }
270 
271  printf( "\n" ) ;
272 
273  if( !StringsAreEqual_1( *pass_1,*pass_2 ) ){
274 
275  return zuluExit( 13,stl ) ;
276  }
277 
278  tcrypt_source = TCRYPT_PASSPHRASE ;
279  }else{
280  if( StringsAreEqual( key_source,"-p" ) ){
281 
282  *pass_1 = String( pass ) ;
283  tcrypt_source = TCRYPT_PASSPHRASE ;
284 
285  }else if( StringsAreEqual( key_source,"-f" ) ){
286 
287  /*
288  * function is defined at "path_access.c"
289  */
290 
291  switch( zuluCryptGetPassFromFile( &socket_path,pass,uid,pass_1 ) ){
292 
293  case 1 : return zuluExit( 14,stl ) ;
294  case 4 : return zuluExit( 15,stl ) ;
295  case 2 : return zuluExit( 16,stl ) ;
296  case 5 : return zuluExit( 17,stl ) ;
297  }
298 
299  if( *pass_1 == StringVoid ){
300 
301  return zuluExit( 17,stl ) ;
302  }
303 
304  if( socket_path ){
305 
306  tcrypt_source = TCRYPT_PASSPHRASE ;
307  }else{
308  tcrypt_source = TCRYPT_KEYFILE ;
309  }
310  }else{
311  return zuluExit( 18,stl ) ;
312  }
313  }
314 
315  if( tcrypt_hidden_volume_size != NULL ){
316 
317  if( !( truecrypt_volume || veracrypt_volume ) ){
318 
319  return zuluExit( 23,stl ) ;
320  }else{
321  hidden_volume_size = StringConvertToInt( tcrypt_hidden_volume_size ) ;
322 
323  if( tcrypt_hidden_volume_key_file != NULL ){
324 
325  /*
326  * function is defined in "path_access.c"
327  */
328 
329  switch( zuluCryptGetPassFromFile( &socket_path,tcrypt_hidden_volume_key_file,uid,pass_3 ) ){
330 
331  case 1 : return zuluExit( 14,stl ) ;
332  case 4 : return zuluExit( 15,stl ) ;
333  case 2 : return zuluExit( 16,stl ) ;
334  case 5 : return zuluExit( 17,stl ) ;
335  }
336  if( socket_path ){
337 
338  tcrypt_source_h = TCRYPT_PASSPHRASE ;
339  }else{
340  tcrypt_source_h = TCRYPT_KEYFILE ;
341  }
342  }else if( tcrypt_hidden_volume_key == NULL ){
343 
344  printf( gettext( "Enter tcrypt hidden passphrase: " ) ) ;
345  /*
346  * ZULUCRYPT_KEY_MAX_SIZE is set in ../constants.h
347  */
349 
350  case 1 : return zuluExit( 19,stl ) ;
351  case 2 : return zuluExit( 20,stl ) ;
352  }
353 
354  printf( gettext( "\nRe enter tcrypt hidden passphrase: " ) ) ;
355 
357 
358  case 1 : return zuluExit( 19,stl ) ;
359  case 2 : return zuluExit( 20,stl ) ;
360  }
361 
362  printf( "\n" ) ;
363 
364  if( !StringsAreEqual_1( *pass_3,*pass_4 ) ){
365 
366  return zuluExit( 21,stl ) ;
367  }
368 
369  tcrypt_source_h = TCRYPT_PASSPHRASE ;
370 
371  }else if( tcrypt_hidden_volume_key != NULL ){
372 
373  *pass_3 = String( tcrypt_hidden_volume_key ) ;
374  tcrypt_source_h = TCRYPT_PASSPHRASE ;
375  }else{
376  return zuluExit( 18,stl ) ;
377  }
378 
379  volkey_h = StringContent( *pass_3 ) ;
380  volkeysize_h = StringLength( *pass_3 ) ;
381  }
382  }
383 
384  volkey = StringContent( *pass_1 ) ;
385  volkeysize = StringLength( *pass_1 ) ;
386 
387  if( truecrypt_volume || veracrypt_volume ){
388 
389  memset( &tcrypt,'\0',sizeof( create_tcrypt_t ) ) ;
390 
391  tcrypt.device = device ;
392  tcrypt.fs = fs ;
393  tcrypt.fs_h = fs ;
394  tcrypt.encryption_options = rng ;
395  tcrypt.hidden_volume_size = hidden_volume_size ;
396  tcrypt.veraCrypt_volume = veracrypt_volume ;
397 
398  if( tcrypt_keyfiles[ 0 ] != NULL ){
399  /*
400  * zuluCryptCreateKeyFiles() is defined in create_volume.c
401  */
402  stz = zuluCryptCreateKeyFiles( tcrypt_keyfiles,0 ) ;
403  }
404 
405  if( tcrypt_source == TCRYPT_KEYFILE ){
406 
408  /*
409  * zuluCryptCreateKeyFile() is defined in ../lib/open_tcrypt.c
410  */
411  p = zuluCryptCreateKeyFile( volkey,volkeysize,"create-key-" ) ;
412 
414  StringListAppendString_1( &stz,&p ) ;
415 
416  tcrypt.passphrase = "" ;
417  tcrypt.passphrase_size = 0 ;
418  }else{
419  tcrypt.passphrase = volkey ;
420  tcrypt.passphrase_size = volkeysize ;
421  }
422 
423  tcrypt.keyfiles = StringListStringArray_0( stz ) ;
424  tcrypt.keyfiles_number = StringListSize( stz ) ;
425 
426  if( tcrypt.hidden_volume_size > 0 ){
427 
428  if( tcrypt_hidden_volume_keyFiles[ 0 ] != NULL ){
429  /*
430  * zuluCryptCreateKeyFiles() is defined in open_volume.c
431  */
432  stk = zuluCryptCreateKeyFiles( tcrypt_hidden_volume_keyFiles,1000 ) ;
433  }
434 
435  if( tcrypt_source_h == TCRYPT_KEYFILE ){
436 
438 
439  p = zuluCryptCreateKeyFile( volkey_h,volkeysize_h,"create-key_h-" ) ;
440 
442 
443  StringListAppendString_1( &stk,&p ) ;
444 
445  tcrypt.passphrase_h = "" ;
446  tcrypt.passphrase_h_size = 0 ;
447  }else{
448  tcrypt.passphrase_h = volkey_h ;
449  tcrypt.passphrase_h_size = volkeysize_h ;
450  }
451 
452  tcrypt.keyfiles_h = StringListStringArray_0( stk ) ;
453  tcrypt.keyfiles_h_number = StringListSize( stk ) ;
454  }
455 
457 
458  /*
459  * zuluCryptCreateTCryptVolume() is defined in ../lib/create_tcrypt.c
460  */
462 
464 
465  /*
466  * zuluCryptDeleteKeyFiles() is defined in open_volume.c
467  */
468  zuluCryptDeleteKeyFiles( stz ) ;
469  zuluCryptDeleteKeyFiles( stk ) ;
470 
471  StringFree( tcrypt.keyfiles_h ) ;
472  StringFree( tcrypt.keyfiles ) ;
473 
474  StringListMultipleDelete( &stz,&stk,NULL ) ;
475  }else{
477 
478  /*
479  * zuluCryptCreateVolume() is defined in ../lib/create_volume.c
480  */
481  st = zuluCryptCreateVolume( device,fs,type,volkey,volkeysize,rng ) ;
482 
484  }
485 
486  if( st == 0 ){
487 
488  return zuluExit_1( type,stl ) ;
489  }else{
490  return zuluExit( 22,stl ) ;
491  }
492 }
struct_opts_1::tcrypt_multiple_keyfiles
const char * tcrypt_multiple_keyfiles[16+1]
Definition: libzuluCrypt-exe.h:54
StringListVoid
#define StringListVoid
Definition: StringList.h:41
StringSilentlyGetFromTerminal_1
int StringSilentlyGetFromTerminal_1(string_t *q, size_t s)
Definition: String.c:1752
zuluCryptCreateVolume
int zuluCryptCreateVolume(const char *device, const char *fs, const char *type, const char *pass, size_t pass_size, const char *rng)
Definition: create_volume.c:183
struct_opts_1::tcrypt_hidden_volume_multiple_keyfiles
const char * tcrypt_hidden_volume_multiple_keyfiles[16+1]
Definition: libzuluCrypt-exe.h:53
zulucryptFileSystemIsSupported
int zulucryptFileSystemIsSupported(const char *fs)
Definition: mount_fs_options.c:64
struct_opts_1::type
const char * type
Definition: libzuluCrypt-exe.h:44
struct_opts_1::key
const char * key
Definition: libzuluCrypt-exe.h:42
struct_opts_1::device
const char * device
Definition: libzuluCrypt-exe.h:37
StringLength
size_t StringLength(string_t st)
Definition: String.c:678
StringListSize
size_t StringListSize(stringList_t stl)
Definition: StringList.c:492
StringListAppendString_1
void StringListAppendString_1(stringList_t *stl, string_t *st)
Definition: StringList.c:659
zuluCryptDeleteKeyFiles
void zuluCryptDeleteKeyFiles(stringList_t stl)
Definition: open_volume.c:71
zuluCryptCanOpenPathForWriting
int zuluCryptCanOpenPathForWriting(const char *path, uid_t uid)
Definition: path_access.c:103
struct_opts_1
Definition: libzuluCrypt-exe.h:35
ZULUCRYPTmkfs
#define ZULUCRYPTmkfs
Definition: constants.h:25
struct_opts_1::key_source
const char * key_source
Definition: libzuluCrypt-exe.h:41
zuluCryptCreateMapperName
string_t zuluCryptCreateMapperName(const char *device, const char *mapping_name, uid_t uid, int i)
Definition: create_mapper_name.c:42
zuluCryptUserIsAMemberOfAGroup
int zuluCryptUserIsAMemberOfAGroup(uid_t uid, const char *groupname)
Definition: mount_fs_options.c:172
zuluCryptCreateTCryptVolume
int zuluCryptCreateTCryptVolume(const create_tcrypt_t *tcrypt)
Definition: create_tcrypt.c:425
struct_opts_1::fs
const char * fs
Definition: libzuluCrypt-exe.h:43
StringsAreNotEqual_2
static __inline__ int StringsAreNotEqual_2(string_t x, const char *y)
Definition: String.h:656
StringsAreEqual
#define StringsAreEqual(x, y)
Definition: zuluSafe.c:46
zuluCryptPathIsNotValid
int zuluCryptPathIsNotValid(const char *path)
Definition: is_path_valid.c:29
struct_opts_1::existing_key
const char * existing_key
Definition: libzuluCrypt-exe.h:47
StringListMultipleDelete
void StringListMultipleDelete(stringList_t *stl,...)
Definition: StringList.c:1249
struct_opts_1::tcrypt_hidden_volume_key
const char * tcrypt_hidden_volume_key
Definition: libzuluCrypt-exe.h:52
StringAtLeastOneMatch_1
int StringAtLeastOneMatch_1(const char *x,...)
Definition: String.c:1504
StringContent
static const __inline__ char * StringContent(string_t st)
Definition: String.h:1011
zuluCryptCreateKeyFile
string_t zuluCryptCreateKeyFile(const char *key, size_t key_len, const char *fileName)
Definition: open_tcrypt.c:125
StringType
Definition: String.c:49
StringsAreEqual_1
int StringsAreEqual_1(string_t x, string_t y)
Definition: String.c:1460
zuluCryptSecurityDropElevatedPrivileges
int zuluCryptSecurityDropElevatedPrivileges(void)
Definition: security.c:109
create_tcrypt_t
Definition: includes.h:97
tcrypt
Definition: tcrypt.h:39
String
string_t String(const char *cstring)
Definition: String.c:318
struct_opts_1::ask_confirmation
int ask_confirmation
Definition: libzuluCrypt-exe.h:62
zuluCryptSecurityGainElevatedPrivileges
int zuluCryptSecurityGainElevatedPrivileges(void)
Definition: security.c:64
struct_opts_1::rng
const char * rng
Definition: libzuluCrypt-exe.h:45
zuluCryptGetVolumeSize
u_int64_t zuluCryptGetVolumeSize(const char *device)
Definition: volumes.c:726
StringListArray
string_t * StringListArray(stringList_t *stz, size_t arraySize)
Definition: StringList.c:244
struct_opts_1::tcrypt_hidden_volume_size
const char * tcrypt_hidden_volume_size
Definition: libzuluCrypt-exe.h:51
ZULUCRYPT_KEY_MAX_SIZE
#define ZULUCRYPT_KEY_MAX_SIZE
Definition: constants.h:49
StringListType
Definition: StringList.c:33
zuluCryptEXECreateVolume
int zuluCryptEXECreateVolume(const struct_opts *opts, const char *mapping_name, uid_t uid)
Definition: create_volumes.c:80
zuluExit
static int zuluExit(int st, stringList_t stl)
Definition: create_volumes.c:27
zuluExit_1
static int zuluExit_1(const char *type, stringList_t stl)
Definition: create_volumes.c:65
TCRYPT_KEYFILE
#define TCRYPT_KEYFILE
Definition: libzuluCrypt.h:306
zuluCryptPartitionIsMounted
int zuluCryptPartitionIsMounted(const char *device)
Definition: mountinfo.c:205
zuluCryptGetPassFromFile
int zuluCryptGetPassFromFile(int *socket_path, const char *path, uid_t uid, string_t *st)
Definition: path_access.c:121
zuluCryptPartitionIsSystemPartition
int zuluCryptPartitionIsSystemPartition(const char *dev, uid_t uid)
Definition: volumes.c:1143
StringConvertToInt
u_int64_t StringConvertToInt(const char *s)
Definition: String.c:1416
zuluCryptCheckOpenedMapper
int zuluCryptCheckOpenedMapper(const char *mapper)
Definition: check_opened_mapper.c:23
StringListClearDelete
void StringListClearDelete(stringList_t *stl)
Definition: StringList.c:1216
StringGetFromTerminal_1
string_t StringGetFromTerminal_1(size_t s)
Definition: String.c:1675
StringListStringArray_0
static const __inline__ char *const * StringListStringArray_0(stringList_t stl)
Definition: StringList.h:402
TCRYPT_PASSPHRASE
#define TCRYPT_PASSPHRASE
Definition: libzuluCrypt.h:305
zuluCryptCreateKeyFiles
stringList_t zuluCryptCreateKeyFiles(const char *const *list, int s)
Definition: open_volume.c:30
includes.h
zuluCryptExeOriginalUserIsNotRoot
int zuluCryptExeOriginalUserIsNotRoot()
Definition: security.c:59
ZULUCRYPTlongMapperPath
#define ZULUCRYPTlongMapperPath
Definition: constants.h:36
StringPrefixEqual
static __inline__ int StringPrefixEqual(const char *x, const char *y)
Definition: String.h:905
StringFree
static __inline__ void StringFree(const void *str)
Definition: String.h:823
StringVoid
#define StringVoid
Definition: String.h:47