{"action":"created","issue":{"url":"https://api.github.com/repos/sddm/sddm/issues/776","repository_url":"https://api.github.com/repos/sddm/sddm","labels_url":"https://api.github.com/repos/sddm/sddm/issues/776/labels{/name}","comments_url":"https://api.github.com/repos/sddm/sddm/issues/776/comments","events_url":"https://api.github.com/repos/sddm/sddm/issues/776/events","html_url":"https://github.com/sddm/sddm/pull/776","id":207459175,"number":776,"title":"Support for expired password in greeter and pam backend (#472)","user":{"login":"hoehnth","id":25502087,"avatar_url":"https://avatars1.githubusercontent.com/u/25502087?v=4","gravatar_id":"","url":"https://api.github.com/users/hoehnth","html_url":"https://github.com/hoehnth","followers_url":"https://api.github.com/users/hoehnth/followers","following_url":"https://api.github.com/users/hoehnth/following{/other_user}","gists_url":"https://api.github.com/users/hoehnth/gists{/gist_id}","starred_url":"https://api.github.com/users/hoehnth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoehnth/subscriptions","organizations_url":"https://api.github.com/users/hoehnth/orgs","repos_url":"https://api.github.com/users/hoehnth/repos","events_url":"https://api.github.com/users/hoehnth/events{/privacy}","received_events_url":"https://api.github.com/users/hoehnth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-14T09:21:39Z","updated_at":"2017-09-11T13:13:29Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/sddm/sddm/pulls/776","html_url":"https://github.com/sddm/sddm/pull/776","diff_url":"https://github.com/sddm/sddm/pull/776.diff","patch_url":"https://github.com/sddm/sddm/pull/776.patch"},"body":"hi folks,\r\n\r\nbecause we required the feature here urgently, i have implemented password renewal for expired passwords in sddm (solves issue #472).\r\ni tried to follow the sddm concept, and propagate the pam conversation and user responses through backend/daemon/greeter forth and back.\r\ntwo new components for password renewal (PasswordRenewal.qml, PasswordConnections.qml), some new signals and Main.qml properties were added.\r\npassword renewal dialog may need some polishing (i'm not good at it). have prepared the sddm stock themes for pwd renewal. to include the feature in new themes is simple.\r\nwould be great if someone can review and the changes prove useful.\r\nif the changes in the branch are too large to digest in one piece i could divide it into smaller chunks as separate pull requests. but this would take some more time.\r\n\r\nimplementation notes:\r\n\r\nfirst i considered to handle password renewal directly in greeter (via Auth.cpp), because Auth is prepared for qml interaction.\r\nbut this would interrupt the pam conversation in the backend (which handles user session with e.g. special group permissions).\r\nso i decided to route pam conversation through all the separate procs: backend, daemon, greeter (and intermediate sockets) like for loginFailed message.\r\ndrawback: new password is exposed in ram on its way propagated through greeter, daemon, helper, (pam) backend and sockets. may need clear pwd in all those destructors.\r\nthen instead of sending back a complete request with user responses to backend i decided to just propagate the new password back to keep it simple.\r\ncurrently the password changing conversation with greeter is prepared only for requests with AuthPrompt.CHANGE_NEW, CHANGE_REPEAT, CHANGE_CURRENT prompts.\r\nand i tested only for pam backend. password backend should also work but not used so far.\r\ni separated Request and Prompt and its stream operators out of AuthMessages into AuthBase.\r\nthis is convenient for request/response transport between (pam) backend and GreeterProxy (via SocketServer).\r\n\r\nregards,\r\nthomas\r\n\r\ndone:\r\n- PasswordRenewal dialog\r\n- pam conversation transport between pam backend and greeter\r\n- sddm stock themes prepared for password renewal (builtin maui, elarun, maldives) \r\n\r\ntodo:\r\n- password renewal on multiple screens\r\n- readme: how to use password renewal in new themes\r\n- (docu: pam_conv message flow in pam backend/helper/daemon/greeter)\r\n\r\nqml notes:\r\n\r\n- signals from daemon:\r\npamConvMsg(pam_msg) - provides infos/errors from (pam) backend conversation to present them to user in a info area\r\npamRequest() - new request from (pam) backend, user response required\r\n\r\n- new property:\r\nrequest (type AuthRequest) - prompts from (pam) backend with messages from pam_conv\r\n\r\n- response for backend:\r\nsddm.pamResponse(password) - send password response to (pam) backend, i.e. pam_conv\r\nsddm.cancelPamConv() - cancel pam conversation\r\n\r\n- new components:\r\nPasswordRenewal.qml - dialog for password input and confirmation, may need some polishing\r\nPasswordConnections.qml - hides the signal handling for password renewal dialog for Main.qml\r\n"},"comment":{"url":"https://api.github.com/repos/sddm/sddm/issues/comments/328524897","html_url":"https://github.com/sddm/sddm/pull/776#issuecomment-328524897","issue_url":"https://api.github.com/repos/sddm/sddm/issues/776","id":328524897,"user":{"login":"hoehnth","id":25502087,"avatar_url":"https://avatars1.githubusercontent.com/u/25502087?v=4","gravatar_id":"","url":"https://api.github.com/users/hoehnth","html_url":"https://github.com/hoehnth","followers_url":"https://api.github.com/users/hoehnth/followers","following_url":"https://api.github.com/users/hoehnth/following{/other_user}","gists_url":"https://api.github.com/users/hoehnth/gists{/gist_id}","starred_url":"https://api.github.com/users/hoehnth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoehnth/subscriptions","organizations_url":"https://api.github.com/users/hoehnth/orgs","repos_url":"https://api.github.com/users/hoehnth/repos","events_url":"https://api.github.com/users/hoehnth/events{/privacy}","received_events_url":"https://api.github.com/users/hoehnth/received_events","type":"User","site_admin":false},"created_at":"2017-09-11T13:13:29Z","updated_at":"2017-09-11T13:13:29Z","author_association":"NONE","body":"hi david, please give me some time... i was going to answer your questions right next after testing here.\r\ni just wanted finish updating to new sddm version first.\r\n\r\nwell, you are right, with an old theme the (pam) backend just waits for a reply (from greeter) with my version. so not yet ready for merging (we dont have that problem with older themes so I didnt prepare yet). \r\n\r\nin current sddm version the password expired pam messages are just sent to greeter as login failure.\r\n\r\nin order to support older themes:\r\ngreeter can ask theme for a property (only set in new themes) and cancel pam conversation if not found. that would be easy to implement.\r\n\r\nbtw to expire user password, you can also use:\r\npasswd -e user"}}
{"actor":{"display_login":"hoehnth"}}