New package: ldapvi-1.7
This commit is contained in:
parent
49ec2f8313
commit
15019411e6
|
@ -0,0 +1,54 @@
|
|||
From 33d23689ea0551e3df8227fe8da941e14586728c Mon Sep 17 00:00:00 2001
|
||||
From: Anders Kaseorg <andersk@MIT.EDU>
|
||||
Date: Tue, 14 Dec 2010 17:15:46 -0500
|
||||
Subject: [PATCH] Cast the trailing NULL on execl() calls
|
||||
|
||||
From exec(3): ?The list of arguments must be terminated by a NULL
|
||||
pointer, and, since these are variadic functions, this pointer must be
|
||||
cast (char *) NULL.?
|
||||
|
||||
This prevents crashes on 64-bit systems, where 0 is a 32-bit integer
|
||||
and (char *) NULL is a 64-bit pointer.
|
||||
|
||||
Signed-off-by: Anders Kaseorg <andersk at mit.edu>
|
||||
---
|
||||
ldapvi/misc.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/ldapvi/misc.c b/ldapvi/misc.c
|
||||
index 3b6896e..e9a0d4c 100644
|
||||
--- misc.c
|
||||
+++ misc.c
|
||||
@@ -172,9 +172,9 @@ edit(char *pathname, long line)
|
||||
if (line > 0) {
|
||||
char buf[20];
|
||||
snprintf(buf, 20, "+%ld", line);
|
||||
- execlp(vi, vi, buf, pathname, 0);
|
||||
+ execlp(vi, vi, buf, pathname, (char *) NULL);
|
||||
} else
|
||||
- execlp(vi, vi, pathname, 0);
|
||||
+ execlp(vi, vi, pathname, (char *) NULL);
|
||||
syserr();
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ view(char *pathname)
|
||||
case -1:
|
||||
syserr();
|
||||
case 0:
|
||||
- execlp(pg, pg, pathname, 0);
|
||||
+ execlp(pg, pg, pathname, (char *) NULL);
|
||||
syserr();
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ pipeview(int *fd)
|
||||
close(fds[1]);
|
||||
dup2(fds[0], 0);
|
||||
close(fds[0]);
|
||||
- execlp(pg, pg, 0);
|
||||
+ execlp(pg, pg, (char *) NULL);
|
||||
syserr();
|
||||
}
|
||||
|
||||
--
|
||||
2.8.3
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From 256ced029c235687bfafdffd07be7d47bf7af39b Mon Sep 17 00:00:00 2001
|
||||
From: David Lichteblau <david@lichteblau.com>
|
||||
Date: Thu, 18 Jun 2009 20:07:42 +0200
|
||||
Subject: [PATCH] renamed getline
|
||||
|
||||
---
|
||||
ldapvi/common.h | 2 +-
|
||||
ldapvi/ldapvi.c | 2 +-
|
||||
ldapvi/misc.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ldapvi/common.h b/ldapvi/common.h
|
||||
index 4c264e8..f731e62 100644
|
||||
--- common.h
|
||||
+++ common.h
|
||||
@@ -273,7 +273,7 @@ void pipeview_wait(int pid);
|
||||
char *home_filename(char *name);
|
||||
void read_ldapvi_history(void);
|
||||
void write_ldapvi_history(void);
|
||||
-char *getline(char *prompt, char *value);
|
||||
+char *ldapvi_getline(char *prompt, char *value);
|
||||
char *get_password();
|
||||
char *append(char *a, char *b);
|
||||
void *xalloc(size_t size);
|
||||
diff --git a/ldapvi/ldapvi.c b/ldapvi/ldapvi.c
|
||||
index 9d7d77c..7b312f8 100644
|
||||
--- ldapvi.c
|
||||
+++ 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 = ldapvi_getline("SASL mechanism", bo->sasl_mech);
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/ldapvi/misc.c b/ldapvi/misc.c
|
||||
index 0a9dba9..3b6896e 100644
|
||||
--- misc.c
|
||||
+++ misc.c
|
||||
@@ -315,7 +315,7 @@ write_ldapvi_history()
|
||||
}
|
||||
|
||||
char *
|
||||
-getline(char *prompt, char *value)
|
||||
+ldapvi_getline(char *prompt, char *value)
|
||||
{
|
||||
tdialog d;
|
||||
init_dialog(&d, DIALOG_DEFAULT, prompt, value);
|
||||
--
|
||||
2.8.3
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Template file for 'ldapvi'
|
||||
pkgname=ldapvi
|
||||
version=1.7
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--with-sha"
|
||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="ncurses-devel readline-devel libsasl-devel popt-devel libldap-devel glib-devel"
|
||||
license="GPL-2"
|
||||
homepage="http://www.lichteblau.com/ldapvi/"
|
||||
short_desc="An interactive LDAP client for Unix terminals"
|
||||
distfiles="http://www.lichteblau.com/download/ldapvi-${version}.tar.gz"
|
||||
checksum=6f62e92d20ff2ac0d06125024a914b8622e5b8a0a0c2d390bf3e7990cbd2e153
|
||||
|
||||
do_install() {
|
||||
vbin ldapvi
|
||||
vman ldapvi.1
|
||||
}
|
Loading…
Reference in New Issue