author | dwmw2 <dwmw2> | 2002-09-20 12:59:59 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-09-20 12:59:59 (UTC) |
commit | 6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc (patch) (side-by-side diff) | |
tree | c135d91fbd04c19936a71010505777ef7b86ad96 /noncore/settings/sshkeys/main.cpp | |
parent | a05c10c9744020be31c3038b2de3401b5cc673fb (diff) | |
download | opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.zip opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.tar.gz opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.tar.bz2 |
Works now
Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp index 37be8bf..a7b1d56 100644 --- a/noncore/settings/sshkeys/main.cpp +++ b/noncore/settings/sshkeys/main.cpp @@ -3,2 +3,9 @@ #include "sshkeys.h" +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <unistd.h> + @@ -6,8 +13,17 @@ int main(int argc, char *argv[]) { - QPEApplication a(argc, argv); - SSHKeysApp app; + QPEApplication a(argc, argv); + SSHKeysApp app; + int fd; + + /* If we had a controlling TTY, detach from it. + This is to ensure the SSH uses ssh-askpass */ + fd = open("/dev/tty", O_RDONLY); + if (fd != -1) { + ioctl(fd, TIOCNOTTY, NULL); + close(fd); + } - a.showMainWidget(&app); + a.showMainWidget(&app); - return a.exec(); + return a.exec(); } |