-rw-r--r-- | core/opie-login/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 9c40fc4..d95a59b 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -20,64 +20,65 @@ | |||
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define _GNU_SOURCE | 28 | #define _GNU_SOURCE |
29 | 29 | ||
30 | #include <sys/types.h> | 30 | #include <sys/types.h> |
31 | #include <time.h> | 31 | #include <time.h> |
32 | #include <sys/time.h> | 32 | #include <sys/time.h> |
33 | #include <sys/resource.h> | 33 | #include <sys/resource.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | #include <syslog.h> | 35 | #include <syslog.h> |
36 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
39 | #include <signal.h> | 39 | #include <signal.h> |
40 | #include <getopt.h> | 40 | #include <getopt.h> |
41 | #include <string.h> | 41 | #include <string.h> |
42 | 42 | ||
43 | #include <qpe/qpeapplication.h> | 43 | #include <qpe/qpeapplication.h> |
44 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
45 | #include <qpe/qpestyle.h> | 45 | #include <qpe/qpestyle.h> |
46 | #include <qpe/power.h> | 46 | #include <qpe/power.h> |
47 | #include <qpe/config.h> | 47 | #include <qpe/config.h> |
48 | 48 | ||
49 | #include <opie/odevice.h> | 49 | #include <opie/odevice.h> |
50 | 50 | ||
51 | #include <qwindowsystem_qws.h> | 51 | #include <qwindowsystem_qws.h> |
52 | #include <qwsmouse_qws.h> | ||
52 | #include <qmessagebox.h> | 53 | #include <qmessagebox.h> |
53 | #include <qlabel.h> | 54 | #include <qlabel.h> |
54 | #include <qtimer.h> | 55 | #include <qtimer.h> |
55 | #include <qfile.h> | 56 | #include <qfile.h> |
56 | 57 | ||
57 | #include "loginapplication.h" | 58 | #include "loginapplication.h" |
58 | #include "loginwindowimpl.h" | 59 | #include "loginwindowimpl.h" |
59 | #include "calibrate.h" | 60 | #include "calibrate.h" |
60 | 61 | ||
61 | using namespace Opie; | 62 | using namespace Opie; |
62 | 63 | ||
63 | int login_main ( int argc, char **argv, pid_t ppid ); | 64 | int login_main ( int argc, char **argv, pid_t ppid ); |
64 | void sigterm ( int sig ); | 65 | void sigterm ( int sig ); |
65 | void sigint ( int sig ); | 66 | void sigint ( int sig ); |
66 | void exit_closelog ( ); | 67 | void exit_closelog ( ); |
67 | 68 | ||
68 | static struct option long_options [] = { | 69 | static struct option long_options [] = { |
69 | { "autologin", 1, 0, 'a' }, | 70 | { "autologin", 1, 0, 'a' }, |
70 | { 0, 0, 0, 0 } | 71 | { 0, 0, 0, 0 } |
71 | }; | 72 | }; |
72 | 73 | ||
73 | 74 | ||
74 | int main ( int argc, char **argv ) | 75 | int main ( int argc, char **argv ) |
75 | { | 76 | { |
76 | pid_t ppid = ::getpid ( ); | 77 | pid_t ppid = ::getpid ( ); |
77 | 78 | ||
78 | if ( ::geteuid ( ) != 0 ) { | 79 | if ( ::geteuid ( ) != 0 ) { |
79 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); | 80 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); |
80 | return 1; | 81 | return 1; |
81 | } | 82 | } |
82 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and | 83 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and |
83 | ::setuid ( 0 ); // messes up things like config files | 84 | ::setuid ( 0 ); // messes up things like config files |