Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp index 9f19d0f..d0c0e2b 100644 --- a/noncore/settings/sshkeys/main.cpp +++ b/noncore/settings/sshkeys/main.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ssh-agent key manipulation utility | 2 | * ssh-agent key manipulation utility |
3 | * | 3 | * |
4 | * (C) 2002 David Woodhouse <dwmw2@infradead.org> | 4 | * (C) 2002 David Woodhouse <dwmw2@infradead.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -16,34 +16,12 @@ | |||
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <qpe/qpeapplication.h> | 22 | #include <opie2/oapplicationfactory.h> |
23 | #include "sshkeys.h" | 23 | #include "sshkeys.h" |
24 | #include <stdio.h> | ||
25 | #include <sys/types.h> | ||
26 | #include <sys/stat.h> | ||
27 | #include <fcntl.h> | ||
28 | #include <sys/ioctl.h> | ||
29 | #include <unistd.h> | ||
30 | 24 | ||
31 | int main(int argc, char *argv[]) | 25 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<SSHKeysApp> ) |
32 | { | ||
33 | QPEApplication a(argc, argv); | ||
34 | SSHKeysApp app; | ||
35 | int fd; | ||
36 | 26 | ||
37 | /* If we had a controlling TTY, detach from it. | ||
38 | This is to ensure that SSH uses ssh-askpass */ | ||
39 | fd = open("/dev/tty", O_RDONLY); | ||
40 | if (fd != -1) { | ||
41 | ioctl(fd, TIOCNOTTY, NULL); | ||
42 | close(fd); | ||
43 | } | ||
44 | |||
45 | a.showMainWidget(&app); | ||
46 | |||
47 | return a.exec(); | ||
48 | } | ||
49 | 27 | ||