~mcepl/ldapvi

Fix 'ldapvi --in' issue with base64 encoded dn when (len_dn % 3) == 0

Fix 'ldapvi --in' bug in ldapvi/base64.c read_base64(..) that cause a missing
'\0' terminator when decoding base64 encoded DNs which don't end with
padding (i.e. when (len_decoded_dn % 3) == 0).

Recipe to reproduce the issue without the fix:

Example LDIF file (test.ldif):
--
# dn of 'ou=abc,dc=example,dc=com' (length 24) gets base64 encoded
# without padding
dn:: b3U9YWJjLGRjPWV4YW1wbGUsZGM9Y29t
objectclass: organizationalUnit
ou: abc
--

Running:

    VISUAL=cat ldapvi --in --add test.ldif 2>/dev/null

results in the following output (note the 'sZGM9Y29t' suffix after 'add
ou=abc,dc=example,dc=com'):
--
# -*- coding: utf-8 -*- vim:fileencoding=utf-8:
# http://www.lichteblau.com/ldapvi/manual#syntax

add ou=abc,dc=example,dc=comsZGM9Y29t
objectclass: organizationalUnit
ou: abc
--
Don’t switch off canonical mode.

I am not sure what's the point, but certainly it leads to password
showing up in the audit log.
fix use-after-free in sasl code

==20127== Invalid read of size 4
==20127==    at 0x412AC4: finish_sasl_redirection (sasl.c:67)
==20127==    by 0x406901: rebind (ldapvi.c:611)
==20127==    by 0x407843: do_connect (ldapvi.c:732)
==20127==    by 0x4042F3: main (ldapvi.c:1739)
==20127==  Address 0x4c6498c is 28 bytes inside a block of size 40 free'd
==20127==    at 0x4A077E6: free (vg_replace_malloc.c:446)
==20127==    by 0x4068EE: rebind (ldapvi.c:609)
==20127==    by 0x407843: do_connect (ldapvi.c:732)
==20127==    by 0x4042F3: main (ldapvi.c:1739)

Originally filed as a resolution of
https://bugzilla.redhat.com/show_bug.cgi?id=949157

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
a8137aa0 — Joshua Randall 10 years ago old_pkg
Adds .gitignore to ignore all built files
7ddb6876 — Joop Boonen 5 years ago
Fixed 64bit-portability-issue
1a4e4c66 — Howard Guo 8 years ago
Correct text of GPLv2

Correct the outdated GPL v2 license text carried by the package.
6c811955 — Björn Jacke 12 years ago
return 0 instead of nothing
5abd5418 — Björn Jacke 12 years ago
declare some void functions to be really void
Use $(DESTDIR) for packaging with rpm (and I suspect Debian as well).
f1d42bad — Anders Kaseorg 13 years ago master
Handle pager commands with arguments

This handles PAGER in the same way the last commit handled EDITOR.

Signed-off-by: Anders Kaseorg <andersk at mit.edu>
048068e8 — Anders Kaseorg 13 years ago
Handle editor commands with arguments

Previously when the EDITOR environment variable is set to a command
with arguments, such as ?emacsclient --alternate-editor emacs?, ldapvi
would fail to launch the editor:

$ ldapvi
     26 entries read
error (misc.c line 180): No such file or directory
editor died
error (ldapvi.c line 83): No such file or directory

Fix this by launching the editor via /bin/sh.

Signed-off-by: Anders Kaseorg <andersk at mit.edu>
33d23689 — Anders Kaseorg 13 years ago
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>
a2717927 — David Lichteblau 12 years ago
Remove the misguided encoding option for VIM
5c8677a3 — David Lichteblau 15 years ago
Revert "use @docdir@, patch by Tom Canich"

This reverts commit 649fa07b8ca1c618d80fcea17ebc126a5ea502c7.
256ced02 — David Lichteblau 15 years ago
renamed getline
649fa07b — David Lichteblau 15 years ago
use @docdir@, patch by Tom Canich
48f05d0f — David Lichteblau 16 years ago
use putenv rather than setenv for old solaris versions
de67962b — David Lichteblau 17 years ago
use $DESTDIR, thanks to Gavin Henry
baae0387 — David Lichteblau 17 years ago
document -p
bdb9b46c — David Lichteblau 17 years ago
FreeBSD install patch, thanks to Ulrich Spoerlein
Next