Your message dated Fri, 14 Jul 2006 18:28:40 +0200
with message-id <[EMAIL PROTECTED]>
and subject line slapd: slappasswd's -T option doesn't accept '-'
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: slapd
Version: 2.1.22-1
Severity: wishlist
Tags: patch

Hello,

this is the "use case":

$ echo lala | slappasswd -T-
-: No such file or directory


This result runs counter to common Unix conventions where '-' is
commonly interpreted as the standard input file, and it prevents
slappasswd from being used in a pipe.

A patch to ./libraries/liblutil/passfile.c is attached.


Best,
--Toni++


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux spruce 2.4.21-4-686-smp #1 SMP Sun Aug 3 00:31:17 EST 2003 i686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED]

Versions of packages slapd depends on:
ii  coreutils [fileutils]       5.0.90-3     The GNU core utilities
ii  debconf                     1.3.11       Debian configuration management sy
ii  fileutils                   5.0.90-3     The GNU file management utilities 
ii  libc6                       2.3.2-3      GNU C Library: Shared libraries an
ii  libdb4.1                    4.1.25-6     Berkeley v4.1 Database Libraries [
ii  libgcrypt1                  1.1.12-3     LGPL Crypto library - runtime libr
ii  libgnutls7                  0.8.9-2      GNU TLS library - runtime library
ii  libiodbc2                   3.0.6-4      iODBC Driver Manager
ii  libldap2                    2.1.22-1     OpenLDAP libraries
ii  libltdl3                    1.5-1        A system independent dlopen wrappe
ii  libmime-base64-perl         2.20-1       MIME/Base64 decoding for Perl
ii  libsasl2                    2.1.15-5     Authentication abstraction library
ii  libslp1                     1.0.11-4     OpenSLP libraries
ii  libtasn1-0                  0.1.2-1      Manage ASN.1 structures (runtime)
ii  libwrap0                    7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii  perl [libmime-base64-perl]  5.8.0-19     Larry Wall's Practical Extraction 
ii  psmisc                      21.3-1       Utilities that use the proc filesy
ii  zlib1g                      1:1.1.4-14   compression library - runtime

-- debconf information excluded

--- passfile.c	2003/08/26 15:19:12	1.1
+++ passfile.c	2003/08/26 17:10:14
@@ -27,7 +27,12 @@
 	struct berval *passwd )
 {
 	size_t nread, nleft, nr;
-	FILE *f = fopen( filename, "r" );
+	FILE *f = NULL;
+	
+	if ((filename[0] == '-') && (filename[1] == '\0'))
+		f = stdin;
+	else
+		f = fopen( filename, "r" );
 
 	if( f == NULL ) {
 		perror( filename );
@@ -40,7 +45,7 @@
 #ifdef HAVE_FSTAT
 	{
 		struct stat sb;
-		if ( fstat( fileno( f ), &sb ) == 0 ) {
+		if ( (f != stdin) && (fstat( fileno( f ), &sb ) == 0 ) ) {
 			if( sb.st_mode & 006 ) {
 				fprintf( stderr,
 					"Warning: Password file %s is publicly readable/writeable\n",

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

This is implemented in the -s function of slappasswd.

[EMAIL PROTECTED] % echo bla | slappasswd -s -
~/debpkg/openldap/trunk-2.3
{SSHA}yYHcfx7Ack6ryCvb06wxVoSsiboDrTae

Regards,

Matthijs Mohlmann

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEt8Y42n1ROIkXqbARAuAYAJ4wKJ74wzuW7jGzavnRr3xkSxATCwCbB3Ij
zeZBQ/HlbZM6J2gSXvZyKqM=
=bJca
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to