summaryrefslogtreecommitdiff
path: root/databases/ldapvi/patches/patch-ac
blob: 5b425fdac38feebd4239daa4b770830875c36623 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-ac,v 1.2 2013/03/02 18:18:10 joerg Exp $

--- ldapvi.c.orig	2007-05-05 10:17:26.000000000 +0000
+++ ldapvi.c
@@ -470,7 +470,7 @@ change_mechanism(bind_options *bo)
 		bo->authmethod = LDAP_AUTH_SASL;
 		puts("Switching to SASL authentication.");
 	}
-	bo->sasl_mech = getline("SASL mechanism", bo->sasl_mech);
+	bo->sasl_mech = lv_getline("SASL mechanism", bo->sasl_mech);
 }
 
 static int
@@ -1465,7 +1465,7 @@ copy_sasl_output(FILE *out, char *sasl)
 	int line = 0;
 	int c;
 
-	if (lstat(sasl, &st) == -1) return;
+	if (lstat(sasl, &st) == -1) return 0;
 	if ( !(in = fopen(sasl, "r"))) syserr();
 
 	if (st.st_size > 0) {
@@ -1499,6 +1499,7 @@ copy_sasl_output(FILE *out, char *sasl)
 			fputc(c, out);
 		}
 	}
+	return line;
 }
 
 static GArray *