summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 2c10f77..8f795e3 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -22,64 +22,65 @@
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 47
48#include <opie/odevice.h> 48#include <opie/odevice.h>
49 49
50#include <qwindowsystem_qws.h> 50#include <qwindowsystem_qws.h>
51#include <qmessagebox.h> 51#include <qmessagebox.h>
52#include <qlabel.h> 52#include <qlabel.h>
53#include <qtimer.h> 53#include <qtimer.h>
54#include <qfile.h>
54 55
55#include "loginapplication.h" 56#include "loginapplication.h"
56#include "loginwindowimpl.h" 57#include "loginwindowimpl.h"
57#include "calibrate.h" 58#include "calibrate.h"
58 59
59using namespace Opie; 60using namespace Opie;
60 61
61int login_main ( int argc, char **argv ); 62int login_main ( int argc, char **argv );
62void sigterm ( int sig ); 63void sigterm ( int sig );
63void exit_closelog ( ); 64void exit_closelog ( );
64 65
65static struct option long_options [] = { 66static struct option long_options [] = {
66 { "autologin", 1, 0, 'a' }, 67 { "autologin", 1, 0, 'a' },
67 { 0, 0, 0, 0 } 68 { 0, 0, 0, 0 }
68}; 69};
69 70
70 71
71int main ( int argc, char **argv ) 72int main ( int argc, char **argv )
72{ 73{
73 if ( ::geteuid ( ) != 0 ) { 74 if ( ::geteuid ( ) != 0 ) {
74 ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] ); 75 ::fprintf ( stderr, "%s can only be executed by root. (or chmod +s)", argv [0] );
75 return 1; 76 return 1;
76 } 77 }
77 if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and 78 if ( ::getuid ( ) != 0 ) // qt doesn't really like SUID and
78 ::setuid ( 0 ); // messes up things like config files 79 ::setuid ( 0 ); // messes up things like config files
79 80
80 char *autolog = 0; 81 char *autolog = 0;
81 int c; 82 int c;
82 while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) { 83 while (( c = ::getopt_long ( argc, argv, "a:", long_options, 0 )) != -1 ) {
83 switch ( c ) { 84 switch ( c ) {
84 case 'a': 85 case 'a':
85 autolog = optarg; 86 autolog = optarg;