Changeset View
Changeset View
Standalone View
Standalone View
agent/call-pinentry.c
Context not available. | |||||
#include <assuan.h> | #include <assuan.h> | ||||
#include "../common/sysutils.h" | #include "../common/sysutils.h" | ||||
#include "../common/i18n.h" | #include "../common/i18n.h" | ||||
#include "../common/exectool.h" | |||||
#ifdef _POSIX_OPEN_MAX | #ifdef _POSIX_OPEN_MAX | ||||
#define MAX_OPEN_FDS _POSIX_OPEN_MAX | #define MAX_OPEN_FDS _POSIX_OPEN_MAX | ||||
Context not available. | |||||
int length; | int length; | ||||
const char *s; | const char *s; | ||||
if (opt.passphrase_quality_checker) | |||||
{ | |||||
char *output; | |||||
long percent; | |||||
if (gnupg_exec_tool (opt.passphrase_quality_checker, NULL, | |||||
pw, &output, NULL)) | |||||
return 0; | |||||
percent = strtol (output, NULL, 10); | |||||
if (percent < 0) | |||||
percent = 0; | |||||
if (percent > 100) | |||||
percent = 100; | |||||
xfree (output); | |||||
return percent; | |||||
} | |||||
if (goodlength < 1) | if (goodlength < 1) | ||||
return 0; | return 0; | ||||
Context not available. |