Changeset View
Changeset View
Standalone View
Standalone View
greeter/authenticator.cpp
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | 237 | case ConvGetBinary: | |||
---|---|---|---|---|---|
238 | if (!GRecvArr( &arr )) | 238 | if (!GRecvArr( &arr )) | ||
239 | break; | 239 | break; | ||
240 | // FIXME: not supported | 240 | // FIXME: not supported | ||
241 | cantCheck(); | 241 | cantCheck(); | ||
242 | if (arr) | 242 | if (arr) | ||
243 | ::free( arr ); | 243 | ::free( arr ); | ||
244 | return; | 244 | return; | ||
245 | case ConvGetNormal: | 245 | case ConvGetNormal: | ||
246 | if (!GRecvArr( &arr )) | | |||
247 | break; | | |||
248 | GSendStr(m_password.toUtf8().constData()); | | |||
249 | if (!m_password.isEmpty()) { | | |||
250 | // IsSecret | | |||
251 | GSendInt(1); | | |||
252 | } | | |||
253 | if (arr) | | |||
254 | ::free( arr ); | | |||
255 | return; | | |||
256 | case ConvGetHidden: | 246 | case ConvGetHidden: | ||
247 | { | ||||
257 | if (!GRecvArr( &arr )) | 248 | if (!GRecvArr( &arr )) | ||
258 | break; | 249 | break; | ||
259 | GSendStr(m_password.toUtf8().constData()); | 250 | QByteArray utf8pass = m_password.toUtf8(); | ||
260 | if (!m_password.isEmpty()) { | 251 | GSendStr(utf8pass.constData()); | ||
261 | // IsSecret | 252 | if (utf8pass.constData() != nullptr) | ||
262 | GSendInt(1); | 253 | GSendInt(IsPassword); | ||
263 | } | 254 | | ||
264 | if (arr) | 255 | if (arr) | ||
265 | ::free( arr ); | 256 | ::free( arr ); | ||
266 | return; | 257 | return; | ||
258 | } | ||||
267 | case ConvPutInfo: | 259 | case ConvPutInfo: | ||
268 | if (!GRecvArr( &arr )) | 260 | if (!GRecvArr( &arr )) | ||
269 | break; | 261 | break; | ||
270 | emit message(QString::fromLocal8Bit(arr)); | 262 | emit message(QString::fromLocal8Bit(arr)); | ||
271 | ::free( arr ); | 263 | ::free( arr ); | ||
272 | return; | 264 | return; | ||
273 | case ConvPutError: | 265 | case ConvPutError: | ||
274 | if (!GRecvArr( &arr )) | 266 | if (!GRecvArr( &arr )) | ||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |