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
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 #ifndef ZULUCRYPT_LIB
21 #define ZULUCRYPT_LIB
22 
23 #include "../utility/string/String.h"
24 #include "../utility/string/StringList.h"
25 #include "../utility/process/process.h"
26 #include "../constants.h"
27 #include "libzuluCrypt.h"
28 #include "../bin/bash_special_chars.h"
29 
30 #include <blkid/blkid.h>
31 
32 #include <gcrypt.h>
33 
34 #include "support_whirlpool.h"
35 
36 /*
37  * below header is created at build time,it is set by CMakeLists.txt located in the root folder
38  */
39 #include "version.h"
40 
41 typedef struct{
42  const char * device ;
43  const char * m_point ;
44  const char * fs ;
45  const char * opts ;
46  uid_t uid ;
47  unsigned long m_flags ;
48  const char * fs_flags ;
49 }m_struct;
50 
51 typedef struct{
52  const char * device ;
53  const char * header_source ;
54  const char * tmp_path ;
55  const char * opt ;
56  const char * key ;
57  const char * rng ;
58  const char * header_key ;
59  const char * header_key_source ;
60  const char * header_new_key ;
61  const char * header_new_key_source ;
62  uid_t uid ;
65  string_t ( *getKey )( int * ) ;
66 }info_t ;
67 
68 typedef struct{
69  const char * device ;
70  const char * plain_dm_properties ;
71  const char * mapper_name ;
72  const char * mapper_path ;
73  const char * key ;
74  const char * m_point ;
75  const char * fs_opts ;
76  const char * m_opts ;
77  const char * luks_detached_header ;
78 
79  size_t key_len ;
80  uid_t uid ;
82  int key_source ;
90  const char * const * tcrypt_keyfiles ;
91  unsigned long m_flags ;
94  void * variables ;
96 
97 typedef struct{
98  const char * device ;
99  const char * passphrase ;
101  const char * const * keyfiles ;
103  const char * passphrase_h ;
105  const char * const * keyfiles_h ;
107  const char * encryption_options ;
108  u_int64_t hidden_volume_size ;
109  const char * fs ;
110  const char * fs_h ;
113 
114 typedef struct{
115  const char * device ;
117  char * error_value_1 ;
118  int open_mode ;
119  const void * args ;
121 
122 /*
123  * we only support whirlpool with cryptsetup >= 1.6.4 and libgcrypt >= 1.6.1
124  *
125  * read section 8.3 of cryptsetup FAQ for more info.
126  */
127 
128 static inline int zuluCryptWhirlpoolIsSupported( void )
129 {
130 #ifdef GCRYPT_VERSION_NUMBER
131  return GCRYPT_VERSION_NUMBER >= 0x010601 && SUPPORT_WHIRLPOOL ;
132 #else
133  return SUPPORT_WHIRLPOOL ;
134 #endif
135 }
136 
137 /*
138  * zuluCryptVeraCryptPIM() is defined in volume_type.c
139  */
140 const char * zuluCryptBitLockerType( void ) ;
141 
142 /*
143  * zuluCryptVeraCryptPIM() is defined in volume_type.c
144  */
145 const char * zuluCryptBitLockerFolderPrefix( void ) ;
146 
147 /*
148  * zuluCryptVeraCryptPIM() is defined in create_tcrypt.c
149  */
150 int zuluCryptVeraCryptPIM( int e ) ;
151 
152 /*
153  * zuluCryptSystemVeraCryptPIM() is defined in create_tcrypt.c
154  */
155 int zuluCryptSystemVeraCryptPIM( int e ) ;
156 
157 /*
158  * zuluCryptResolveDevicePath() is defined in resolve_path.c
159  */
160 int zuluCryptResolveDevicePath( int( * )( const char *,const resolve_path_t * ),
161  const resolve_path_t * ) ;
162 
163 /*
164  * zuluCryptResolveDevicePath_1() is defined in resolve_path.c
165  */
166 char * zuluCryptResolveDevicePath_1( char *( * )( const char *,const resolve_path_t * ),
167  const resolve_path_t * ) ;
168 /*
169  * zuluCryptResolveDevicePath_0() is defined in resolve_path.c
170  */
171 int zuluCryptResolveDevicePath_0( int( * )( const char *,const resolve_path_t * ),
172  const open_struct_t *,int ) ;
173 
174 /*
175  * zuluCryptCreateTCryptVolume() is defined in create_tcrypt.c
176  */
178 
179 /*
180  * zuluCryptOpenVolume_1() is defined in open_volume.c
181  */
182 int zuluCryptOpenVolume_1( const open_struct_t * ) ;
183 
184 /*
185  * zuluCryptOpenVolume_1() is defined in open_volume.c
186  */
187 int zuluCryptOpenVolume_2( const open_struct_t * ) ;
188 
189 /*
190  * zuluCryptOpenPlain_1() is defined in open_plain.c
191  */
192 int zuluCryptOpenPlain_1( const open_struct_t * ) ;
193 
194 /*
195  * zuluCryptOpenLuks_1() is defined in open_luks.c
196  */
197 int zuluCryptOpenLuks_1( const open_struct_t * ) ;
198 
199 /*
200  * zuluCryptOpenLuks_2() is defined in open_luks.c
201  */
202 int zuluCryptOpenLuks_2( const open_struct_t * ) ;
203 
204 /*
205  * zuluCryptOpenTcrypt_1() is defined in open_tcrypt.c
206  */
207 int zuluCryptOpenTcrypt_1( const open_struct_t * ) ;
208 
209 /*
210  * zuluCryptOpenVolume_0() is defined in open_volume.c
211  */
212 int zuluCryptOpenVolume_0( int( *function )( const open_struct_t * ),const open_struct_t * ) ;
213 
214 /*
215  * this function is defined in create_loop_device.c
216  */
217 int zuluCryptAttachLoopDeviceToFileUsingFileDescriptor( int fd_path,int * fd_loop,int mode,string_t * loop_device ) ;
218 
219 /*
220  * this function is defined in status.c
221  */
222 int zuluCryptVolumeManagedByTcplay( const char * mapper ) ;
223 
224 /*
225  * this function is defined in status.c
226  */
227 void zuluCryptFileSystemProperties( string_t p,const char * mapper,const char * m_point ) ;
228 
229 /*
230  * this function is defined in create_mapper_name.c
231  */
232 const char * zuluCryptMapperPrefix( void ) ;
233 
234 /*
235  * zuluCryptConvertCipher() is defined in create_tcrypt.c
236  */
237 const char * zuluCryptConvertCipher( const char * ) ;
238 
239 /*
240  * this function is defined in create_mapper_name.c
241  */
242 string_t zuluCryptCreateMapperName( const char * device,const char * mapping_name,uid_t uid,int i ) ;
243 
244 /*
245  * this function checks if path exists or not.
246  * return 1 if the path exists
247  * return 0 if it does not
248  */
249 int zuluCryptPathIsValid( const char * path ) ;
250 
251 /*
252  * this function checks if a path exists or not
253  * return 1 if the path does not exists
254  * return 0 if the path exist
255  */
256 int zuluCryptPathIsNotValid( const char * path ) ;
257 
258 /*
259  * this function checks if a path exists or not
260  * return 1 if the path does not exists
261  * return 0 if the path exist
262  */
264 
265 /*
266  * zuluCryptDecodeMountEntry() is defined in mount_volume.c
267  */
268 const char * zuluCryptDecodeMountEntry( string_t ) ;
269 
270 /*
271  * zuluCryptDecodeMountEntry() is defined in mount_volume.c
272  */
273 const char * zuluCryptEncodeMountEntry( string_t ) ;
274 
275 /*
276  *this function is deined in ../lib/process_mountinfo.c
277  */
279 
280 /*
281  * this is defined in print_mounted_volumes.c
282  */
283 int zuluCryptPartitionIsMounted( const char * device ) ;
284 
285 /*
286  * parse "/etc/fstab" and return a field at position "pos" on a line
287  * that corresponds to device "device".
288  */
289 #define MOUNTPOINT 1
290 #define FILESYSTEM 2
291 #define MOUNTOPTIONS 3
292 #define DUMPOPTION 4
293 #define FSCKOPTION 5
294 
295 string_t zuluCryptGetMountOptionsFromFstab( const char * device,int pos,uid_t uid ) ;
296 
297 /*
298  * this function is defined in process_mountinfo.c
299  */
300 
301 string_t zuluCryptGetMountEntry( const char * path ) ;
302 
303 /*
304  * this function is defined in process_mountinfo.c
305  */
306 string_t zuluCryptGetMountEntry_1( stringList_t stl,const char * path ) ;
307 
308 /*
309  * this function is defined in is_luks.c
310  */
311 int zuluCryptVolumeIsNotLuks( const char * dev ) ;
312 
313 /*
314  * this function is defined in ./create_loop_device.c
315  */
316 int zuluCryptAttachLoopDeviceToFile( const char * path,int mode,int * fd,string_t * loop_device ) ;
317 
318 /*
319  * this function is defined in ./blkid_evaluate_tag.c
320  */
321 string_t zuluCryptGetFileSystemFromDevice( const char * device ) ;
322 
323 /*
324  * this function is defined in ./blkid_evaluate_tag.c
325  */
326 int zuluCryptDeviceHasEncryptedFileSystem( const char * device ) ;
327 
328 /*
329  * this function is defined in ./blkid_evaluate_tag.c
330  */
331 const char * zuluCryptVolumeType( blkid_probe blkid,const char * device ) ;
332 
333 /*
334  * this function is defined in ./blkid_evaluate_tag.c
335  */
336 int zuluCryptDeviceHasAgivenFileSystem( const char * device,const char * fs ) ;
337 
338 /*
339  * this function is defined in ./blkid_evaluate_tag.c
340  */
341 int zuluCryptMultiPartitionLoopDevice( const char * e ) ;
342 
343 /*
344  * this function is defined in ./blkid_evaluate_tag.c
345  */
346 int zuluCryptNoPartitionLoopDevice( const char * e ) ;
347 
348 /*
349  * this function is defined in ./create_loop_device.c
350  */
351 char * zuluCryptLoopDeviceAddress( const char * device ) ;
352 
353 /*
354  * this function is defined in ./create_loop_device.c
355  */
356 char * zuluCryptLoopDeviceAddress_1( const char * device ) ;
357 
358 /*
359  * this function is defined in ./create_luks.c
360  */
361 void zuluCryptDisableMetadataLocking( void ) ;
362 
363 /*
364  * this function is defined in ./create_luks.c
365  */
366 void zuluCryptPrintLogOutPut( void * ) ;
367 
368 /*
369  * this function is defined in ./create_loop_device.c
370  */
371 string_t zuluCryptLoopDeviceAddress_2( const char * device ) ;
372 
373 /*
374  * this function is defined in ./create_loop_device.c
375  */
376 char * zuluCryptGetLoopDeviceAddress( const char * device ) ;
377 
378 /*
379  * this function is defined in ./process_mountinfo.c
380  */
381 char * zuluCryptGetMountPointFromPath( const char * path ) ;
382 
383 /*
384  * this function is defined in ./process_mountinfo.c
385  */
386 char * zuluCryptGetMountPointFromPath_1( const char * path ) ;
387 
388 /*
389  * this function is defined in ./process_mountinfo.c
390  */
391 char * zuluCryptResolveDevRoot( void ) ;
392 
393 /*
394  * this function is defined in ./process_mountinfo.c
395  */
396 stringList_t zuluCryptGetFstabEntryList( const char * device,uid_t uid ) ;
397 
398 /*
399  * this function is defined in blkid_evaluate_tag.c
400  */
401 char * zuluCryptDeviceFromUUID( const char * uuid ) ;
402 
403 /*
404  * this function is defined in blkid_evaluate_tag.c
405  */
406 char * zuluCryptDeviceFromLabel( const char * label ) ;
407 
408 /*
409  * this function is defined in blkid_evaluate_tag.c
410  */
411 char * zuluCryptDeviceFromPARTUUID( const char * p_uuid ) ;
412 
413 /*
414  * this function is defined in blkid_evaluate_tag.c
415  */
416 char * zuluCryptDeviceFromPARTLABEL( const char * p_label ) ;
417 
418 /*
419  * this function is defined in blkid_evaluate_tag.c
420  */
421 char * zuluCryptUUIDFromPath_1( const char * device ) ;
422 
423 /*
424  * this function is defined in volume_types.c
425  */
426 int zuluCryptGetVolumeType( const char * device,const char * pass,size_t pass_size ) ;
427 
428 /*
429  * this function is defined in open_tcrypt.c
430  */
431 int zuluCryptVolumeIsTcrypt( const char * device,const char * key,int key_source ) ;
432 
433 /*
434  * this function is defined in mount_fs_options.c
435  */
436 int zuluCryptMountHasNotAllowedFileSystemOptions( uid_t uid,const char * fs_opts,string_t s ) ;
437 
438 /*
439  * this functioon is defined in ./real_path.c
440  */
441 int zuluCryptPathDidNotChange( const char * path ) ;
442 
443 /*
444  * this functioon is defined in ./real_path.c
445  */
446 int zuluCryptPathDeviceIsBlockDevice( const char * device ) ;
447 
448 /*
449  * this function is defined in mount_fs_options
450  */
451 int zulucryptFileSystemIsSupported( const char * fs ) ;
452 
453 /*
454  * this function is defined in user_home_path.c
455  */
456 string_t zuluCryptGetUserName( uid_t uid ) ;
457 
458 /*
459  * this function is defined in bitlocker.c
460  */
462 
463 /*
464  * this function is defined in bitlocker.c
465  */
466 string_t zuluCryptBitLockerFullMapperPath( uid_t uid,const char * e ) ;
467 
468 /*
469  * this function is defined in bitlocker.c
470  */
471 string_t zuluCryptBitLockerMapperName( const char * ) ;
472 
473 /*
474  * this function is defined in bitlocker.c
475  */
476 string_t zuluCryptBitLockerResolveMapperPath( const char * e,uid_t ) ;
477 
478 /*
479  * this function is defined in bitlocker.c
480  */
481 int zuluCryptBitLockerUnlock( const open_struct_t * opts,string_t * st ) ;
482 
483 /*
484  * this function is defined in bitlocker.c
485  */
486 int zuluCryptBitLockerlock( string_t mapperPath,char ** mount_point ) ;
487 
488 /*
489  * this function is defined in bitlocker.c
490  */
491 int zuluCryptBitLockerlock_1( const char * ) ;
492 
493 /*
494  * this function is defined in bitlocker.c
495  */
496 const char * zuluCryptBitLockerCreateMapperPath( string_t e,uid_t uid ) ;
497 
498 /*
499  * this function is defined in bitlocker.c
500  */
501 int zuluCryptBitLockerVolume( const char * e ) ;
502 
503 /*
504  * this function is defined in bitlocker.c
505  */
506 char * zuluCryptBitLockerUnmountPath( const char * e ) ;
507 
508 /*
509  * this function is defined in bitlocker.c
510  */
511 string_t zuluCryptBitLockerVolumeFS( const char * e ) ;
512 
513 /*
514  * this function is defined in blkid_evaluate_tag.c
515  */
516 string_t zulucryptGetBlkidFileSystem( const char * device ) ;
517 
518 /*
519  * this function is defined in bitlocker.c
520  */
521 int zuluCryptBitLockerVolume_1( const char * e ) ;
522 
523 /*
524  * this function is defined in real_path.c
525  */
526 char * zuluCryptRealPath( const char * path ) ;
527 
528 /*
529  * this function is defined in create_loop_device.c
530  */
532 
533 /*
534  * this function is defined in file_path_security.c
535  */
536 int zuluCryptGetDeviceFileProperties( const char * file,int * fd_path,int * fd_loop,char ** dev,uid_t uid ) ;
537 
538 /*
539  * this function is defined in file_path_security.c
540  */
541 int zuluCryptSecureOpenFile( const char * path,int * fd_path,string_t * file,uid_t uid ) ;
542 
543 /*
544  * this function is defined in mount_volume.c
545  */
547 
548 /*
549  * this function is defined in process_mountinfo.c
550  */
552 
553 /*
554  * this function is defined in process_mountinfo.c
555  */
557 
558 /*
559  * this function is defined in status.c
560  */
561 char * zuluCryptGetVolumeTypeFromMapperPath( const char * mapper ) ;
562 
563 /*
564  * this function is defined in status.c
565  */
566 char * zuluCryptGetVolumeType_1( const char * m ) ;
567 
568 /*
569  * this function is defined in create_volume.c
570  */
571 int zuluCryptCreateFileSystemInAVolume( const char * fs,const char * device_mapper ) ;
572 
573 /*
574  * this function is defined in resolve_paths.c
575  */
576 string_t zuluCryptConvertIfPathIsLVM( const char * path ) ;
577 
578 /*
579  * this function is defined in resolve_paths.c
580  */
581 char * zuluCryptResolveMDPath( const char * path ) ;
582 
583 /*
584  * this function is defined in resolve_paths.c
585  */
586 string_t zuluCryptResolveMDPath_1( const char * path ) ;
587 
588 /*
589  * this function is defined in file_path_security.c
590  */
591 void zuluCryptDeleteFile( const char * file ) ;
592 
593 /*
594  * this function is defined in file_path_security.c
595  */
596 void zuluCryptDeleteFile_1( string_t file ) ;
597 
598 /*
599  * this function is defined in blkid_evaluate_tag.c
600  */
601 int zuluCryptFileSystemIsFUSEbased( const char * device ) ;
602 
603 /*
604  * this function is defined in status.c
605  */
606 void zuluCryptFormatSize( u_int64_t number,char * buffer,size_t buffer_size ) ;
607 
608 /*
609  * zuluCryptCreateKeyFile() is defined in open_tcrypt.c
610  */
611 string_t zuluCryptCreateKeyFile( const char * key,size_t key_len,const char * fileName ) ;
612 
613 /*
614  * zuluCryptCreateKeyFile_1() is defined in open_tcrypt.c
615  */
616 string_t zuluCryptCreateKeyFile_1( string_t key,const char * fileName ) ;
617 
618 /*
619  * zuluCryptResolvePath_2() is defined in resolve_paths.c
620  */
621 string_t zuluCryptResolvePath_2( const char * path ) ;
622 
623 /*
624  * zuluCryptResolvePath_1() is defined in resolve_paths.c
625  */
626 string_t zuluCryptResolvePath_1( const char * path ) ;
627 
628 /*
629  * zuluCryptResolvePath_3() is defined in resolve_paths.c
630  */
631 char * zuluCryptResolvePath_3( const char * path ) ;
632 
633 /*
634  * zuluCryptResolvePath_4() is defined in resolve_paths.c
635  */
636 char * zuluCryptResolvePath_4( const char * path ) ;
637 
638 /*
639  * zuluCryptResolvePath() is defined in resolve_paths.c
640  */
641 char * zuluCryptResolvePath( const char * path ) ;
642 
643 /*
644  * zuluCryptGetMoutedList_1() is defined in process_mountinfo.c
645  */
647 
648 /*
649  * zuluCryptGetMoutedList() is defined in process_mountinfo.c
650  */
652 
653 /*
654  * zuluCryptMountPointIsActive() is defined in process_mountinfo.c
655  */
656 int zuluCryptMountPointIsActive( const char * ) ;
657 
658 /*
659  * zuluCryptGetALoopDeviceAssociatedWithAnImageFile() is defined in create_loop_device.c
660  */
661 char * zuluCryptGetALoopDeviceAssociatedWithAnImageFile( const char * path ) ;
662 
663 /*
664  * zuluCryptGetAListOfMountedVolumes() is defined in process_mountinfo.c
665  */
667 
668 /*
669  * zuluCryptModifyTcryptHeader() is defined in create_tcplay.c
670  */
671 int zuluCryptModifyTcryptHeader( const info_t * info ) ;
672 
673 /*
674  * this function is defined in mount_fs_options.c
675  */
676 int zuluCryptUserIsAMemberOfAGroup( uid_t uid,const char * groupname ) ;
677 
678 /*
679  * this function is defined in open_tcrypt.c
680  */
681 int zuluCryptUseZuluPlayVCRYPT( void ) ;
682 
683 /*
684  * this function is defined in open_tcrypt.c
685  */
686 int zuluCryptUseZuluPlayTCRYPT( void ) ;
687 
688 /*
689  * this function is defined in bitlocker.c
690  */
692 
693 /*
694  * this function is defined in bitlocker.c
695  */
697 
698 /*
699  * this function is defined in open_tcrypt.c
700  */
701 void * zuluCryptCryptsetupTCryptVCrypt( const open_struct_t * opt ) ;
702 
703 /*
704  * this function is defined in bitlocker.c
705  */
706 const char * zuluCryptCryptsetupBitLockerType( void ) ;
707 
708 /*
709  * this function is defined in open_tcrypt.c
710  */
711 const char * zuluCryptCryptsetupTCRYPTType( void ) ;
712 
713 /*
714  * this function is defined in bitlocker.c
715  */
716 int zuluCryptIsDislockerMapperPath( const char * ) ;
717 
718 /*
719  * this function is defined in bitlocker.c
720  */
721 int zuluCryptDeviceManagedByDislocker( const char * device,uid_t ) ;
722 
723 #endif
open_struct_t::fs_opts
const char * fs_opts
Definition: includes.h:75
zuluCryptResolveDevicePath_1
char * zuluCryptResolveDevicePath_1(char *(*)(const char *, const resolve_path_t *), const resolve_path_t *)
zuluCryptLoopDeviceAddress
char * zuluCryptLoopDeviceAddress(const char *device)
Definition: create_loop_device.c:134
buffer_size
#define buffer_size
zuluCryptResolveDevicePath
int zuluCryptResolveDevicePath(int(*)(const char *, const resolve_path_t *), const resolve_path_t *)
Definition: resolve_paths.c:389
create_tcrypt_t::passphrase_h_size
size_t passphrase_h_size
Definition: includes.h:104
open_struct_t::mapper_name
const char * mapper_name
Definition: includes.h:71
zuluCryptBitLockerMapperName
string_t zuluCryptBitLockerMapperName(const char *)
Definition: bitlocker.c:81
zuluCryptOpenLuks_2
int zuluCryptOpenLuks_2(const open_struct_t *)
Definition: open_luks.c:125
create_tcrypt_t::passphrase
const char * passphrase
Definition: includes.h:99
zulucryptFileSystemIsSupported
int zulucryptFileSystemIsSupported(const char *fs)
Definition: mount_fs_options.c:64
zuluCryptCreateTCryptVolume
int zuluCryptCreateTCryptVolume(const create_tcrypt_t *)
Definition: create_tcrypt.c:425
zuluCryptAttachLoopDeviceToFileUsingFileDescriptor
int zuluCryptAttachLoopDeviceToFileUsingFileDescriptor(int fd_path, int *fd_loop, int mode, string_t *loop_device)
Definition: create_loop_device.c:460
m_struct::m_flags
unsigned long m_flags
Definition: includes.h:47
zuluCryptOpenVolume_1
int zuluCryptOpenVolume_1(const open_struct_t *)
Definition: open_volume.c:161
zuluCryptUUIDFromPath_1
char * zuluCryptUUIDFromPath_1(const char *device)
Definition: blkid_evaluate_tag.c:62
zuluCryptLoopDeviceAddress_1
char * zuluCryptLoopDeviceAddress_1(const char *device)
Definition: create_loop_device.c:140
open_struct_t
Definition: includes.h:68
info_t::header_new_key_source
const char * header_new_key_source
Definition: includes.h:61
zuluCryptUseCryptsetupBitLocker
int zuluCryptUseCryptsetupBitLocker(int)
Definition: bitlocker.c:55
zuluCryptBitLockerMapperPath
string_t zuluCryptBitLockerMapperPath(uid_t uid)
Definition: bitlocker.c:74
info_t::header_new_key
const char * header_new_key
Definition: includes.h:60
create_tcrypt_t::hidden_volume_size
u_int64_t hidden_volume_size
Definition: includes.h:108
info_t::device
const char * device
Definition: includes.h:52
zuluCryptBitLockerType
const char * zuluCryptBitLockerType(void)
Definition: bitlocker.c:36
zuluCryptMapperPrefix
const char * zuluCryptMapperPrefix(void)
Definition: create_mapper_name.c:95
zuluCryptUseDislockerBitLocker
int zuluCryptUseDislockerBitLocker(int)
Definition: bitlocker.c:64
zuluCryptFormatSize
void zuluCryptFormatSize(u_int64_t number, char *buffer, size_t buffer_size)
Definition: status.c:113
open_struct_t::uid
uid_t uid
Definition: includes.h:80
m_struct::uid
uid_t uid
Definition: includes.h:46
zuluCryptBitLockerVolume
int zuluCryptBitLockerVolume(const char *e)
Definition: bitlocker.c:150
create_tcrypt_t::keyfiles_h_number
size_t keyfiles_h_number
Definition: includes.h:106
open_struct_t::key_source
int key_source
Definition: includes.h:82
zuluCryptDeviceFromLabel
char * zuluCryptDeviceFromLabel(const char *label)
Definition: blkid_evaluate_tag.c:47
create_tcrypt_t::keyfiles
const char *const * keyfiles
Definition: includes.h:101
getKey
static int getKey(const char *path, const char *uuid, gchar **key)
Definition: keyring.c:31
m_struct::fs
const char * fs
Definition: includes.h:44
zuluCryptResolvePath_3
char * zuluCryptResolvePath_3(const char *path)
Definition: resolve_paths.c:288
zuluCryptGetVolumeTypeFromMapperPath
char * zuluCryptGetVolumeTypeFromMapperPath(const char *mapper)
Definition: status.c:449
zuluCryptGetDeviceFileProperties
int zuluCryptGetDeviceFileProperties(const char *file, int *fd_path, int *fd_loop, char **dev, uid_t uid)
Definition: file_path_security.c:116
open_struct_t::plain_dm_properties
const char * plain_dm_properties
Definition: includes.h:70
info_t::key
const char * key
Definition: includes.h:56
zuluCryptConvertIfPathIsLVM
string_t zuluCryptConvertIfPathIsLVM(const char *path)
Definition: resolve_paths.c:136
zuluCryptResolvePath
char * zuluCryptResolvePath(const char *path)
Definition: resolve_paths.c:215
create_tcrypt_t::passphrase_h
const char * passphrase_h
Definition: includes.h:103
zuluCryptOpenVolume_2
int zuluCryptOpenVolume_2(const open_struct_t *)
Definition: open_volume.c:169
zuluCryptResolvePath_2
string_t zuluCryptResolvePath_2(const char *path)
Definition: resolve_paths.c:278
zuluCryptGetMountOptionsFromFstab
string_t zuluCryptGetMountOptionsFromFstab(const char *device, int pos, uid_t uid)
Definition: parse_fstab.c:141
zuluCryptBitLockerFolderPrefix
const char * zuluCryptBitLockerFolderPrefix(void)
Definition: bitlocker.c:41
open_struct_t::tcrypt_keyfiles_count
int tcrypt_keyfiles_count
Definition: includes.h:84
zuluCryptPathDeviceIsBlockDevice
int zuluCryptPathDeviceIsBlockDevice(const char *device)
Definition: real_path.c:88
open_struct_t::m_point
const char * m_point
Definition: includes.h:74
zuluCryptBitLockerResolveMapperPath
string_t zuluCryptBitLockerResolveMapperPath(const char *e, uid_t)
Definition: bitlocker.c:203
open_struct_t::bitlocker_volume
int bitlocker_volume
Definition: includes.h:87
zuluCryptDeviceManagedByDislocker
int zuluCryptDeviceManagedByDislocker(const char *device, uid_t)
Definition: bitlocker.c:141
open_struct_t::use_cryptsetup_for_bitlocker
int use_cryptsetup_for_bitlocker
Definition: includes.h:89
zuluCryptGetFstabList
stringList_t zuluCryptGetFstabList(uid_t)
Definition: parse_fstab.c:39
zuluCryptMultiPartitionLoopDevice
int zuluCryptMultiPartitionLoopDevice(const char *e)
Definition: blkid_evaluate_tag.c:171
zuluCryptDeviceHasEncryptedFileSystem
int zuluCryptDeviceHasEncryptedFileSystem(const char *device)
Definition: blkid_evaluate_tag.c:184
zuluCryptDisableMetadataLocking
void zuluCryptDisableMetadataLocking(void)
Definition: create_luks.c:423
info_t::uid
uid_t uid
Definition: includes.h:62
zuluCryptSecureOpenFile
int zuluCryptSecureOpenFile(const char *path, int *fd_path, string_t *file, uid_t uid)
Definition: file_path_security.c:33
resolve_path_t::args
const void * args
Definition: includes.h:119
zuluCryptBitLockerFullMapperPath
string_t zuluCryptBitLockerFullMapperPath(uid_t uid, const char *e)
Definition: bitlocker.c:127
zuluCryptUserIsAMemberOfAGroup
int zuluCryptUserIsAMemberOfAGroup(uid_t uid, const char *groupname)
Definition: mount_fs_options.c:172
zuluCryptGetUserName
string_t zuluCryptGetUserName(uid_t uid)
Definition: user_home_path.c:28
zuluCryptDeviceFromPARTUUID
char * zuluCryptDeviceFromPARTUUID(const char *p_uuid)
Definition: blkid_evaluate_tag.c:52
open_struct_t::use_hidden_header
int use_hidden_header
Definition: includes.h:93
m_struct::m_point
const char * m_point
Definition: includes.h:43
zuluCryptCryptsetupTCRYPTType
const char * zuluCryptCryptsetupTCRYPTType(void)
Definition: open_tcrypt.c:70
m_struct::fs_flags
const char * fs_flags
Definition: includes.h:48
zuluCryptOpenLuks_1
int zuluCryptOpenLuks_1(const open_struct_t *)
Definition: open_luks.c:120
zuluCryptGetLoopDeviceAddress
char * zuluCryptGetLoopDeviceAddress(const char *device)
Definition: create_loop_device.c:203
info_t::header_key_source
const char * header_key_source
Definition: includes.h:59
zuluCryptPathDidNotChange
int zuluCryptPathDidNotChange(const char *path)
Definition: real_path.c:77
zuluCryptNoPartitionLoopDevice
int zuluCryptNoPartitionLoopDevice(const char *e)
Definition: blkid_evaluate_tag.c:147
m_struct::opts
const char * opts
Definition: includes.h:45
open_struct_t::use_backup_header
int use_backup_header
Definition: includes.h:92
zuluCryptResolveDevRoot
char * zuluCryptResolveDevRoot(void)
zuluCryptCreateFileSystemInAVolume
int zuluCryptCreateFileSystemInAVolume(const char *fs, const char *device_mapper)
Definition: create_volume.c:43
zuluCryptPathIsNotValid
int zuluCryptPathIsNotValid(const char *path)
Definition: is_path_valid.c:29
zuluCryptDeviceHasAgivenFileSystem
int zuluCryptDeviceHasAgivenFileSystem(const char *device, const char *fs)
Definition: blkid_evaluate_tag.c:176
zuluCryptAttachLoopDeviceToFile
int zuluCryptAttachLoopDeviceToFile(const char *path, int mode, int *fd, string_t *loop_device)
Definition: create_loop_device.c:425
zuluCryptResolveMDPath
char * zuluCryptResolveMDPath(const char *path)
Definition: resolve_paths.c:123
zuluCryptOpenedVolumesList
stringList_t zuluCryptOpenedVolumesList(uid_t)
Definition: mountinfo.c:210
info_t::header_source
const char * header_source
Definition: includes.h:53
create_tcrypt_t::fs
const char * fs
Definition: includes.h:109
zuluCryptDeleteFile_1
void zuluCryptDeleteFile_1(string_t file)
Definition: file_path_security.c:83
info_t::iteration_count
int iteration_count
Definition: includes.h:64
m_struct
Definition: includes.h:41
open_struct_t::system_volume
int system_volume
Definition: includes.h:88
create_tcrypt_t::veraCrypt_volume
int veraCrypt_volume
Definition: includes.h:111
zuluCryptVolumeType
const char * zuluCryptVolumeType(blkid_probe blkid, const char *device)
Definition: blkid_evaluate_tag.c:210
zuluCryptGetALoopDeviceAssociatedWithAnImageFile
char * zuluCryptGetALoopDeviceAssociatedWithAnImageFile(const char *path)
Definition: create_loop_device.c:174
resolve_path_t::error_value_1
char * error_value_1
Definition: includes.h:117
zuluCryptBitLockerlock_1
int zuluCryptBitLockerlock_1(const char *)
zuluCryptMountHasNotAllowedFileSystemOptions
int zuluCryptMountHasNotAllowedFileSystemOptions(uid_t uid, const char *fs_opts, string_t s)
Definition: mount_fs_options.c:240
zuluCryptConvertCipher
const char * zuluCryptConvertCipher(const char *)
open_struct_t::device
const char * device
Definition: includes.h:69
zuluCryptCreateKeyFile
string_t zuluCryptCreateKeyFile(const char *key, size_t key_len, const char *fileName)
Definition: open_tcrypt.c:125
StringType
Definition: String.c:49
zuluCryptResolveDevicePath_0
int zuluCryptResolveDevicePath_0(int(*)(const char *, const resolve_path_t *), const open_struct_t *, int)
Definition: resolve_paths.c:395
open_struct_t::trueCrypt_volume
int trueCrypt_volume
Definition: includes.h:86
zuluCryptCreateKeyFile_1
string_t zuluCryptCreateKeyFile_1(string_t key, const char *fileName)
Definition: open_tcrypt.c:167
resolve_path_t::error_value
int error_value
Definition: includes.h:116
zuluCryptGetMountInfoList_1
stringList_t zuluCryptGetMountInfoList_1(void)
zuluCryptGetMoutedList
stringList_t zuluCryptGetMoutedList(void)
Definition: mountinfo.c:159
zuluCryptGetVolumeType
int zuluCryptGetVolumeType(const char *device, const char *pass, size_t pass_size)
Definition: volume_type.c:39
zuluCryptDeleteFile
void zuluCryptDeleteFile(const char *file)
Definition: file_path_security.c:57
open_struct_t::volume_type
int volume_type
Definition: includes.h:81
open_struct_t::iteration_count
int iteration_count
Definition: includes.h:83
create_tcrypt_t
Definition: includes.h:97
info_t::veraCrypt_volume
int veraCrypt_volume
Definition: includes.h:63
zuluCryptVolumeIsNotLuks
int zuluCryptVolumeIsNotLuks(const char *dev)
Definition: is_luks.c:63
zuluCryptOpenVolume_0
int zuluCryptOpenVolume_0(int(*function)(const open_struct_t *), const open_struct_t *)
Definition: open_volume.c:48
info_t::tmp_path
const char * tmp_path
Definition: includes.h:54
info_t::opt
const char * opt
Definition: includes.h:55
zuluCryptMountPointIsActive
int zuluCryptMountPointIsActive(const char *)
Definition: mountinfo.c:200
zuluCryptSystemVeraCryptPIM
int zuluCryptSystemVeraCryptPIM(int e)
Definition: create_tcrypt.c:293
zuluCryptBitLockerlock
int zuluCryptBitLockerlock(string_t mapperPath, char **mount_point)
Definition: bitlocker.c:226
zuluCryptCryptsetupBitLockerType
const char * zuluCryptCryptsetupBitLockerType(void)
Definition: bitlocker.c:46
create_tcrypt_t::device
const char * device
Definition: includes.h:98
zuluCryptWhirlpoolIsSupported
static int zuluCryptWhirlpoolIsSupported(void)
Definition: includes.h:128
create_tcrypt_t::fs_h
const char * fs_h
Definition: includes.h:110
zuluCryptBitLockerUnmountPath
char * zuluCryptBitLockerUnmountPath(const char *e)
Definition: bitlocker.c:177
zuluCryptEncodeMountEntry
const char * zuluCryptEncodeMountEntry(string_t)
Definition: mount_volume.c:425
resolve_path_t::device
const char * device
Definition: includes.h:115
open_struct_t::key
const char * key
Definition: includes.h:73
zuluCryptGetFileSystemFromDevice
string_t zuluCryptGetFileSystemFromDevice(const char *device)
Definition: blkid_evaluate_tag.c:137
zuluCryptVeraCryptPIM
int zuluCryptVeraCryptPIM(int e)
Definition: create_tcrypt.c:284
zuluCryptDecodeMountEntry
const char * zuluCryptDecodeMountEntry(string_t)
Definition: mount_volume.c:417
StringListType
Definition: StringList.c:33
zuluCryptCreateMapperName
string_t zuluCryptCreateMapperName(const char *device, const char *mapping_name, uid_t uid, int i)
Definition: create_mapper_name.c:42
info_t::rng
const char * rng
Definition: includes.h:57
zuluCryptGetMountEntry_1
string_t zuluCryptGetMountEntry_1(stringList_t stl, const char *path)
Definition: mountinfo.c:358
zuluCryptResolvePath_1
string_t zuluCryptResolvePath_1(const char *path)
Definition: resolve_paths.c:272
zuluCryptGetVolumeType_1
char * zuluCryptGetVolumeType_1(const char *m)
Definition: status.c:470
zuluCryptPathIsNotValid_0
int zuluCryptPathIsNotValid_0(string_t path)
Definition: is_path_valid.c:35
zuluCryptBitLockerVolumeFS
string_t zuluCryptBitLockerVolumeFS(const char *e)
Definition: bitlocker.c:97
info_t::header_key
const char * header_key
Definition: includes.h:58
zuluCryptResolvePath_4
char * zuluCryptResolvePath_4(const char *path)
Definition: resolve_paths.c:301
open_struct_t::tcrypt_keyfiles
const char *const * tcrypt_keyfiles
Definition: includes.h:90
e
static QString e
Definition: about.cpp:31
zuluCryptGetFstabEntryList
stringList_t zuluCryptGetFstabEntryList(const char *device, uid_t uid)
Definition: parse_fstab.c:154
zuluCryptUseZuluPlayTCRYPT
int zuluCryptUseZuluPlayTCRYPT(void)
Definition: open_tcrypt.c:52
open_struct_t::veraCrypt_volume
int veraCrypt_volume
Definition: includes.h:85
zuluCryptPartitionIsMounted
int zuluCryptPartitionIsMounted(const char *device)
Definition: mountinfo.c:205
m_struct::device
const char * device
Definition: includes.h:42
zuluCryptCryptsetupTCryptVCrypt
void * zuluCryptCryptsetupTCryptVCrypt(const open_struct_t *opt)
Definition: open_tcrypt.c:79
zuluCryptVolumeManagedByTcplay
int zuluCryptVolumeManagedByTcplay(const char *mapper)
Definition: status.c:406
zuluCryptOpenPlain_1
int zuluCryptOpenPlain_1(const open_struct_t *)
Definition: open_plain.c:233
libzuluCrypt.h
zulucryptGetBlkidFileSystem
string_t zulucryptGetBlkidFileSystem(const char *device)
Definition: blkid_evaluate_tag.c:104
create_tcrypt_t::passphrase_size
size_t passphrase_size
Definition: includes.h:100
zuluCryptBitLockerUnlock
int zuluCryptBitLockerUnlock(const open_struct_t *opts, string_t *st)
Definition: bitlocker.c:397
info_t
Definition: includes.h:51
resolve_path_t::open_mode
int open_mode
Definition: includes.h:118
zuluCryptOpenTcrypt_1
int zuluCryptOpenTcrypt_1(const open_struct_t *)
Definition: open_tcrypt.c:440
zuluCryptDeviceFromUUID
char * zuluCryptDeviceFromUUID(const char *uuid)
Definition: blkid_evaluate_tag.c:42
zuluCryptIsDislockerMapperPath
int zuluCryptIsDislockerMapperPath(const char *)
Definition: bitlocker.c:69
create_tcrypt_t::keyfiles_number
size_t keyfiles_number
Definition: includes.h:102
zuluCryptFileSystemProperties
void zuluCryptFileSystemProperties(string_t p, const char *mapper, const char *m_point)
Definition: status.c:253
zuluCryptRealPath
char * zuluCryptRealPath(const char *path)
Definition: real_path.c:28
zuluCryptResolveMDPath_1
string_t zuluCryptResolveMDPath_1(const char *path)
Definition: resolve_paths.c:84
open_struct_t::luks_detached_header
const char * luks_detached_header
Definition: includes.h:77
zuluCryptGetFileNameFromFileDescriptor
char * zuluCryptGetFileNameFromFileDescriptor(int fd)
Definition: create_loop_device.c:259
zuluCryptLoopDeviceAddress_2
string_t zuluCryptLoopDeviceAddress_2(const char *device)
Definition: create_loop_device.c:101
create_tcrypt_t::encryption_options
const char * encryption_options
Definition: includes.h:107
zuluCryptVolumeIsTcrypt
int zuluCryptVolumeIsTcrypt(const char *device, const char *key, int key_source)
Definition: open_tcrypt.c:452
zuluCryptDeviceFromPARTLABEL
char * zuluCryptDeviceFromPARTLABEL(const char *p_label)
Definition: blkid_evaluate_tag.c:57
zuluCryptGetAListOfMountedVolumes
stringList_t zuluCryptGetAListOfMountedVolumes(void)
Definition: mountinfo.c:182
zuluCryptGetMoutedList_1
stringList_t zuluCryptGetMoutedList_1(void)
Definition: mountinfo.c:172
open_struct_t::mapper_path
const char * mapper_path
Definition: includes.h:72
open_struct_t::key_len
size_t key_len
Definition: includes.h:79
zuluCryptGetMountInfoList
stringList_t zuluCryptGetMountInfoList(void)
utility::mapperPath
QString mapperPath(const QString &, const QString &component=QString())
Definition: utility.cpp:1289
open_struct_t::m_flags
unsigned long m_flags
Definition: includes.h:91
zuluCryptGetMountEntry
string_t zuluCryptGetMountEntry(const char *path)
Definition: mountinfo.c:347
zuluCryptGetMountPointFromPath_1
char * zuluCryptGetMountPointFromPath_1(const char *path)
open_struct_t::variables
void * variables
Definition: includes.h:94
zuluCryptFileSystemIsFUSEbased
int zuluCryptFileSystemIsFUSEbased(const char *device)
Definition: blkid_evaluate_tag.c:80
zuluCryptBitLockerCreateMapperPath
const char * zuluCryptBitLockerCreateMapperPath(string_t e, uid_t uid)
Definition: bitlocker.c:217
zuluCryptPrintLogOutPut
void zuluCryptPrintLogOutPut(void *)
Definition: create_luks.c:68
resolve_path_t
Definition: includes.h:114
zuluCryptBitLockerVolume_1
int zuluCryptBitLockerVolume_1(const char *e)
Definition: bitlocker.c:195
zuluCryptModifyTcryptHeader
int zuluCryptModifyTcryptHeader(const info_t *info)
Definition: create_tcrypt.c:229
zuluCryptUseZuluPlayVCRYPT
int zuluCryptUseZuluPlayVCRYPT(void)
Definition: open_tcrypt.c:61
open_struct_t::m_opts
const char * m_opts
Definition: includes.h:76
create_tcrypt_t::keyfiles_h
const char *const * keyfiles_h
Definition: includes.h:105
zuluCryptGetMountPointFromPath
char * zuluCryptGetMountPointFromPath(const char *path)
Definition: mountinfo.c:380
zuluCryptPathIsValid
int zuluCryptPathIsValid(const char *path)
Definition: is_path_valid.c:23
string_t
struct StringType * string_t
Definition: String.h:41