[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-bak2db.pl.in, 1.4, 1.5 template-db2bak.pl.in, 1.7, 1.8 template-db2index.pl.in, 1.5, 1.6 template-db2ldif.pl.in, 1.6, 1.7 template-fixup-memberof.pl.in, 1.1, 1.2 template-ldif2db.pl.in, 1.4, 1.5 template-ns-accountstatus.pl.in, 1.4, 1.5 template-ns-activate.pl.in, 1.4, 1.5 template-ns-inactivate.pl.in, 1.4, 1.5 template-schema-reload.pl.in, 1.1, 1.2
Nathan Kinder
nkinder at fedoraproject.org
Mon Jan 12 16:26:16 UTC 2009
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-plugin.h, 1.37, 1.38 slapi-private.h, 1.32, 1.33
- Next message (by thread): [Fedora-directory-commits] mod_restartd LICENSE, NONE, 1.1 Makefile.am, 1.10, 1.11 Makefile.in, 1.11, 1.12 aclocal.m4, 1.10, 1.11 configure, 1.10, 1.11 configure.in, 1.8, 1.9 ltmain.sh, 1.3, 1.4 makerpm.sh, 1.1, 1.2 mod_include-2.2.h, 1.1, 1.2 mod_include.h, 1.1.1.1, 1.2 mod_restartd-2.2.c, 1.1, 1.2 mod_restartd.c, 1.5, 1.6 mod_restartd.spec, 1.1, 1.2 mod_suexec-2.2.h, 1.1, 1.2 mod_suexec.h, 1.1.1.1, 1.2 AUTHORS, 1.1, NONE COPYING, 1.1, NONE ChangeLog, 1.1, NONE INSTALL, 1.2, NONE NEWS, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19010/ldap/admin/src/scripts
Modified Files:
template-bak2db.pl.in template-db2bak.pl.in
template-db2index.pl.in template-db2ldif.pl.in
template-fixup-memberof.pl.in template-ldif2db.pl.in
template-ns-accountstatus.pl.in template-ns-activate.pl.in
template-ns-inactivate.pl.in template-schema-reload.pl.in
Log Message:
Resolves: 170461
Summary: Remove dependency on Term::ReadKey for password prompting in Perl scripts.
Index: template-bak2db.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-bak2db.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-bak2db.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-bak2db.pl.in 12 Jan 2009 16:26:14 -0000 1.5
@@ -91,17 +91,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if ( $rootdn eq "" || $passwd eq "") { &usage; exit(1); }
($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time);
Index: template-db2bak.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- template-db2bak.pl.in 20 Mar 2007 01:15:32 -0000 1.7
+++ template-db2bak.pl.in 12 Jan 2009 16:26:14 -0000 1.8
@@ -88,17 +88,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if ( $rootdn eq "" || $passwd eq "") { &usage; exit(1); }
($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time);
Index: template-db2index.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2index.pl.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2index.pl.in 6 Dec 2007 02:45:20 -0000 1.5
+++ template-db2index.pl.in 12 Jan 2009 16:26:14 -0000 1.6
@@ -127,17 +127,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if ( $rootdn eq "" || $passwd eq "" )
Index: template-db2ldif.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.pl.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-db2ldif.pl.in 20 Mar 2007 01:15:32 -0000 1.6
+++ template-db2ldif.pl.in 12 Jan 2009 16:26:14 -0000 1.7
@@ -179,17 +179,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if (($instances[0] eq "" && $included[0] eq "") || $rootdn eq "" || $passwd eq "") { &usage; exit(1); }
($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time);
@@ -262,7 +260,7 @@
$ENV{'PATH'} = "$prefix at ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
$ENV{'LD_LIBRARY_PATH'} = "$prefix at nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
$ENV{'SHLIB_PATH'} = "$prefix at nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-print("Exported ldif file: ${ldiffile}\n");
+print("Exporting to ldif file: ${ldiffile}\n");
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-fixup-memberof.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-fixup-memberof.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- template-fixup-memberof.pl.in 10 Jun 2008 20:24:03 -0000 1.1
+++ template-fixup-memberof.pl.in 12 Jan 2009 16:26:14 -0000 1.2
@@ -118,17 +118,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if ( $rootdn eq "" || $passwd eq "" || $basedn_arg eq "" )
Index: template-ldif2db.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ldif2db.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ldif2db.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-ldif2db.pl.in 12 Jan 2009 16:26:14 -0000 1.5
@@ -167,17 +167,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if (($instance eq "" && $included[0] eq "") || $ldiffiles[0] eq "" || $rootdn eq "" || $passwd eq "") { &usage; exit(1); }
($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time);
Index: template-ns-accountstatus.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-accountstatus.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-accountstatus.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-ns-accountstatus.pl.in 12 Jan 2009 16:26:14 -0000 1.5
@@ -463,17 +463,15 @@
close(RPASS);
} elsif ($rootpw eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $rootpw = ReadLine(0);
-# chomp($rootpw);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $rootpw = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($rootpw); # trim trailing newline
}
if( $rootpw eq "" )
Index: template-ns-activate.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-activate.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-activate.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-ns-activate.pl.in 12 Jan 2009 16:26:14 -0000 1.5
@@ -463,17 +463,15 @@
close(RPASS);
} elsif ($rootpw eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $rootpw = ReadLine(0);
-# chomp($rootpw);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $rootpw = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($rootpw); # trim trailing newline
}
if( $rootpw eq "" )
Index: template-ns-inactivate.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-inactivate.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-inactivate.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-ns-inactivate.pl.in 12 Jan 2009 16:26:14 -0000 1.5
@@ -463,17 +463,15 @@
close(RPASS);
} elsif ($rootpw eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $rootpw = ReadLine(0);
-# chomp($rootpw);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $rootpw = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($rootpw); # trim trailing newline
}
if( $rootpw eq "" )
Index: template-schema-reload.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-schema-reload.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- template-schema-reload.pl.in 2 Jul 2008 16:14:40 -0000 1.1
+++ template-schema-reload.pl.in 12 Jan 2009 16:26:14 -0000 1.2
@@ -108,17 +108,15 @@
close(RPASS);
} elsif ($passwd eq "-"){
# Read the password from terminal
- die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n",
- "part of the standard perl distribution. If you want to use it, you must\n",
- "download and install the module. You can find it at\n",
- "http://www.perl.com/CPAN/CPAN.html\n";
-# Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module.
-# use Term::ReadKey;
-# print "Bind Password: ";
-# ReadMode('noecho');
-# $passwd = ReadLine(0);
-# chomp($passwd);
-# ReadMode('normal');
+ print "Bind Password: ";
+ # Disable console echo
+ system("stty -echo");
+ # read the answer
+ $passwd = <STDIN>;
+ # Enable console echo
+ system("stty echo");
+ print "\n";
+ chop($passwd); # trim trailing newline
}
if ( $rootdn eq "" || $passwd eq "" )
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-plugin.h, 1.37, 1.38 slapi-private.h, 1.32, 1.33
- Next message (by thread): [Fedora-directory-commits] mod_restartd LICENSE, NONE, 1.1 Makefile.am, 1.10, 1.11 Makefile.in, 1.11, 1.12 aclocal.m4, 1.10, 1.11 configure, 1.10, 1.11 configure.in, 1.8, 1.9 ltmain.sh, 1.3, 1.4 makerpm.sh, 1.1, 1.2 mod_include-2.2.h, 1.1, 1.2 mod_include.h, 1.1.1.1, 1.2 mod_restartd-2.2.c, 1.1, 1.2 mod_restartd.c, 1.5, 1.6 mod_restartd.spec, 1.1, 1.2 mod_suexec-2.2.h, 1.1, 1.2 mod_suexec.h, 1.1.1.1, 1.2 AUTHORS, 1.1, NONE COPYING, 1.1, NONE ChangeLog, 1.1, NONE INSTALL, 1.2, NONE NEWS, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list