author | kergoth <kergoth> | 2003-08-09 17:42:14 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:42:14 (UTC) |
commit | 1ab4ca95e4d2cf24d32b38c9031cb6076351e730 (patch) (unidiff) | |
tree | 644d196b01c7f280981bd17da23c7592a18e5643 /core/settings/security | |
parent | ec14206f63dd93e9fb84c76cbc76fc1968637590 (diff) | |
download | opie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.zip opie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.tar.gz opie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | core/settings/security/security.cpp | 258 | ||||
-rw-r--r-- | core/settings/security/security.h | 6 | ||||
-rw-r--r-- | core/settings/security/securitybase.ui | 465 |
3 files changed, 502 insertions, 227 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index 4701506..75a181b 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp | |||
@@ -1,230 +1,302 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "security.h" | 20 | #include "security.h" |
21 | 21 | ||
22 | #include <qpe/qpeapplication.h> | ||
22 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
23 | #include <qpe/password.h> | 24 | #include <qpe/password.h> |
24 | #include <qpe/qpedialog.h> | 25 | #include <qpe/qpedialog.h> |
25 | 26 | ||
26 | #include <qcheckbox.h> | 27 | #include <qcheckbox.h> |
27 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
28 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
29 | #include <qmessagebox.h> | 30 | #include <qmessagebox.h> |
31 | #include <qfile.h> | ||
32 | #include <qlistview.h> | ||
33 | #include <qtextstream.h> | ||
30 | 34 | ||
31 | Security::Security( QWidget* parent, const char* name, WFlags fl ) | 35 | Security::Security( QWidget* parent, const char* name, WFlags fl ) |
32 | : SecurityBase( parent, name, TRUE, fl ) | 36 | : SecurityBase( parent, name, TRUE, fl ) |
33 | { | 37 | { |
34 | valid=FALSE; | 38 | valid=FALSE; |
35 | Config cfg("Security"); | 39 | Config cfg("Security"); |
36 | cfg.setGroup("Passcode"); | 40 | cfg.setGroup("Passcode"); |
37 | passcode = cfg.readEntry("passcode"); | 41 | passcode = cfg.readEntry("passcode"); |
38 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); | 42 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); |
39 | cfg.setGroup("Sync"); | 43 | cfg.setGroup("Sync"); |
40 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 | 44 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 |
41 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); | 45 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); |
42 | selectNet(auth_peer,auth_peer_bits); | 46 | selectNet(auth_peer,auth_peer_bits); |
43 | connect(syncnet, SIGNAL(textChanged(const QString&)), | 47 | connect(syncnet, SIGNAL(textChanged(const QString&)), |
44 | this, SLOT(setSyncNet(const QString&))); | 48 | this, SLOT(setSyncNet(const QString&))); |
45 | 49 | ||
46 | /* | 50 | /* |
47 | cfg.setGroup("Remote"); | 51 | cfg.setGroup("Remote"); |
48 | if ( telnetAvailable() ) | 52 | if ( telnetAvailable() ) |
49 | telnet->setChecked(cfg.readEntry("allow_telnet")); | 53 | telnet->setChecked(cfg.readEntry("allow_telnet")); |
50 | else | 54 | else |
51 | telnet->hide(); | 55 | telnet->hide(); |
52 | |||
53 | if ( sshAvailable() ) | ||
54 | ssh->setChecked(cfg.readEntry("allow_ssh")); | ||
55 | else | ||
56 | ssh->hide(); | ||
57 | */ | ||
58 | 56 | ||
57 | if ( sshAvailable() ) | ||
58 | ssh->setChecked(cfg.readEntry("allow_ssh")); | ||
59 | else | ||
60 | ssh->hide(); | ||
61 | */ | ||
62 | |||
63 | QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; | ||
64 | Config loginCfg(configFile,Config::File); | ||
65 | |||
66 | loginCfg.setGroup("General"); | ||
67 | autoLoginName=loginCfg.readEntry("AutoLogin",""); | ||
68 | |||
69 | if (autoLoginName.stripWhiteSpace().isEmpty()) { | ||
70 | autoLogin=false; | ||
71 | } else { | ||
72 | autoLogin=true; | ||
73 | } | ||
74 | |||
75 | |||
76 | connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); | ||
77 | connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); | ||
59 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); | 78 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); |
60 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); | 79 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); |
80 | |||
81 | loadUsers(); | ||
61 | updateGUI(); | 82 | updateGUI(); |
62 | 83 | ||
63 | dl = new QPEDialogListener(this); | 84 | dl = new QPEDialogListener(this); |
64 | showMaximized(); | 85 | showMaximized(); |
65 | } | 86 | } |
66 | 87 | ||
67 | Security::~Security() | 88 | Security::~Security() |
68 | { | 89 | { |
69 | } | 90 | } |
70 | 91 | ||
71 | 92 | ||
72 | void Security::updateGUI() | 93 | void Security::updateGUI() |
73 | { | 94 | { |
74 | bool empty = passcode.isEmpty(); | 95 | bool empty = passcode.isEmpty(); |
75 | 96 | ||
76 | changepasscode->setText( empty ? tr("Set passcode" ) | 97 | changepasscode->setText( empty ? tr("Set passcode" ) |
77 | : tr("Change passcode" ) ); | 98 | : tr("Change passcode" ) ); |
78 | passcode_poweron->setEnabled( !empty ); | 99 | passcode_poweron->setEnabled( !empty ); |
79 | clearpasscode->setEnabled( !empty ); | 100 | clearpasscode->setEnabled( !empty ); |
101 | |||
102 | autologinToggle->setChecked(autoLogin); | ||
103 | userlist->setEnabled(autoLogin); | ||
104 | |||
80 | } | 105 | } |
81 | 106 | ||
82 | 107 | ||
83 | void Security::show() | 108 | void Security::show() |
84 | { | 109 | { |
85 | valid=FALSE; | 110 | valid=FALSE; |
86 | setEnabled(FALSE); | 111 | setEnabled(FALSE); |
87 | SecurityBase::show(); | 112 | SecurityBase::show(); |
88 | if ( passcode.isEmpty() ) { | 113 | if ( passcode.isEmpty() ) { |
89 | // could insist... | 114 | // could insist... |
90 | //changePassCode(); | 115 | //changePassCode(); |
91 | //if ( passcode.isEmpty() ) | 116 | //if ( passcode.isEmpty() ) |
92 | //reject(); | 117 | //reject(); |
93 | } else { | 118 | } else { |
94 | QString pc = enterPassCode(tr("Enter passcode")); | 119 | QString pc = enterPassCode(tr("Enter passcode")); |
95 | if ( pc != passcode ) { | 120 | if ( pc != passcode ) { |
96 | QMessageBox::critical(this, tr("Passcode incorrect"), | 121 | QMessageBox::critical(this, tr("Passcode incorrect"), |
97 | tr("The passcode entered is incorrect.\nAccess denied")); | 122 | tr("The passcode entered is incorrect.\nAccess denied")); |
98 | reject(); | 123 | reject(); |
99 | return; | 124 | return; |
100 | } | 125 | } |
101 | } | 126 | } |
102 | setEnabled(TRUE); | 127 | setEnabled(TRUE); |
103 | valid=TRUE; | 128 | valid=TRUE; |
104 | } | 129 | } |
105 | 130 | ||
106 | void Security::accept() | 131 | void Security::accept() |
107 | { | 132 | { |
108 | applySecurity(); | 133 | applySecurity(); |
109 | QDialog::accept(); | 134 | QDialog::accept(); |
110 | } | 135 | } |
111 | 136 | ||
112 | void Security::done(int r) | 137 | void Security::done(int r) |
113 | { | 138 | { |
114 | QDialog::done(r); | 139 | QDialog::done(r); |
115 | close(); | 140 | close(); |
116 | } | 141 | } |
117 | 142 | ||
118 | void Security::selectNet(int auth_peer,int auth_peer_bits) | 143 | void Security::selectNet(int auth_peer,int auth_peer_bits) |
119 | { | 144 | { |
120 | QString sn; | 145 | QString sn; |
121 | if ( auth_peer_bits == 0 && auth_peer == 0 ) { | 146 | if ( auth_peer_bits == 0 && auth_peer == 0 ) { |
122 | sn = tr("Any"); | 147 | sn = tr("Any"); |
123 | } else if ( auth_peer_bits == 32 && auth_peer == 0 ) { | 148 | } else if ( auth_peer_bits == 32 && auth_peer == 0 ) { |
124 | sn = tr("None"); | 149 | sn = tr("None"); |
125 | } else { | 150 | } else { |
126 | sn = | 151 | sn = |
127 | QString::number((auth_peer>>24)&0xff) + "." | 152 | QString::number((auth_peer>>24)&0xff) + "." |
128 | + QString::number((auth_peer>>16)&0xff) + "." | 153 | + QString::number((auth_peer>>16)&0xff) + "." |
129 | + QString::number((auth_peer>>8)&0xff) + "." | 154 | + QString::number((auth_peer>>8)&0xff) + "." |
130 | + QString::number((auth_peer>>0)&0xff) + "/" | 155 | + QString::number((auth_peer>>0)&0xff) + "/" |
131 | + QString::number(auth_peer_bits); | 156 | + QString::number(auth_peer_bits); |
132 | } | 157 | } |
133 | for (int i=0; i<syncnet->count(); i++) { | 158 | for (int i=0; i<syncnet->count(); i++) { |
134 | if ( syncnet->text(i).left(sn.length()) == sn ) { | 159 | if ( syncnet->text(i).left(sn.length()) == sn ) { |
135 | syncnet->setCurrentItem(i); | 160 | syncnet->setCurrentItem(i); |
136 | return; | 161 | return; |
137 | } | 162 | } |
138 | } | 163 | } |
139 | qDebug("No match for \"%s\"",sn.latin1()); | 164 | qDebug("No match for \"%s\"",sn.latin1()); |
140 | } | 165 | } |
141 | 166 | ||
142 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) | 167 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) |
143 | { | 168 | { |
144 | auth_peer=0; | 169 | auth_peer=0; |
145 | if ( sn == tr("Any") ) { | 170 | if ( sn == tr("Any") ) { |
146 | auth_peer = 0; | 171 | auth_peer = 0; |
147 | auth_peer_bits = 0; | 172 | auth_peer_bits = 0; |
148 | } else if ( sn == tr("None") ) { | 173 | } else if ( sn == tr("None") ) { |
149 | auth_peer = 0; | 174 | auth_peer = 0; |
150 | auth_peer_bits = 32; | 175 | auth_peer_bits = 32; |
151 | } else { | 176 | } else { |
152 | int x=0; | 177 | int x=0; |
153 | for (int i=0; i<4; i++) { | 178 | for (int i=0; i<4; i++) { |
154 | int nx = sn.find(QChar(i==3 ? '/' : '.'),x); | 179 | int nx = sn.find(QChar(i==3 ? '/' : '.'),x); |
155 | auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt(); | 180 | auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt(); |
156 | x = nx+1; | 181 | x = nx+1; |
157 | } | 182 | } |
158 | uint n = (uint)sn.find(' ',x)-x; | 183 | uint n = (uint)sn.find(' ',x)-x; |
159 | auth_peer_bits = sn.mid(x,n).toInt(); | 184 | auth_peer_bits = sn.mid(x,n).toInt(); |
160 | } | 185 | } |
161 | } | 186 | } |
162 | 187 | ||
188 | void Security::loadUsers ( void ) | ||
189 | { | ||
190 | QFile passwd("/etc/passwd"); | ||
191 | if ( passwd.open(IO_ReadOnly) ) { | ||
192 | QTextStream t( &passwd ); | ||
193 | QString s; | ||
194 | QStringList account; | ||
195 | while ( !t.eof() ) { | ||
196 | account = QStringList::split(':',t.readLine()); | ||
197 | |||
198 | // Hide disabled accounts | ||
199 | if (*account.at(1)!="*") { | ||
200 | |||
201 | userlist->insertItem(*account.at(0)); | ||
202 | // Highlight this item if it is set to autologinToggle | ||
203 | if ( *account.at(0) == autoLoginName) | ||
204 | userlist->setCurrentItem(userlist->count()-1); | ||
205 | } | ||
206 | } | ||
207 | passwd.close(); | ||
208 | } | ||
209 | |||
210 | } | ||
211 | void Security::toggleAutoLogin(bool val) | ||
212 | { | ||
213 | autoLogin=val; | ||
214 | userlist->setEnabled(val); | ||
215 | if (!autoLogin) | ||
216 | autoLoginName=userlist->currentText(); | ||
217 | } | ||
163 | void Security::setSyncNet(const QString& sn) | 218 | void Security::setSyncNet(const QString& sn) |
164 | { | 219 | { |
165 | int auth_peer,auth_peer_bits; | 220 | int auth_peer,auth_peer_bits; |
166 | parseNet(sn,auth_peer,auth_peer_bits); | 221 | parseNet(sn,auth_peer,auth_peer_bits); |
167 | selectNet(auth_peer,auth_peer_bits); | 222 | selectNet(auth_peer,auth_peer_bits); |
168 | } | 223 | } |
169 | 224 | ||
170 | void Security::applySecurity() | 225 | void Security::applySecurity() |
171 | { | 226 | { |
172 | if ( valid ) { | 227 | if ( valid ) { |
173 | Config cfg("Security"); | 228 | Config cfg("Security"); |
174 | cfg.setGroup("Passcode"); | 229 | cfg.setGroup("Passcode"); |
175 | cfg.writeEntry("passcode",passcode); | 230 | cfg.writeEntry("passcode",passcode); |
176 | cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); | 231 | cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); |
177 | cfg.setGroup("Sync"); | 232 | cfg.setGroup("Sync"); |
178 | int auth_peer=0; | 233 | int auth_peer=0; |
179 | int auth_peer_bits; | 234 | int auth_peer_bits; |
180 | QString sn = syncnet->currentText(); | 235 | QString sn = syncnet->currentText(); |
181 | parseNet(sn,auth_peer,auth_peer_bits); | 236 | parseNet(sn,auth_peer,auth_peer_bits); |
182 | cfg.writeEntry("auth_peer",auth_peer); | 237 | cfg.writeEntry("auth_peer",auth_peer); |
183 | cfg.writeEntry("auth_peer_bits",auth_peer_bits); | 238 | cfg.writeEntry("auth_peer_bits",auth_peer_bits); |
184 | /* | 239 | /* |
185 | cfg.setGroup("Remote"); | 240 | cfg.setGroup("Remote"); |
186 | if ( telnetAvailable() ) | 241 | if ( telnetAvailable() ) |
187 | cfg.writeEntry("allow_telnet",telnet->isChecked()); | 242 | cfg.writeEntry("allow_telnet",telnet->isChecked()); |
188 | if ( sshAvailable() ) | 243 | if ( sshAvailable() ) |
189 | cfg.writeEntry("allow_ssh",ssh->isChecked()); | 244 | cfg.writeEntry("allow_ssh",ssh->isChecked()); |
190 | // ### write ssh/telnet sys config files | 245 | // ### write ssh/telnet sys config files |
191 | */ | 246 | */ |
247 | |||
248 | QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; | ||
249 | Config loginCfg(configFile,Config::File); | ||
250 | loginCfg.setGroup("General"); | ||
251 | |||
252 | if (autoLogin) { | ||
253 | loginCfg.writeEntry("AutoLogin",autoLoginName); | ||
254 | } else { | ||
255 | loginCfg.removeEntry("AutoLogin"); | ||
256 | } | ||
257 | |||
192 | } | 258 | } |
193 | } | 259 | } |
194 | 260 | ||
261 | void Security::changeLoginName( int idx ) | ||
262 | { | ||
263 | autoLoginName = userlist->text(idx);; | ||
264 | updateGUI(); | ||
265 | } | ||
266 | |||
195 | void Security::changePassCode() | 267 | void Security::changePassCode() |
196 | { | 268 | { |
197 | QString new1; | 269 | QString new1; |
198 | QString new2; | 270 | QString new2; |
199 | 271 | ||
200 | do { | 272 | do { |
201 | new1 = enterPassCode(tr("Enter new passcode")); | 273 | new1 = enterPassCode(tr("Enter new passcode")); |
202 | if ( new1.isNull() ) | 274 | if ( new1.isNull() ) |
203 | return; | 275 | return; |
204 | new2 = enterPassCode(tr("Re-enter new passcode")); | 276 | new2 = enterPassCode(tr("Re-enter new passcode")); |
205 | if ( new2.isNull() ) | 277 | if ( new2.isNull() ) |
206 | return; | 278 | return; |
207 | } while (new1 != new2); | 279 | } while (new1 != new2); |
208 | 280 | ||
209 | passcode = new1; | 281 | passcode = new1; |
210 | updateGUI(); | 282 | updateGUI(); |
211 | } | 283 | } |
212 | 284 | ||
213 | void Security::clearPassCode() | 285 | void Security::clearPassCode() |
214 | { | 286 | { |
215 | passcode = QString::null; | 287 | passcode = QString::null; |
216 | updateGUI(); | 288 | updateGUI(); |
217 | } | 289 | } |
218 | 290 | ||
219 | 291 | ||
220 | QString Security::enterPassCode(const QString& prompt) | 292 | QString Security::enterPassCode(const QString& prompt) |
221 | { | 293 | { |
222 | return Password::getPassword(prompt); | 294 | return Password::getPassword(prompt); |
223 | } | 295 | } |
224 | 296 | ||
225 | bool Security::telnetAvailable() const | 297 | bool Security::telnetAvailable() const |
226 | { | 298 | { |
227 | // ### not implemented | 299 | // ### not implemented |
228 | return FALSE; | 300 | return FALSE; |
229 | } | 301 | } |
230 | 302 | ||
diff --git a/core/settings/security/security.h b/core/settings/security/security.h index efc83a2..2f18f91 100644 --- a/core/settings/security/security.h +++ b/core/settings/security/security.h | |||
@@ -22,43 +22,49 @@ | |||
22 | 22 | ||
23 | #include "securitybase.h" | 23 | #include "securitybase.h" |
24 | 24 | ||
25 | class QPEDialogListener; | 25 | class QPEDialogListener; |
26 | 26 | ||
27 | class Security : public SecurityBase | 27 | class Security : public SecurityBase |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | 30 | ||
31 | public: | 31 | public: |
32 | Security( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 32 | Security( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
33 | ~Security(); | 33 | ~Security(); |
34 | 34 | ||
35 | void show(); | 35 | void show(); |
36 | 36 | ||
37 | protected: | 37 | protected: |
38 | void accept(); | 38 | void accept(); |
39 | void applySecurity(); | 39 | void applySecurity(); |
40 | void done(int); | 40 | void done(int); |
41 | 41 | ||
42 | private slots: | 42 | private slots: |
43 | void changePassCode(); | 43 | void changePassCode(); |
44 | void clearPassCode(); | 44 | void clearPassCode(); |
45 | void setSyncNet(const QString&); | 45 | void setSyncNet(const QString&); |
46 | void changeLoginName(int); | ||
47 | void toggleAutoLogin(bool); | ||
48 | |||
46 | 49 | ||
47 | private: | 50 | private: |
51 | void loadUsers(void); | ||
48 | bool telnetAvailable() const; | 52 | bool telnetAvailable() const; |
49 | bool sshAvailable() const; | 53 | bool sshAvailable() const; |
50 | void updateGUI(); | 54 | void updateGUI(); |
51 | 55 | ||
52 | static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); | 56 | static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); |
53 | void selectNet(int auth_peer,int auth_peer_bits); | 57 | void selectNet(int auth_peer,int auth_peer_bits); |
54 | 58 | ||
55 | QString enterPassCode(const QString&); | 59 | QString enterPassCode(const QString&); |
56 | QString passcode; | 60 | QString passcode; |
57 | bool valid; | 61 | bool valid; |
62 | bool autoLogin; | ||
63 | QString autoLoginName; | ||
58 | 64 | ||
59 | QPEDialogListener *dl; | 65 | QPEDialogListener *dl; |
60 | }; | 66 | }; |
61 | 67 | ||
62 | 68 | ||
63 | #endif // SECURITY_H | 69 | #endif // SECURITY_H |
64 | 70 | ||
diff --git a/core/settings/security/securitybase.ui b/core/settings/security/securitybase.ui index c2a8953..da25f39 100644 --- a/core/settings/security/securitybase.ui +++ b/core/settings/security/securitybase.ui | |||
@@ -1,215 +1,412 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>SecurityBase</class> | 2 | <class>SecurityBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>SecurityBase</cstring> | 7 | <cstring>SecurityBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>277</width> | 14 | <width>329</width> |
15 | <height>328</height> | 15 | <height>483</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Security Settings</string> | 20 | <string>Security Settings</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>3</number> | 31 | <number>0</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>0</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="0" > | 37 | <widget> |
38 | <class>QLayoutWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>Layout1</cstring> | 41 | <cstring>TabWidget2</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutSpacing</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <hbox> | 46 | <widget> |
47 | <property stdset="1"> | 47 | <class>QWidget</class> |
48 | <name>margin</name> | ||
49 | <number>0</number> | ||
50 | </property> | ||
51 | <property stdset="1"> | 48 | <property stdset="1"> |
52 | <name>spacing</name> | 49 | <name>name</name> |
53 | <number>-1</number> | 50 | <cstring>tab</cstring> |
54 | </property> | 51 | </property> |
55 | <widget> | 52 | <attribute> |
56 | <class>QPushButton</class> | 53 | <name>title</name> |
54 | <string>Passcode</string> | ||
55 | </attribute> | ||
56 | <vbox> | ||
57 | <property stdset="1"> | 57 | <property stdset="1"> |
58 | <name>name</name> | 58 | <name>margin</name> |
59 | <cstring>changepasscode</cstring> | 59 | <number>6</number> |
60 | </property> | 60 | </property> |
61 | <property stdset="1"> | 61 | <property stdset="1"> |
62 | <name>text</name> | 62 | <name>spacing</name> |
63 | <string>Change passcode</string> | 63 | <number>6</number> |
64 | </property> | 64 | </property> |
65 | </widget> | 65 | <widget> |
66 | <widget> | 66 | <class>QGroupBox</class> |
67 | <class>QPushButton</class> | 67 | <property stdset="1"> |
68 | <name>name</name> | ||
69 | <cstring>GroupBox4</cstring> | ||
70 | </property> | ||
71 | <property stdset="1"> | ||
72 | <name>title</name> | ||
73 | <string>Passcode</string> | ||
74 | </property> | ||
75 | <vbox> | ||
76 | <property stdset="1"> | ||
77 | <name>margin</name> | ||
78 | <number>11</number> | ||
79 | </property> | ||
80 | <property stdset="1"> | ||
81 | <name>spacing</name> | ||
82 | <number>6</number> | ||
83 | </property> | ||
84 | <widget> | ||
85 | <class>QLayoutWidget</class> | ||
86 | <property stdset="1"> | ||
87 | <name>name</name> | ||
88 | <cstring>Layout1</cstring> | ||
89 | </property> | ||
90 | <property> | ||
91 | <name>layoutSpacing</name> | ||
92 | </property> | ||
93 | <hbox> | ||
94 | <property stdset="1"> | ||
95 | <name>margin</name> | ||
96 | <number>0</number> | ||
97 | </property> | ||
98 | <property stdset="1"> | ||
99 | <name>spacing</name> | ||
100 | <number>-1</number> | ||
101 | </property> | ||
102 | <widget> | ||
103 | <class>QPushButton</class> | ||
104 | <property stdset="1"> | ||
105 | <name>name</name> | ||
106 | <cstring>changepasscode</cstring> | ||
107 | </property> | ||
108 | <property stdset="1"> | ||
109 | <name>text</name> | ||
110 | <string>Change passcode</string> | ||
111 | </property> | ||
112 | </widget> | ||
113 | <widget> | ||
114 | <class>QPushButton</class> | ||
115 | <property stdset="1"> | ||
116 | <name>name</name> | ||
117 | <cstring>clearpasscode</cstring> | ||
118 | </property> | ||
119 | <property stdset="1"> | ||
120 | <name>text</name> | ||
121 | <string>Clear passcode</string> | ||
122 | </property> | ||
123 | </widget> | ||
124 | </hbox> | ||
125 | </widget> | ||
126 | <widget> | ||
127 | <class>QCheckBox</class> | ||
128 | <property stdset="1"> | ||
129 | <name>name</name> | ||
130 | <cstring>passcode_poweron</cstring> | ||
131 | </property> | ||
132 | <property stdset="1"> | ||
133 | <name>text</name> | ||
134 | <string>Require pass code at power-on</string> | ||
135 | </property> | ||
136 | </widget> | ||
137 | <widget> | ||
138 | <class>QLabel</class> | ||
139 | <property stdset="1"> | ||
140 | <name>name</name> | ||
141 | <cstring>TextLabel1</cstring> | ||
142 | </property> | ||
143 | <property stdset="1"> | ||
144 | <name>sizePolicy</name> | ||
145 | <sizepolicy> | ||
146 | <hsizetype>5</hsizetype> | ||
147 | <vsizetype>7</vsizetype> | ||
148 | </sizepolicy> | ||
149 | </property> | ||
150 | <property stdset="1"> | ||
151 | <name>text</name> | ||
152 | <string><P>Pass code protection provides a minimal level of protection from casual access to this device.</string> | ||
153 | </property> | ||
154 | <property stdset="1"> | ||
155 | <name>textFormat</name> | ||
156 | <enum>RichText</enum> | ||
157 | </property> | ||
158 | <property stdset="1"> | ||
159 | <name>alignment</name> | ||
160 | <set>AlignTop|AlignLeft</set> | ||
161 | </property> | ||
162 | <property> | ||
163 | <name>vAlign</name> | ||
164 | </property> | ||
165 | </widget> | ||
166 | </vbox> | ||
167 | </widget> | ||
168 | <spacer> | ||
169 | <property> | ||
170 | <name>name</name> | ||
171 | <cstring>Spacer3</cstring> | ||
172 | </property> | ||
173 | <property stdset="1"> | ||
174 | <name>orientation</name> | ||
175 | <enum>Vertical</enum> | ||
176 | </property> | ||
177 | <property stdset="1"> | ||
178 | <name>sizeType</name> | ||
179 | <enum>Expanding</enum> | ||
180 | </property> | ||
181 | <property> | ||
182 | <name>sizeHint</name> | ||
183 | <size> | ||
184 | <width>20</width> | ||
185 | <height>20</height> | ||
186 | </size> | ||
187 | </property> | ||
188 | </spacer> | ||
189 | </vbox> | ||
190 | </widget> | ||
191 | <widget> | ||
192 | <class>QWidget</class> | ||
193 | <property stdset="1"> | ||
194 | <name>name</name> | ||
195 | <cstring>tab</cstring> | ||
196 | </property> | ||
197 | <attribute> | ||
198 | <name>title</name> | ||
199 | <string>Login</string> | ||
200 | </attribute> | ||
201 | <vbox> | ||
68 | <property stdset="1"> | 202 | <property stdset="1"> |
69 | <name>name</name> | 203 | <name>margin</name> |
70 | <cstring>clearpasscode</cstring> | 204 | <number>6</number> |
71 | </property> | 205 | </property> |
72 | <property stdset="1"> | 206 | <property stdset="1"> |
73 | <name>text</name> | 207 | <name>spacing</name> |
74 | <string>Clear passcode</string> | 208 | <number>6</number> |
75 | </property> | 209 | </property> |
76 | </widget> | 210 | <widget> |
77 | </hbox> | 211 | <class>QGroupBox</class> |
78 | </widget> | 212 | <property stdset="1"> |
79 | <widget row="1" column="0" > | 213 | <name>name</name> |
80 | <class>QCheckBox</class> | 214 | <cstring>GroupBox3</cstring> |
81 | <property stdset="1"> | 215 | </property> |
82 | <name>name</name> | 216 | <property stdset="1"> |
83 | <cstring>passcode_poweron</cstring> | 217 | <name>title</name> |
84 | </property> | 218 | <string>Login</string> |
85 | <property stdset="1"> | 219 | </property> |
86 | <name>text</name> | 220 | <vbox> |
87 | <string>Require pass code at power-on</string> | 221 | <property stdset="1"> |
88 | </property> | 222 | <name>margin</name> |
89 | </widget> | 223 | <number>11</number> |
90 | <widget row="3" column="0" > | 224 | </property> |
91 | <class>QTabWidget</class> | 225 | <property stdset="1"> |
92 | <property stdset="1"> | 226 | <name>spacing</name> |
93 | <name>name</name> | 227 | <number>6</number> |
94 | <cstring>TabWidget2</cstring> | 228 | </property> |
95 | </property> | 229 | <widget> |
230 | <class>QCheckBox</class> | ||
231 | <property stdset="1"> | ||
232 | <name>name</name> | ||
233 | <cstring>autologinToggle</cstring> | ||
234 | </property> | ||
235 | <property stdset="1"> | ||
236 | <name>text</name> | ||
237 | <string>Login Automatically</string> | ||
238 | </property> | ||
239 | </widget> | ||
240 | <widget> | ||
241 | <class>QComboBox</class> | ||
242 | <property stdset="1"> | ||
243 | <name>name</name> | ||
244 | <cstring>userlist</cstring> | ||
245 | </property> | ||
246 | </widget> | ||
247 | </vbox> | ||
248 | </widget> | ||
249 | <spacer> | ||
250 | <property> | ||
251 | <name>name</name> | ||
252 | <cstring>Spacer2</cstring> | ||
253 | </property> | ||
254 | <property stdset="1"> | ||
255 | <name>orientation</name> | ||
256 | <enum>Vertical</enum> | ||
257 | </property> | ||
258 | <property stdset="1"> | ||
259 | <name>sizeType</name> | ||
260 | <enum>Expanding</enum> | ||
261 | </property> | ||
262 | <property> | ||
263 | <name>sizeHint</name> | ||
264 | <size> | ||
265 | <width>20</width> | ||
266 | <height>20</height> | ||
267 | </size> | ||
268 | </property> | ||
269 | </spacer> | ||
270 | </vbox> | ||
271 | </widget> | ||
96 | <widget> | 272 | <widget> |
97 | <class>QWidget</class> | 273 | <class>QWidget</class> |
98 | <property stdset="1"> | 274 | <property stdset="1"> |
99 | <name>name</name> | 275 | <name>name</name> |
100 | <cstring>tab</cstring> | 276 | <cstring>tab</cstring> |
101 | </property> | 277 | </property> |
102 | <attribute> | 278 | <attribute> |
103 | <name>title</name> | 279 | <name>title</name> |
104 | <string>Sync</string> | 280 | <string>Sync</string> |
105 | </attribute> | 281 | </attribute> |
106 | <vbox> | 282 | <vbox> |
107 | <property stdset="1"> | 283 | <property stdset="1"> |
108 | <name>margin</name> | 284 | <name>margin</name> |
109 | <number>11</number> | 285 | <number>6</number> |
110 | </property> | 286 | </property> |
111 | <property stdset="1"> | 287 | <property stdset="1"> |
112 | <name>spacing</name> | 288 | <name>spacing</name> |
113 | <number>6</number> | 289 | <number>6</number> |
114 | </property> | 290 | </property> |
115 | <widget> | 291 | <widget> |
116 | <class>QLabel</class> | 292 | <class>QGroupBox</class> |
117 | <property stdset="1"> | 293 | <property stdset="1"> |
118 | <name>name</name> | 294 | <name>name</name> |
119 | <cstring>TextLabel1_2</cstring> | 295 | <cstring>GroupBox2</cstring> |
120 | </property> | 296 | </property> |
121 | <property stdset="1"> | 297 | <property stdset="1"> |
122 | <name>text</name> | 298 | <name>title</name> |
123 | <string>Accept sync from network:</string> | 299 | <string>Sync</string> |
124 | </property> | 300 | </property> |
125 | </widget> | 301 | <vbox> |
126 | <widget> | 302 | <property stdset="1"> |
127 | <class>QComboBox</class> | 303 | <name>margin</name> |
128 | <item> | 304 | <number>11</number> |
129 | <property> | ||
130 | <name>text</name> | ||
131 | <string>192.168.129.0/24 (default)</string> | ||
132 | </property> | ||
133 | </item> | ||
134 | <item> | ||
135 | <property> | ||
136 | <name>text</name> | ||
137 | <string>192.168.1.0/24</string> | ||
138 | </property> | ||
139 | </item> | ||
140 | <item> | ||
141 | <property> | ||
142 | <name>text</name> | ||
143 | <string>192.168.0.0/16</string> | ||
144 | </property> | ||
145 | </item> | ||
146 | <item> | ||
147 | <property> | ||
148 | <name>text</name> | ||
149 | <string>172.16.0.0/12</string> | ||
150 | </property> | ||
151 | </item> | ||
152 | <item> | ||
153 | <property> | ||
154 | <name>text</name> | ||
155 | <string>10.0.0.0/8</string> | ||
156 | </property> | ||
157 | </item> | ||
158 | <item> | ||
159 | <property> | ||
160 | <name>text</name> | ||
161 | <string>1.0.0.0/8</string> | ||
162 | </property> | 305 | </property> |
163 | </item> | 306 | <property stdset="1"> |
164 | <item> | 307 | <name>spacing</name> |
165 | <property> | 308 | <number>6</number> |
166 | <name>text</name> | ||
167 | <string>Any</string> | ||
168 | </property> | 309 | </property> |
169 | </item> | 310 | <widget> |
170 | <item> | 311 | <class>QLabel</class> |
171 | <property> | 312 | <property stdset="1"> |
172 | <name>text</name> | 313 | <name>name</name> |
173 | <string>None</string> | 314 | <cstring>TextLabel1_2</cstring> |
174 | </property> | 315 | </property> |
175 | </item> | 316 | <property stdset="1"> |
176 | <property stdset="1"> | 317 | <name>text</name> |
318 | <string>Accept sync from network:</string> | ||
319 | </property> | ||
320 | <property stdset="1"> | ||
321 | <name>textFormat</name> | ||
322 | <enum>RichText</enum> | ||
323 | </property> | ||
324 | </widget> | ||
325 | <widget> | ||
326 | <class>QComboBox</class> | ||
327 | <item> | ||
328 | <property> | ||
329 | <name>text</name> | ||
330 | <string>192.168.129.0/24 (default)</string> | ||
331 | </property> | ||
332 | </item> | ||
333 | <item> | ||
334 | <property> | ||
335 | <name>text</name> | ||
336 | <string>192.168.1.0/24</string> | ||
337 | </property> | ||
338 | </item> | ||
339 | <item> | ||
340 | <property> | ||
341 | <name>text</name> | ||
342 | <string>192.168.0.0/16</string> | ||
343 | </property> | ||
344 | </item> | ||
345 | <item> | ||
346 | <property> | ||
347 | <name>text</name> | ||
348 | <string>172.16.0.0/12</string> | ||
349 | </property> | ||
350 | </item> | ||
351 | <item> | ||
352 | <property> | ||
353 | <name>text</name> | ||
354 | <string>10.0.0.0/8</string> | ||
355 | </property> | ||
356 | </item> | ||
357 | <item> | ||
358 | <property> | ||
359 | <name>text</name> | ||
360 | <string>1.0.0.0/8</string> | ||
361 | </property> | ||
362 | </item> | ||
363 | <item> | ||
364 | <property> | ||
365 | <name>text</name> | ||
366 | <string>Any</string> | ||
367 | </property> | ||
368 | </item> | ||
369 | <item> | ||
370 | <property> | ||
371 | <name>text</name> | ||
372 | <string>None</string> | ||
373 | </property> | ||
374 | </item> | ||
375 | <property stdset="1"> | ||
376 | <name>name</name> | ||
377 | <cstring>syncnet</cstring> | ||
378 | </property> | ||
379 | <property stdset="1"> | ||
380 | <name>editable</name> | ||
381 | <bool>true</bool> | ||
382 | </property> | ||
383 | </widget> | ||
384 | </vbox> | ||
385 | </widget> | ||
386 | <spacer> | ||
387 | <property> | ||
177 | <name>name</name> | 388 | <name>name</name> |
178 | <cstring>syncnet</cstring> | 389 | <cstring>Spacer1</cstring> |
179 | </property> | 390 | </property> |
180 | <property stdset="1"> | 391 | <property stdset="1"> |
181 | <name>editable</name> | 392 | <name>orientation</name> |
182 | <bool>true</bool> | 393 | <enum>Vertical</enum> |
183 | </property> | 394 | </property> |
184 | </widget> | 395 | <property stdset="1"> |
396 | <name>sizeType</name> | ||
397 | <enum>Expanding</enum> | ||
398 | </property> | ||
399 | <property> | ||
400 | <name>sizeHint</name> | ||
401 | <size> | ||
402 | <width>20</width> | ||
403 | <height>20</height> | ||
404 | </size> | ||
405 | </property> | ||
406 | </spacer> | ||
185 | </vbox> | 407 | </vbox> |
186 | </widget> | 408 | </widget> |
187 | </widget> | 409 | </widget> |
188 | <widget row="2" column="0" > | 410 | </vbox> |
189 | <class>QLabel</class> | ||
190 | <property stdset="1"> | ||
191 | <name>name</name> | ||
192 | <cstring>TextLabel1</cstring> | ||
193 | </property> | ||
194 | <property stdset="1"> | ||
195 | <name>sizePolicy</name> | ||
196 | <sizepolicy> | ||
197 | <hsizetype>5</hsizetype> | ||
198 | <vsizetype>7</vsizetype> | ||
199 | </sizepolicy> | ||
200 | </property> | ||
201 | <property stdset="1"> | ||
202 | <name>text</name> | ||
203 | <string><P>Pass code protection provides a minimal level of protection from casual access to this device.</string> | ||
204 | </property> | ||
205 | <property stdset="1"> | ||
206 | <name>alignment</name> | ||
207 | <set>AlignTop|AlignLeft</set> | ||
208 | </property> | ||
209 | <property> | ||
210 | <name>vAlign</name> | ||
211 | </property> | ||
212 | </widget> | ||
213 | </grid> | ||
214 | </widget> | 411 | </widget> |
215 | </UI> | 412 | </UI> |