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)  

check_invalid_key.c
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2012-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 <stdio.h>
22 
23 void zuluCryptCheckInvalidKey( const char * device )
24 {
25  char * d ;
26  const char * c ;
27  int e = 0 ;
28 
30  /*
31  * zuluCryptEmptySlots() is defined in ../lib/empty_slots.c
32  */
33  d = zuluCryptEmptySlots( device ) ;
35 
36  if( d == NULL ){
37  /*
38  * we got here because the volume is either not luks based or the path is invalid
39  */
40  ;
41  }else{
42  c = d - 1 ;
43 
44  while( *++c ){
45 
46  if( *c == '2' ){
47 
48  fprintf( stderr,"WARNING: key slot number: %d is corrupted\n",e ) ;
49  }
50 
51  e++ ;
52  }
53 
54  StringFree( d ) ;
55  }
56 }
zuluCryptCheckInvalidKey
void zuluCryptCheckInvalidKey(const char *device)
Definition: check_invalid_key.c:23
zuluCryptSecurityDropElevatedPrivileges
int zuluCryptSecurityDropElevatedPrivileges(void)
Definition: security.c:109
zuluCryptSecurityGainElevatedPrivileges
int zuluCryptSecurityGainElevatedPrivileges(void)
Definition: security.c:64
e
static QString e
Definition: about.cpp:31
zuluCryptEmptySlots
char * zuluCryptEmptySlots(const char *device)
Definition: empty_slots.c:86
includes.h
StringFree
static __inline__ void StringFree(const void *str)
Definition: String.h:823