[389-commits] ldap/admin
Richard Allen Megginson
rmeggins at fedoraproject.org
Mon Jan 24 15:52:29 UTC 2011
ldap/admin/src/scripts/template-bak2db.pl.in | 4 ++--
ldap/admin/src/scripts/template-db2bak.pl.in | 4 ++--
ldap/admin/src/scripts/template-db2index.pl.in | 4 ++--
ldap/admin/src/scripts/template-db2ldif.pl.in | 4 ++--
ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in | 4 ++--
ldap/admin/src/scripts/template-fixup-memberof.pl.in | 4 ++--
ldap/admin/src/scripts/template-ldif2db.pl.in | 4 ++--
ldap/admin/src/scripts/template-ns-accountstatus.pl.in | 4 ++--
ldap/admin/src/scripts/template-ns-activate.pl.in | 4 ++--
ldap/admin/src/scripts/template-ns-inactivate.pl.in | 4 ++--
ldap/admin/src/scripts/template-schema-reload.pl.in | 4 ++--
ldap/admin/src/scripts/template-syntax-validate.pl.in | 4 ++--
ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in | 4 ++--
13 files changed, 26 insertions(+), 26 deletions(-)
New commits:
commit 07d9cb2b67b32d321ebfca0a4f1e57791c5bf411
Author: Rich Megginson <rmeggins at redhat.com>
Date: Mon Jan 24 08:37:52 2011 -0700
Bug 622907 - support piped passwords to perl-based maintenance commands
https://bugzilla.redhat.com/show_bug.cgi?id=622907
Resolves: bug 622907
Bug Description: support piped passwords to perl-based maintenance commands
Author: ulf.weltman at hp.com
Reviewed by: rmeggins
Branch: master
Fix Description: Use -t STDIN to check if the terminal is a tty
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/admin/src/scripts/template-bak2db.pl.in b/ldap/admin/src/scripts/template-bak2db.pl.in
index 78a20d3..96bfd16 100644
--- a/ldap/admin/src/scripts/template-bak2db.pl.in
+++ b/ldap/admin/src/scripts/template-bak2db.pl.in
@@ -93,11 +93,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-db2bak.pl.in b/ldap/admin/src/scripts/template-db2bak.pl.in
index 5fac9a7..27f9f30 100644
--- a/ldap/admin/src/scripts/template-db2bak.pl.in
+++ b/ldap/admin/src/scripts/template-db2bak.pl.in
@@ -90,11 +90,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-db2index.pl.in b/ldap/admin/src/scripts/template-db2index.pl.in
index 6229cb4..91101a1 100644
--- a/ldap/admin/src/scripts/template-db2index.pl.in
+++ b/ldap/admin/src/scripts/template-db2index.pl.in
@@ -129,11 +129,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-db2ldif.pl.in b/ldap/admin/src/scripts/template-db2ldif.pl.in
index 2a3c3f7..f3148ff 100644
--- a/ldap/admin/src/scripts/template-db2ldif.pl.in
+++ b/ldap/admin/src/scripts/template-db2ldif.pl.in
@@ -181,11 +181,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
index acdf29b..17ca9f7 100644
--- a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
@@ -111,11 +111,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-fixup-memberof.pl.in b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
index de7a6ba..5dff5f7 100644
--- a/ldap/admin/src/scripts/template-fixup-memberof.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
@@ -120,11 +120,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-ldif2db.pl.in b/ldap/admin/src/scripts/template-ldif2db.pl.in
index 1ead21e..b4d2c83 100644
--- a/ldap/admin/src/scripts/template-ldif2db.pl.in
+++ b/ldap/admin/src/scripts/template-ldif2db.pl.in
@@ -169,11 +169,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
index 2712d09..0b4deeb 100644
--- a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
@@ -465,11 +465,11 @@ if ($pwfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$rootpw = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($rootpw); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-ns-activate.pl.in b/ldap/admin/src/scripts/template-ns-activate.pl.in
index 2712d09..0b4deeb 100644
--- a/ldap/admin/src/scripts/template-ns-activate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-activate.pl.in
@@ -465,11 +465,11 @@ if ($pwfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$rootpw = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($rootpw); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-ns-inactivate.pl.in b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
index 2712d09..0b4deeb 100644
--- a/ldap/admin/src/scripts/template-ns-inactivate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
@@ -465,11 +465,11 @@ if ($pwfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$rootpw = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($rootpw); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-schema-reload.pl.in b/ldap/admin/src/scripts/template-schema-reload.pl.in
index 37071b4..7cac483 100644
--- a/ldap/admin/src/scripts/template-schema-reload.pl.in
+++ b/ldap/admin/src/scripts/template-schema-reload.pl.in
@@ -110,11 +110,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-syntax-validate.pl.in b/ldap/admin/src/scripts/template-syntax-validate.pl.in
index d8fc878..401ec87 100644
--- a/ldap/admin/src/scripts/template-syntax-validate.pl.in
+++ b/ldap/admin/src/scripts/template-syntax-validate.pl.in
@@ -120,11 +120,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
diff --git a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
index 0b54917..7ad6ca2 100644
--- a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
+++ b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
@@ -124,11 +124,11 @@ if ($passwdfile ne ""){
# Read the password from terminal
print "Bind Password: ";
# Disable console echo
- system("stty -echo");
+ system("stty -echo") if -t STDIN;
# read the answer
$passwd = <STDIN>;
# Enable console echo
- system("stty echo");
+ system("stty echo") if -t STDIN;
print "\n";
chop($passwd); # trim trailing newline
}
More information about the 389-commits
mailing list