Lines Matching defs:defaults
37 static int get_default(ldaptoolSASLdefaults *defaults, sasl_interact_t *interact);
44 ldaptoolSASLdefaults *defaults;
46 if ((defaults = calloc(sizeof(defaults[0]), 1)) == NULL)
50 defaults->mech = mech;
52 ldap_get_option(ld, LDAP_OPT_X_SASL_MECH, &defaults->mech);
55 defaults->authid = authid;
57 ldap_get_option(ld, LDAP_OPT_X_SASL_AUTHCID, &defaults->authid);
60 defaults->username = username;
62 ldap_get_option(ld, LDAP_OPT_X_SASL_AUTHZID, &defaults->username);
64 defaults->passwd = passwd;
67 defaults->realm = realm;
69 ldap_get_option(ld, LDAP_OPT_X_SASL_REALM, &defaults->realm);
71 return defaults;
75 ldaptool_sasl_interact( LDAP *ld, unsigned flags, void *defaults, void *prompts ) {
77 ldaptoolSASLdefaults *sasldefaults = defaults;
99 get_default(ldaptoolSASLdefaults *defaults, sasl_interact_t *interact) {
102 if (defaults != NULL) {
105 defvalue = defaults->authid;
108 defvalue = defaults->username;
111 defvalue = defaults->passwd;
114 defvalue = defaults->realm;
127 if (interact->id == SASL_CB_PASS && defaults != NULL) {
128 /* At this point defaults->passwd is not NULL */
129 memset( defaults->passwd, '\0', strlen(defaults->passwd));