xlockmore/xlockmore-pam.patch
Ondřej Súkup f31aa276d3 Accepting request 491917 from home:sbrabec:branches:X11:Utilities
- Add a fix for double entering of password in non-English locales
  (boo#1035688, xlockmore-pam.patch).
- Update to version 5.53:
  * dclock fix for led bounce.
  * Install changes for fortune.
  * strange mode updates.
  * life3d updates.
  * messagefont fix.
  * Changed default message font.
  * spiral erase mode changed.
  * Fix for kumppa -speed 0.2.
  * new website at http://www.sillycycle.com
  * xmb fonts fix.
  * fixed xjack mode.
  * Updated language use.
- Refresh xlockmore-bitmaps.patch, xlockmore-ttf_dir.patch,
  xlockmore-extend-freetype-include-search.patch.
- Re-enable PAM (boo#1035688).
- Disable obsolete --enable-use-mb.

OBS-URL: https://build.opensuse.org/request/show/491917
OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/xlockmore?expand=0&rev=36
2017-05-03 18:12:33 +00:00

50 lines
1.7 KiB
Diff

This is more a hack than a correct fix.
Instead of hadcoded expecting of "Password" prompt as a first PAM query, just
expect that it asks for password (xlock hardcodes "Password" as a first query in
the GUI).
It will unbreak xlock with non-English locales, but it will still swallow the
first prompt from PAM. In most cases, it is just translated "Password" string,
but in some cases it can be a different question.
To fully fix the problem, GUI needs to be redone. Instead of hardcoded
"Password" prompt in the initial phase of authentication, get all prompts from
PAM.
Index: xlockmore-5.53/xlock/passwd.c
===================================================================
--- xlockmore-5.53.orig/xlock/passwd.c
+++ xlockmore-5.53/xlock/passwd.c
@@ -335,29 +335,19 @@ PAM_conv(int num_msg,
#ifdef DEBUG
(void) printf( " + Message style: PAM_PROMPT_ECHO_OFF\n" );
#endif
- if( strstr( msg[replies]->msg, "Password" ) == NULL ) {
- PAM_putText( msg[replies], &reply[replies], False );
- } else {
- reply[replies].resp = COPY_STRING(PAM_password);
- }
+ reply[replies].resp = COPY_STRING(PAM_password);
/* PAM frees resp */
break;
case PAM_TEXT_INFO:
#ifdef DEBUG
(void) printf( " + Message style: PAM_TEXT_INFO\n" );
#endif
- if( strstr( msg[replies]->msg, "Password" ) == NULL ) {
- PAM_putText( msg[replies], &reply[replies], False );
- }
/* PAM frees resp */
break;
case PAM_ERROR_MSG:
#ifdef DEBUG
(void) printf( " + Message style: PAM_ERROR_MSG\n" );
#endif
- if( strstr( msg[replies]->msg, "Password" ) == NULL ) {
- PAM_putText( msg[replies], &reply[replies], False );
- }
/* PAM frees resp */
break;
default: