[pve-devel] [PATCH manager 3/3] use login instead of bash
Dominik Csapak
d.csapak at proxmox.com
Tue Feb 28 12:06:45 CET 2017
since bash does not play well with utf8 encoded input,
eg. pressing ALTGR + M on an english intl keyboard layout int novnc
does not enter the mu symbol but makes bash think you pressed alt+5,
we should use login without authorization when logging in as root
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Nodes.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index ad72e8c..510cbf9 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -672,7 +672,7 @@ __PACKAGE__->register_method ({
$upgradecmd = PVE::Tools::shellquote($upgradecmd) if $remip;
$shcmd = [ '/bin/bash', '-c', $upgradecmd ];
} else {
- $shcmd = [ '/bin/bash', '-l' ];
+ $shcmd = [ '/bin/login', '-f', 'root' ];
}
} else {
$shcmd = [ '/bin/login' ];
@@ -829,7 +829,7 @@ __PACKAGE__->register_method ({
my $upgradecmd = "pveupgrade --shell";
$shcmd = [ '/bin/bash', '-c', $upgradecmd ];
} else {
- $shcmd = [ '/bin/bash', '-l' ];
+ $shcmd = [ '/bin/login', '-f', 'root' ];
}
} else {
$shcmd = [ '/bin/login' ];
--
2.1.4
More information about the pve-devel
mailing list