"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/verity/verity.c" between
cryptsetup-2.3.6.tar.xz and cryptsetup-2.4.0.tar.xz

About: cryptsetup is a utility used to conveniently setup disk encryption based on the dm-crypt kernel module. These include plain dm-crypt volumes, LUKS volumes, loop-AES and TrueCrypt compatible format.

verity.c  (cryptsetup-2.3.6.tar.xz):verity.c  (cryptsetup-2.4.0.tar.xz)
skipping to change at line 29 skipping to change at line 29
*/ */
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <ctype.h> #include <ctype.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <netinet/in.h>
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include "libcryptsetup.h" #include "libcryptsetup.h"
#include "verity.h" #include "verity.h"
#include "internal.h" #include "internal.h"
#define VERITY_SIGNATURE "verity\0\0" #define VERITY_SIGNATURE "verity\0\0"
/* https://gitlab.com/cryptsetup/cryptsetup/wikis/DMVerity#verity-superblock-for mat */ /* https://gitlab.com/cryptsetup/cryptsetup/wikis/DMVerity#verity-superblock-for mat */
struct verity_sb { struct verity_sb {
skipping to change at line 240 skipping to change at line 239
if (params->flags & CRYPT_VERITY_NO_HEADER) if (params->flags & CRYPT_VERITY_NO_HEADER)
return hash_offset / params->hash_block_size; return hash_offset / params->hash_block_size;
hash_offset += sizeof(struct verity_sb); hash_offset += sizeof(struct verity_sb);
hash_offset += params->hash_block_size - 1; hash_offset += params->hash_block_size - 1;
return hash_offset / params->hash_block_size; return hash_offset / params->hash_block_size;
} }
int VERITY_UUID_generate(struct crypt_device *cd, char **uuid_string) int VERITY_UUID_generate(struct crypt_device *cd __attribute__((unused)), char * *uuid_string)
{ {
uuid_t uuid; uuid_t uuid;
*uuid_string = malloc(40); *uuid_string = malloc(40);
if (!*uuid_string) if (!*uuid_string)
return -ENOMEM; return -ENOMEM;
uuid_generate(uuid); uuid_generate(uuid);
uuid_unparse(uuid, *uuid_string); uuid_unparse(uuid, *uuid_string);
return 0; return 0;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)