-rw-r--r-- | core/opie-login/main.cpp | 34 | ||||
-rw-r--r-- | core/opie-login/opie-login.pro | 4 |
2 files changed, 19 insertions, 19 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index bf98735..7d5792e 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -1,90 +1,90 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This file is free software; you can | 5 | _;:, .> :=|. This file is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
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 | #include "loginapplication.h" |
29 | #include "loginwindowimpl.h" | ||
30 | #include "calibrate.h" | ||
31 | |||
32 | /* OPIE */ | ||
33 | #include <opie2/odevice.h> | ||
34 | #include <qpe/qpestyle.h> | ||
35 | #include <qpe/power.h> | ||
36 | #include <qpe/config.h> | ||
29 | 37 | ||
38 | /* QT */ | ||
39 | #include <qwindowsystem_qws.h> | ||
40 | #include <qmessagebox.h> | ||
41 | #include <qlabel.h> | ||
42 | #include <qtimer.h> | ||
43 | #include <qfile.h> | ||
44 | |||
45 | /* STD */ | ||
30 | #include <sys/types.h> | 46 | #include <sys/types.h> |
31 | #include <time.h> | 47 | #include <time.h> |
32 | #include <sys/time.h> | 48 | #include <sys/time.h> |
33 | #include <sys/resource.h> | 49 | #include <sys/resource.h> |
34 | #include <unistd.h> | 50 | #include <unistd.h> |
35 | #include <syslog.h> | 51 | #include <syslog.h> |
36 | #include <sys/wait.h> | 52 | #include <sys/wait.h> |
37 | #include <stdio.h> | 53 | #include <stdio.h> |
38 | #include <stdlib.h> | 54 | #include <stdlib.h> |
39 | #include <signal.h> | 55 | #include <signal.h> |
40 | #include <getopt.h> | 56 | #include <getopt.h> |
41 | #include <string.h> | 57 | #include <string.h> |
42 | 58 | ||
43 | #include <qpe/qpestyle.h> | ||
44 | #include <qpe/power.h> | ||
45 | #include <qpe/config.h> | ||
46 | |||
47 | #include <opie/odevice.h> | ||
48 | |||
49 | #include <qwindowsystem_qws.h> | ||
50 | #include <qmessagebox.h> | ||
51 | #include <qlabel.h> | ||
52 | #include <qtimer.h> | ||
53 | #include <qfile.h> | ||
54 | |||
55 | #include "loginapplication.h" | ||
56 | #include "loginwindowimpl.h" | ||
57 | #include "calibrate.h" | ||
58 | |||
59 | using namespace Opie; | 59 | using namespace Opie; |
60 | 60 | ||
61 | int login_main ( int argc, char **argv, pid_t ppid ); | 61 | int login_main ( int argc, char **argv, pid_t ppid ); |
62 | void sigterm ( int sig ); | 62 | void sigterm ( int sig ); |
63 | void sigint ( int sig ); | 63 | void sigint ( int sig ); |
64 | void exit_closelog ( ); | 64 | void exit_closelog ( ); |
65 | 65 | ||
66 | static struct option long_options [] = { | 66 | static struct option long_options [] = { |
67 | { "autologin", 1, 0, 'a' }, | 67 | { "autologin", 1, 0, 'a' }, |
68 | { 0, 0, 0, 0 } | 68 | { 0, 0, 0, 0 } |
69 | }; | 69 | }; |
70 | 70 | ||
71 | 71 | ||
72 | int main ( int argc, char **argv ) | 72 | int main ( int argc, char **argv ) |
73 | { | 73 | { |
74 | int userExited = 0; | 74 | int userExited = 0; |
75 | pid_t ppid = ::getpid ( ); | 75 | pid_t ppid = ::getpid ( ); |
76 | 76 | ||
77 | if ( ::geteuid ( ) != 0 ) { | 77 | if ( ::geteuid ( ) != 0 ) { |
78 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); | 78 | ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); |
79 | return 1; | 79 | return 1; |
80 | } | 80 | } |
81 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and | 81 | if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and |
82 | ::setuid ( 0 ); // messes up things like config files | 82 | ::setuid ( 0 ); // messes up things like config files |
83 | 83 | ||
84 | char *autolog = 0; | 84 | char *autolog = 0; |
85 | int c; | 85 | int c; |
86 | while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) { | 86 | while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) { |
87 | switch ( c ) { | 87 | switch ( c ) { |
88 | case 'a': | 88 | case 'a': |
89 | autolog = optarg; | 89 | autolog = optarg; |
90 | break; | 90 | break; |
diff --git a/core/opie-login/opie-login.pro b/core/opie-login/opie-login.pro index 0fdd8e1..30ed859 100644 --- a/core/opie-login/opie-login.pro +++ b/core/opie-login/opie-login.pro | |||
@@ -1,28 +1,28 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on debug | 2 | CONFIG = qt warn_on debug usepam |
3 | 3 | ||
4 | HEADERS = loginwindowimpl.h \ | 4 | HEADERS = loginwindowimpl.h \ |
5 | loginapplication.h \ | 5 | loginapplication.h \ |
6 | ../launcher/inputmethods.h \ | 6 | ../launcher/inputmethods.h \ |
7 | ../apps/calibrate/calibrate.h | 7 | ../apps/calibrate/calibrate.h |
8 | 8 | ||
9 | SOURCES = loginwindowimpl.cpp \ | 9 | SOURCES = loginwindowimpl.cpp \ |
10 | loginapplication.cpp \ | 10 | loginapplication.cpp \ |
11 | ../launcher/inputmethods.cpp \ | 11 | ../launcher/inputmethods.cpp \ |
12 | ../apps/calibrate/calibrate.cpp \ | 12 | ../apps/calibrate/calibrate.cpp \ |
13 | main.cpp | 13 | main.cpp |
14 | 14 | ||
15 | INTERFACES = loginwindow.ui | 15 | INTERFACES = loginwindow.ui |
16 | 16 | ||
17 | INCLUDEPATH += $(OPIEDIR)/include ../launcher ../apps/calibrate | 17 | INCLUDEPATH += $(OPIEDIR)/include ../launcher ../apps/calibrate |
18 | DEPENDPATH += $(OPIEDIR)/include ../launcher ../apps/calibrate | 18 | DEPENDPATH += $(OPIEDIR)/include ../launcher ../apps/calibrate |
19 | 19 | ||
20 | LIBS += -lqpe -lopie | 20 | LIBS += -lqpe -lopiecore2 |
21 | 21 | ||
22 | usepam:LIBS += -lpam | 22 | usepam:LIBS += -lpam |
23 | usepam:DEFINES += USEPAM | 23 | usepam:DEFINES += USEPAM |
24 | 24 | ||
25 | DESTDIR = $(OPIEDIR)/bin | 25 | DESTDIR = $(OPIEDIR)/bin |
26 | TARGET = opie-login | 26 | TARGET = opie-login |
27 | 27 | ||
28 | include ( $(OPIEDIR)/include.pro ) | 28 | include ( $(OPIEDIR)/include.pro ) |