"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cryptsetup.h" 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.

cryptsetup.h  (cryptsetup-2.3.6.tar.xz):cryptsetup.h  (cryptsetup-2.4.0.tar.xz)
skipping to change at line 44 skipping to change at line 44
#include <unistd.h> #include <unistd.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h> #include <limits.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h> #include <fcntl.h>
#include <popt.h> #include <popt.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "lib/nls.h" #include "lib/nls.h"
#include "lib/bitops.h"
#include "lib/utils_crypt.h" #include "lib/utils_crypt.h"
#include "lib/utils_loop.h" #include "lib/utils_loop.h"
#include "lib/utils_fips.h" #include "lib/utils_fips.h"
#include "lib/utils_io.h" #include "lib/utils_io.h"
#include "lib/utils_blkid.h" #include "lib/utils_blkid.h"
#include "lib/libcryptsetup_macros.h"
#include "libcryptsetup.h" #include "libcryptsetup.h"
#define CONST_CAST(x) (x)(uintptr_t)
#define DEFAULT_CIPHER(type) (DEFAULT_##type##_CIPHER "-" DEFAULT_##type##_MOD E) #define DEFAULT_CIPHER(type) (DEFAULT_##type##_CIPHER "-" DEFAULT_##type##_MOD E)
#define SECTOR_SIZE 512
#define MAX_SECTOR_SIZE 4096
#define ROUND_SECTOR(x) (((x) + SECTOR_SIZE - 1) / SECTOR_SIZE)
#define DEFAULT_WIPE_BLOCK 1048576 /* 1 MiB */ #define DEFAULT_WIPE_BLOCK 1048576 /* 1 MiB */
#define MAX_ACTIONS 16
extern int opt_debug;
extern int opt_debug_json;
extern int opt_verbose;
extern int opt_batch_mode;
extern int opt_force_password;
extern int opt_progress_frequency;
/* Common tools */ /* Common tools */
void clogger(struct crypt_device *cd, int level, const char *file, int line,
const char *format, ...) __attribute__ ((format (printf, 5, 6)));
void tool_log(int level, const char *msg, void *usrptr __attribute__((unused))); void tool_log(int level, const char *msg, void *usrptr __attribute__((unused)));
void quiet_log(int level, const char *msg, void *usrptr); void quiet_log(int level, const char *msg, void *usrptr);
int yesDialog(const char *msg, void *usrptr); int yesDialog(const char *msg, void *usrptr);
int noDialog(const char *msg, void *usrptr); int noDialog(const char *msg, void *usrptr);
void show_status(int errcode); void show_status(int errcode);
const char *uuid_or_device(const char *spec); const char *uuid_or_device(const char *spec);
__attribute__ ((noreturn)) \ __attribute__ ((noreturn)) \
void usage(poptContext popt_context, int exitcode, const char *error, const char *more); void usage(poptContext popt_context, int exitcode, const char *error, const char *more);
void dbg_version_and_cmd(int argc, const char **argv); void dbg_version_and_cmd(int argc, const char **argv);
int translate_errno(int r); int translate_errno(int r);
typedef enum { CREATED, UNLOCKED, REMOVED } crypt_object_op; typedef enum { CREATED, UNLOCKED, REMOVED } crypt_object_op;
void tools_keyslot_msg(int keyslot, crypt_object_op op); void tools_keyslot_msg(int keyslot, crypt_object_op op);
void tools_token_msg(int token, crypt_object_op op); void tools_token_msg(int token, crypt_object_op op);
void tools_token_error_msg(int error, const char *type, int token, bool pin_prov ided);
extern volatile int quit; extern volatile int quit;
void set_int_block(int block); void set_int_block(int block);
void set_int_handler(int block); void set_int_handler(int block);
void check_signal(int *r); void check_signal(int *r);
int tools_signals_blocked(void); int tools_signals_blocked(void);
int tools_get_key(const char *prompt, int tools_get_key(const char *prompt,
char **key, size_t *key_size, char **key, size_t *key_size,
uint64_t keyfile_offset, size_t keyfile_size_max, uint64_t keyfile_offset, size_t keyfile_size_max,
const char *key_file, const char *key_file,
int timeout, int verify, int pwquality, int timeout, int verify, int pwquality,
struct crypt_device *cd); struct crypt_device *cd);
void tools_passphrase_msg(int r); void tools_passphrase_msg(int r);
int tools_is_stdin(const char *key_file); int tools_is_stdin(const char *key_file);
int tools_string_to_size(struct crypt_device *cd, const char *s, uint64_t *size) ; int tools_string_to_size(const char *s, uint64_t *size);
void tools_clear_line(void); struct tools_progress_params {
uint32_t frequency;
struct timeval start_time;
struct timeval end_time;
uint64_t start_offset;
bool batch_mode;
};
int tools_wipe_progress(uint64_t size, uint64_t offset, void *usrptr); int tools_wipe_progress(uint64_t size, uint64_t offset, void *usrptr);
int tools_reencrypt_progress(uint64_t size, uint64_t offset, void *usrptr); int tools_reencrypt_progress(uint64_t size, uint64_t offset, void *usrptr);
int tools_read_mk(const char *file, char **key, int keysize); int tools_read_mk(const char *file, char **key, int keysize);
int tools_write_mk(const char *file, const char *key, int keysize); int tools_write_mk(const char *file, const char *key, int keysize);
int tools_read_json_file(struct crypt_device *cd, const char *file, char **json, int tools_read_json_file(const char *file, char **json, size_t *json_size, bool
size_t *json_size); batch_mode);
int tools_write_json_file(struct crypt_device *cd, const char *file, const char int tools_write_json_file(const char *file, const char *json);
*json);
int tools_detect_signatures(const char *device, int ignore_luks, size_t *count); int tools_detect_signatures(const char *device, int ignore_luks, size_t *count, bool batch_mode);
int tools_wipe_all_signatures(const char *path); int tools_wipe_all_signatures(const char *path);
int tools_lookup_crypt_device(struct crypt_device *cd, const char *type, int tools_lookup_crypt_device(struct crypt_device *cd, const char *type,
const char *data_device_path, char *name, size_t name_length); const char *data_device_path, char *name, size_t name_length);
/* each utility is required to implement it */ /* each utility is required to implement it */
void tools_cleanup(void); void tools_cleanup(void);
#define FREE_AND_NULL(x) do { free(x); x = NULL; } while (0)
/* Log */ /* Log */
#define log_dbg(x...) clogger(NULL, CRYPT_LOG_DEBUG, __FILE__, __LINE__, x) #define log_dbg(x...) crypt_logf(NULL, CRYPT_LOG_DEBUG, x)
#define log_std(x...) clogger(NULL, CRYPT_LOG_NORMAL, __FILE__, __LINE__, x) #define log_std(x...) crypt_logf(NULL, CRYPT_LOG_NORMAL, x)
#define log_verbose(x...) clogger(NULL, CRYPT_LOG_VERBOSE, __FILE__, __LINE__, x #define log_verbose(x...) crypt_logf(NULL, CRYPT_LOG_VERBOSE, x)
) #define log_err(x...) crypt_logf(NULL, CRYPT_LOG_ERROR, x)
#define log_err(x...) clogger(NULL, CRYPT_LOG_ERROR, __FILE__, __LINE__, x)
typedef enum {
CRYPT_ARG_BOOL = 0,
CRYPT_ARG_STRING,
CRYPT_ARG_INT32,
CRYPT_ARG_UINT32,
CRYPT_ARG_INT64,
CRYPT_ARG_UINT64
} crypt_arg_type_info;
struct tools_arg {
const char *name;
bool set;
crypt_arg_type_info type;
union {
char *str_value;
uint64_t u64_value;
uint32_t u32_value;
int32_t i32_value;
int64_t i64_value;
} u;
const char *actions_array[MAX_ACTIONS];
};
void tools_parse_arg_value(poptContext popt_context, crypt_arg_type_info type, s
truct tools_arg *arg, const char *popt_arg, int popt_val, bool(*needs_size_conv_
fn)(unsigned arg_id));
void tools_args_free(struct tools_arg *args, size_t args_count);
void tools_check_args(const char *action, const struct tools_arg *args, size_t a
rgs_size, poptContext popt_context);
struct tools_log_params {
bool verbose;
bool debug;
};
#endif /* CRYPTSETUP_H */ #endif /* CRYPTSETUP_H */
 End of changes. 13 change blocks. 
27 lines changed or deleted 57 lines changed or added

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