mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Ports: Don't return errno value as pointer in openssh port
This commit is contained in:
parent
49ed168ced
commit
398f1ca842
Notes:
sideshowbarker
2024-07-17 22:54:14 +09:00
Author: https://github.com/ccapitalK Commit: https://github.com/SerenityOS/serenity/commit/398f1ca842a Pull-request: https://github.com/SerenityOS/serenity/pull/11225 Reviewed-by: https://github.com/IdanHo ✅
@ -14,7 +14,7 @@ index 974d67f0..3496eebe 100644
|
||||
static char *
|
||||
ssh_askpass(char *askpass, const char *msg, const char *env_hint)
|
||||
{
|
||||
@@ -122,62 +126,33 @@ ssh_askpass(char *askpass, const char *msg, const char *env_hint)
|
||||
@@ -122,62 +126,35 @@ ssh_askpass(char *askpass, const char *msg, const char *env_hint)
|
||||
char *
|
||||
read_passphrase(const char *prompt, int flags)
|
||||
{
|
||||
@ -56,7 +56,8 @@ index 974d67f0..3496eebe 100644
|
||||
+ struct termios no_echo = original;
|
||||
+ no_echo.c_lflag &= ~ECHO;
|
||||
+ if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &no_echo) < 0) {
|
||||
+ return errno;
|
||||
+ perror("Failed to turn off echo for passphrase");
|
||||
+ exit(errno);
|
||||
}
|
||||
|
||||
- if ((flags & RP_USE_ASKPASS) && getenv("DISPLAY") == NULL)
|
||||
@ -79,7 +80,8 @@ index 974d67f0..3496eebe 100644
|
||||
+ tcsetattr(STDIN_FILENO, TCSAFLUSH, &original);
|
||||
+ putchar('\n');
|
||||
+ if (ret < 0) {
|
||||
+ return errno;
|
||||
+ perror("Failed to read passphrase");
|
||||
+ exit(errno);
|
||||
}
|
||||
|
||||
- if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user