Lines Matching refs:ap

203 	ns_cred_t *ap;
211 ap = (ns_cred_t *)calloc(1, sizeof (ns_cred_t));
212 if (ap == NULL)
216 ap->hostcertpath = strdup(authp->hostcertpath);
217 if (ap->hostcertpath == NULL) {
218 free(ap);
223 ap->cred.unix_cred.userID =
225 if (ap->cred.unix_cred.userID == NULL) {
226 (void) __ns_ldap_freeCred(&ap);
231 ap->cred.unix_cred.passwd =
233 if (ap->cred.unix_cred.passwd == NULL) {
234 (void) __ns_ldap_freeCred(&ap);
239 ap->cred.cert_cred.nickname =
241 if (ap->cred.cert_cred.nickname == NULL) {
242 (void) __ns_ldap_freeCred(&ap);
246 ap->auth.type = authp->auth.type;
247 ap->auth.tlstype = authp->auth.tlstype;
248 ap->auth.saslmech = authp->auth.saslmech;
249 ap->auth.saslopt = authp->auth.saslopt;
250 return (ap);
264 UnixCred_t *ap;
272 ap = *credp;
273 if (ap->userID) {
274 (void) memset(ap->userID, 0, strlen(ap->userID));
275 free(ap->userID);
278 if (ap->passwd) {
279 (void) memset(ap->passwd, 0, strlen(ap->passwd));
280 free(ap->passwd);
283 free(ap);
299 ns_cred_t *ap;
307 ap = *credp;
308 if (ap->hostcertpath) {
309 (void) memset(ap->hostcertpath, 0,
310 strlen(ap->hostcertpath));
311 free(ap->hostcertpath);
314 if (ap->cred.unix_cred.userID) {
315 (void) memset(ap->cred.unix_cred.userID, 0,
316 strlen(ap->cred.unix_cred.userID));
317 free(ap->cred.unix_cred.userID);
320 if (ap->cred.unix_cred.passwd) {
321 (void) memset(ap->cred.unix_cred.passwd, 0,
322 strlen(ap->cred.unix_cred.passwd));
323 free(ap->cred.unix_cred.passwd);
326 if (ap->cred.cert_cred.nickname) {
327 (void) memset(ap->cred.cert_cred.nickname, 0,
328 strlen(ap->cred.cert_cred.nickname));
329 free(ap->cred.cert_cred.nickname);
332 free(ap);