summaryrefslogtreecommitdiff
path: root/databases/ldapvi/patches/patch-ac
blob: 71a0a702d46242d2b0432873276b081132638a38 (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
31
32
33
34
35
36
37
38
39
$NetBSD: patch-ac,v 1.3 2017/01/04 17:19:52 roy 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
@@ -835,7 +835,7 @@ setcolor(int fg)
 {
 	char *bold = tigetstr("bold");
 	char *setaf = tigetstr("setaf");
-	if (setaf) putp(tparm(setaf, fg));
+	if (setaf) putp(tparm(setaf, fg, 0, 0, 0, 0, 0, 0, 0, 0));
 	if (bold) putp(bold);
 }
 
@@ -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 *