Displaying 4 results from an estimated 4 matches for "fatal_outofmem".
2014 Oct 14
1
auth-worker goes wild
...ctories: orig/auth and src/auth
diff -ru orig/auth/passdb-pam.c src/auth/passdb-pam.c
--- orig/auth/passdb-pam.c	ti. okt. 14 12:04:16 2014
+++ src/auth/passdb-pam.c	ti. okt. 14 12:02:28 2014
@@ -85,6 +85,8 @@
 			string = strdup(ctx->request->user);
 			if (string == NULL)
 				i_fatal_status(FATAL_OUTOFMEM, "Out of memory");
+			if (strlen(string) == 0)
+				i_fatal_status(FATAL_OUTOFMEM, "NO USER?");
 			break;
 		case PAM_PROMPT_ECHO_OFF:
 			/* Assume we're asking for password */
2014 Apr 24
0
Help implementing username_format in auth PAM driver
...**msg,
 		case PAM_PROMPT_ECHO_ON:
 			/* Assume we're asking for user. We might not ever
 			   get here because PAM already knows the user. */
-			string = strdup(ctx->request->user);
+			string = strdup(pam_username_lookup(ctx->request));
 			if (string == NULL)
 				i_fatal_status(FATAL_OUTOFMEM, "Out of memory");
 			break;
@@ -240,7 +253,7 @@ static void set_pam_items(struct auth_request *request, pam_handle_t *pamh)
 	host = net_ip2addr(&request->remote_ip);
 	if (host != NULL)
 		(void)pam_set_item(pamh, PAM_RHOST, host);
-	(void)pam_set_item(pamh, PAM_RUSER, request-&...
2014 Dec 12
0
PATCH - add username_format to the PAM auth module
...esponse));
@@ -82,7 +90,7 @@
 		case PAM_PROMPT_ECHO_ON:
 			/* Assume we're asking for user. We might not ever
 			   get here because PAM already knows the user. */
-			string = strdup(ctx->request->user);
+			string = strdup(str_c(username));
 			if (string == NULL)
 				i_fatal_status(FATAL_OUTOFMEM, "Out of memory");
 			break;
@@ -108,12 +116,14 @@
 			}
 
 			free(resp);
+			str_free(&username);
 			return PAM_CONV_ERR;
 		}
 
 		resp[i].resp_retcode = PAM_SUCCESS;
 		resp[i].resp = string;
 	}
+	str_free(&username);
 
 	*resp_r = resp;
 	return PAM_SUCCESS;
@@ -231,7 +241...
2015 Feb 11
2
[PATCH] Fix for client certificate validation does not work
...m_buf() failed");
-	inf = PEM_X509_INFO_read_bio(bio, NULL, NULL, NULL);
-	if (inf == NULL)
-		i_fatal("Couldn't parse ssl_ca: %s", ssl_last_error());
-	BIO_free(bio);
-
-	if (xnames_r != NULL) {
-		*xnames_r = sk_X509_NAME_new_null();
-		if (*xnames_r == NULL)
-			i_fatal_status(FATAL_OUTOFMEM, "sk_X509_NAME_new_null() failed");
-	}
-	for(i = 0; i < sk_X509_INFO_num(inf); i++) {
-		itmp = sk_X509_INFO_value(inf, i);
-		if(itmp->x509) {
-			X509_STORE_add_cert(store, itmp->x509);
-			xname = X509_get_subject_name(itmp->x509);
-			if (xname != NULL && xnames_r...