Changeset View
Changeset View
Standalone View
Standalone View
greeter/authenticator.cpp
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Line(s) | 237 | case ConvGetBinary: | |||
---|---|---|---|---|---|
242 | if (arr) | 242 | if (arr) | ||
243 | ::free( arr ); | 243 | ::free( arr ); | ||
244 | return; | 244 | return; | ||
245 | case ConvGetNormal: | 245 | case ConvGetNormal: | ||
246 | case ConvGetHidden: | 246 | case ConvGetHidden: | ||
247 | { | 247 | { | ||
248 | if (!GRecvArr( &arr )) | 248 | if (!GRecvArr( &arr )) | ||
249 | break; | 249 | break; | ||
250 | | ||||
251 | if (m_password.isNull()) { | ||||
252 | GSendStr(nullptr); | ||||
253 | } else { | ||||
250 | QByteArray utf8pass = m_password.toUtf8(); | 254 | QByteArray utf8pass = m_password.toUtf8(); | ||
251 | GSendStr(utf8pass.constData()); | 255 | GSendStr(utf8pass.constData()); | ||
252 | if (utf8pass.constData() != nullptr) | | |||
253 | GSendInt(IsPassword); | 256 | GSendInt(IsPassword); | ||
257 | } | ||||
258 | | ||||
259 | m_password.clear(); | ||||
254 | 260 | | |||
255 | if (arr) | 261 | if (arr) | ||
256 | ::free( arr ); | 262 | ::free( arr ); | ||
257 | return; | 263 | return; | ||
258 | } | 264 | } | ||
259 | case ConvPutInfo: | 265 | case ConvPutInfo: | ||
260 | if (!GRecvArr( &arr )) | 266 | if (!GRecvArr( &arr )) | ||
261 | break; | 267 | break; | ||
Show All 11 Lines | 277 | case ConvPutAuthSucceeded: | |||
273 | return; | 279 | return; | ||
274 | case ConvPutAuthFailed: | 280 | case ConvPutAuthFailed: | ||
275 | emit failed(); | 281 | emit failed(); | ||
276 | return; | 282 | return; | ||
277 | case ConvPutAuthError: | 283 | case ConvPutAuthError: | ||
278 | cantCheck(); | 284 | cantCheck(); | ||
279 | return; | 285 | return; | ||
280 | case ConvPutAuthAbort: | 286 | case ConvPutAuthAbort: | ||
281 | // what to do here? | | |||
282 | return; | | |||
283 | case ConvPutReadyForAuthentication: | 287 | case ConvPutReadyForAuthentication: | ||
284 | m_ready = true; | 288 | m_ready = true; | ||
285 | if (m_mode == AuthenticationMode::Direct) { | 289 | if (m_mode == AuthenticationMode::Direct) { | ||
286 | ::kill(m_pid, SIGUSR1); | 290 | ::kill(m_pid, SIGUSR1); | ||
287 | } | 291 | } | ||
288 | return; | 292 | return; | ||
289 | } | 293 | } | ||
290 | } | 294 | } | ||
Show All 34 Lines |