Commit Graph

57 Commits

Author SHA1 Message Date
Howard Chu
76252251f5 Rename slap_tm to lutil_tm... 2004-09-28 12:22:22 +00:00
Howard Chu
1ca9556c1b Move time parsers from ppolicy.c to liblutil; preserve greater precision 2004-09-28 12:12:13 +00:00
Howard Chu
cbabd269a5 ITS#2457 Added LUTIL_SLASHPATH macro and func for converting
forward-slash paths to Windows back-slash format.
2004-03-19 08:06:42 +00:00
Pierangelo Masarati
daa29805ad define error codes for lutil_passwd* funcs 2004-03-12 20:07:41 +00:00
Howard Chu
1198d4c6d3 Pass result berval to lutil_passwd_hash instead of returning it 2004-03-02 21:59:44 +00:00
Kurt Zeilenga
3c598e89fb Happy new year 2004-01-01 19:15:16 +00:00
Howard Chu
39eb55b5f4 ITS#2869 fix decode length checks again 2003-12-11 13:24:06 +00:00
Kurt Zeilenga
159de0f135 Updated notices and acknowledgements 2003-11-26 07:16:36 +00:00
Pierangelo Masarati
0b5691f122 cleanup previous commit; update header 2003-05-15 01:18:45 +00:00
Howard Chu
7e2273b30e Added errmsg arg to lutil_passwd_{check,hash} functions 2003-04-30 07:52:05 +00:00
Howard Chu
62f7394f8c Fix up lutil_passwd stuff to avoid struct berval definition 2003-03-12 23:07:09 +00:00
Howard Chu
bbad1de8e1 Added lutil_passwd_init, _destroy, _add for dynamically adding passwd
schemes. Declarations in lutil.h require lutil.h never be included before
lber.h, always after.
2003-03-11 05:58:53 +00:00
Howard Chu
13b96bc479 Cleanup NT service support declarations 2003-03-03 11:42:12 +00:00
Kurt Zeilenga
6939c53170 Happy new year 2003-01-03 20:20:47 +00:00
Howard Chu
1dbbccc3fe Eliminate overallocation in LUTIL_BASE64_ENCODE_LEN 2002-09-10 03:13:37 +00:00
Howard Chu
7017f22468 Fix ITS#2055, avoid roundoff errors in LUTIL_BASE64_DECODE_LEN 2002-09-10 02:55:05 +00:00
Pierangelo Masarati
aea52e5bc9 define macros for appropriate sizing of lutil buffers 2002-08-31 10:48:02 +00:00
Kurt Zeilenga
8de258d2e2 Patch: 'ldapmodify -y file' reads password from file (ITS#2031)
================
Written by Hallvard B. Furuseth and placed into the public domain.
This software is not subject to any license of the University of Oslo.
            ================
Adapted by Kurt Zeilenga for inclusion in OpenLDAP.  My comments are
marked with enclosed with square brackets (e.g. [Kurt's comment] below.
            ================

If I run ldapmodify & co from a script, I don't want to use '-W password'
because the password shows up in the output of 'ps' for everyone,
and I can't pipe the password to 'ldapmodify -w' because -w uses
getpassphrase() which reads from the tty instead of stdin.
So I added '-y file' which reads the password from file.  The programs
exit if the file cannot be read.

[Complete contents of file is used as password.  Use:
	echo -n "secret" > password
to create a file with "secret" as the password.  The -n avoids
adding a newline (which would invalidate the password).  Note
that echo is a builtin and hence its arguments are not visible
to 'ps'.]

I changed ldapmodify, ldapmodrdn, ldapdelete, ldapsearch, ldapcompare.
I did not bother to change ldappasswd and ldapwhoami, because they
prompt for many passwords.  [I fixed up ldapwhoami.]

Rerun autoconf after applying this patch. [Done.]

Note:  I do not know if Windows NT has fstat(), so I set HAVE_FSTAT to
undef in portable.nt.  (fstat() is used to warn if the file is publicly
readable or writeable.)  [I used fstat() to set the buffer size to
read.]

[Note: using the contents of a file extends the tools to support
passwords which could not normally be provided using getpassphrase()
or via the command line.]

Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>, Aug 2002.
[Kurt D. Zeilenga <kurt@openldap.org>, Aug 2002.]
2002-08-24 05:47:17 +00:00
Howard Chu
d4df52a659 Silence struct tm warnings 2002-07-27 02:10:02 +00:00
Howard Chu
5a5f9219bf Moved slap_strcopy, slap_strncopy to lutil_strcopy, lutil_strncopy
Added lutil_gentime
2002-07-27 00:26:27 +00:00
Kurt Zeilenga
c38027902a Update copyright notices 2002-01-04 20:40:29 +00:00
Howard Chu
c37fa6d165 from jon@symas.com - misc MSVC cleanup 2001-12-17 22:40:10 +00:00
Kurt Zeilenga
abd9be4def Remove lint and misc MSVC updates 2001-12-09 02:34:45 +00:00
Howard Chu
0552b1c53f NT updates from jon@symas.com. 2001-12-07 04:03:25 +00:00
Kurt Zeilenga
8d4c20cd6d Adding crypt(3) salt format (ITS#1202) from Jeff Costlow <j.costlow@f5.com>
with minor changes by committer
---
Copyright 2001, F5 Networks, Inc, All rights reserved.
This software is not subject to any license of F5 Networks.

This is free software; you can redistribute and use it
under the same terms as OpenLDAP itself.
2001-06-13 03:47:17 +00:00
Kurt Zeilenga
be9a50af25 Update copyright (including with or without modification clarification) 2001-05-29 03:29:53 +00:00
Kurt Zeilenga
5e4318df82 use ber_socket_t, not LBER_SOCKET_T 2000-10-18 00:32:35 +00:00
Kurt Zeilenga
bcdd316b86 entropy should be unsigned 2000-10-14 02:14:38 +00:00
Kurt Zeilenga
9ef1a740c2 Round one of LDAP_F() macro changes. In this round we rename
macros into our namespace and limit use to headers.  A subsequent
round will add macros to separately handle forward declarations
of variables from declaration of function prototypes.  The last
round will add additional macros for declaring actual variables and
functions.
2000-06-18 19:48:07 +00:00
Kurt Zeilenga
0bb431d3b3 Y2k copyright update 2000-05-13 02:25:54 +00:00
Kurt Zeilenga
f224e69558 Add experimental code to check simple bind passwords
against Cyrus SASLdb.  Like other cleartext mechanisms,
should be protected from eavesdropping.
2000-05-10 04:29:51 +00:00
Kurt Zeilenga
802ee714e4 Framework for authpasswd. Needs work. Behind #ifdef 2000-04-25 13:28:03 +00:00
Kurt Zeilenga
b1639dadd6 Remove lint
Add copyrights
1999-12-13 04:53:59 +00:00
Kurt Zeilenga
431dad371c Fix slapd SASL/ExternalOps encoding
Add controls to extended ops API signatures, need impl.
Update password to support optional server side generation of
new password, verification of old password, and changing of
non-bound user's passwords.
1999-12-10 04:52:32 +00:00
Kurt Zeilenga
5e12c84a6f Add simple password test program.
Rework lutil_passwd routines to use struct berval instead of strings.
1999-12-09 01:11:16 +00:00
Kurt Zeilenga
d5edb4bff6 Reengineered ldappasswd(1). Uses extended operation to set
user password.  Likely to be modified to use bind control
instead.  Use of modify deprecated in favor mechanisms that
support passwords stored externally to the directory (such
as in a SASL service).
Modified slapd extended operation infrastructure to support
backend provided extended operations.
1999-12-08 04:37:59 +00:00
Howard Chu
eaaea51b53 Fixes for NT dynamic linking. 1999-11-27 23:40:08 +00:00
Kurt Zeilenga
8c665d48d6 Fix typo 1999-11-23 23:02:46 +00:00
Howard Chu
0991e22550 Fixed the LDAP_F macro.
See README 1.27 log
1999-10-28 07:28:53 +00:00
Kurt Zeilenga
bdca662249 Add lutil_entropy(). Currently only supports /dev/urandom or
Linux equivs.  Should be extended to support other quality
sources of entropy.  Should be extended to support a reasonable fallback.
1999-10-26 22:57:39 +00:00
Kurt Zeilenga
f4a0699311 Add macros to compute base64 encode/decode lengths. 1999-10-25 01:44:47 +00:00
Kurt Zeilenga
3c00fd6d23 Rework passwd routines to allow callers to determine which
schemes are supported.  This should facilate server rootDSE
advertisement of supported schemes, etc..
1999-09-25 22:13:25 +00:00
Kurt Zeilenga
b509dd4d8c sockpair cleanup including:
provide prototype in lutil.h
use LBER_SOCKET_T instead of int in prototype.  (didn't use
	ber_socket_t so all of lber.h wouldn't have be dragged in)
rename signal handlers, use RETSIGTYPE, and make SIGHUP wake
rename fd to sd to reflect descriptor must be usable as a socket.
renamed sel_exit_fds to wake_sds to reflect current use
improve readability of sockpeer.c including removing obtuse goto.
1999-08-31 05:18:06 +00:00
Kurt Zeilenga
bd36de108f Add OpenLDAP RCS Id 1999-08-31 01:17:01 +00:00
Kurt Zeilenga
e4f6d54877 New dn2id format with base/one/subtree indices (ldbm/bdb2)
New id2entry (id-less) format (ldbm/bdb2)
Removed id2children (ldbm/bdb2)
Added nextid database (ldbm)
Broke ldbmtest
Removed ldif2* tools (ldbm/bdb2)
Added slap tools (slapadd, slapcat, slapindex)
1999-08-17 19:00:59 +00:00
Kurt Zeilenga
5048836a50 Update INSTALL based upon new snapshot naming.
Update lutil.h copyright.
CHANGES is a release engineering document.  Not maintained in HEAD.
1999-07-28 20:31:41 +00:00
Kurt Zeilenga
9225707a06 Modify lutil_passwd to accept a third argument char** methods to
specific which methods may be used.  This will facilate development
of a slapd config directive "passwordMethod ..." to specify which
methods should be allowed.
1999-06-29 22:24:53 +00:00
Kurt Zeilenga
dc07e765f2 Vienna Bulk Commit
This commit includes many changes.  All changes compile under NT but
have not been tested under UNIX.

A Summary of changes (likely incomplete):

NT changes:
	Removed lint.
	Clean up configuration support for "Debug", "Release", "SDebug",
		and "SRelease" configurations.
	Share output directories for clients, libraries,
		and slapd.  (maybe they should be combined further
		and moved to build/{,S}{Debug,Release}).
	Enable threading when _MT is defined.
	Enable debuging when _DEBUG is defined.
	Disable setting of NDEBUG under Release/SRelease.  Asserts
		are disabled in <ac/assert.h> when LDAP_DEBUG is not
		defined.
	Added 'build/main.dsp' Master project.
	Removed non-slapd projects from slapd.dsp (see main.dsp).
	Removed replaced many uses of _WIN32 macro with feature based
		macros.

ldap_cdefs.h changes
	#define LDAP_CONST const
		(see below)
	#define LDAP_F(type) LDAP_F_PRE type LDAP_F_POST
		To allow specifiers to be added before and after
		the type declaration.  (For DLL handling)

LBER/LDAP changes
	Namespace changes:
		s/lber_/ber_/ for here and there.
		s/NAME_ERROR/LDAP_NAME_ERROR/g
	Deleted NULLMSG and other NULL* macros for namespace reasons.
	"const" libraries.  Installed headers (ie: lber.h, ldap.h)
		use LDAP_CONST macro.  Normally set to 'const' when
		__STDC__.  Can be set externally to enable/disable
		'constification' of external interface.  Internal
		interface always uses 'const'.  Did not fix warnings
		in -lldif (in lieu of new LDIF parser).

	Added _ext API implementations (excepting search and bind).
		Need to implement ldap_int_get_controls() for reponses
		with controls.

	Added numberous assert() checks.

LDAP_R
	_MT defines HAVE_NT_THREADS
	Added numberous assert() checks.
	Changed ldap_pthread_t back to unsigned long.  Used cast
	to HANDLE in _join().

LDBM
	Replaced _WIN32 with HAVE_SYSLOG

ud
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).

slapd
	Made connection sockbuf field a pointer to a sockbuf.  This
		removed slap.h dependency on lber-int.h.  lber-int.h now only
		included by those files needing to mess with the sockbuf.
	Used ber_* functions/macros to access sockbuf internals whenever
		possible.
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).
	Removed FD_SET unsigned lint

slapd/tools
	Used EXEEXT to added ".exe" to routines.  Need to define EXEEXT
		under UNIX.

ldappasswd
	Added ldappasswd.dsp.  Ported to NT.  Used getpid() to seed rand().

nt_debug
	Minor cleanup.  Added "portable.h" include and used <ac/*.h> where
	appropriate.  Added const to char* format argument.
1999-05-19 01:12:33 +00:00
Gary Williams
92d4ccf906 NT port 1999-04-01 16:38:11 +00:00
Kurt Zeilenga
7fc7988b8e Add OpenLDAP Copyright to headers 1998-12-28 19:51:35 +00:00