mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-01-19 16:52:17 +01:00
parse_cfg: Use memset to clear cfg struct.
The code will be easier to maintain if one does not have to remember explicitly initializing all new members of the config struct.
This commit is contained in:
parent
804b537acf
commit
eb438e782c
16
pam_yubico.c
16
pam_yubico.c
@ -543,24 +543,10 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
|
||||
{
|
||||
int i;
|
||||
|
||||
memset (cfg, 0, sizeof(struct cfg));
|
||||
cfg->client_id = -1;
|
||||
cfg->client_key = NULL;
|
||||
cfg->debug = 0;
|
||||
cfg->alwaysok = 0;
|
||||
cfg->verbose_otp = 0;
|
||||
cfg->try_first_pass = 0;
|
||||
cfg->use_first_pass = 0;
|
||||
cfg->auth_file = NULL;
|
||||
cfg->capath = NULL;
|
||||
cfg->url = NULL;
|
||||
cfg->ldapserver = NULL;
|
||||
cfg->ldap_uri = NULL;
|
||||
cfg->ldapdn = NULL;
|
||||
cfg->user_attr = NULL;
|
||||
cfg->yubi_attr = NULL;
|
||||
cfg->token_id_length = DEFAULT_TOKEN_ID_LEN;
|
||||
cfg->mode = CLIENT;
|
||||
cfg->chalresp_path = NULL;
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user