Activity log for bug #1695767

Date Who What changed Old value New value Message
2017-06-04 19:12:04 Jason Xing bug added bug
2017-06-04 19:13:10 Jason Xing ecryptfs: assignee Jason Xing (wlxing)
2017-06-04 19:14:00 Jason Xing ecryptfs: status New Confirmed
2017-06-04 19:17:48 Jason Xing ecryptfs: status Confirmed In Progress
2017-06-05 05:50:20 Jason Xing summary ecryptfs-manager runs into dead loop if user doesn't install openssl and selects the third option ecryptfs-manager runs into infinite loop if user doesn't install openssl and selects the third option
2017-06-05 05:51:01 Jason Xing description Reproduce case: 1) User doesn't install openssl. 2) Run ecryptfs-manager and make selection 3. It goes in the dead loop...which means whatever selection you choose cannot end this command or alter your option. Details in code: Please look at src/libecryptfs/decision_graph.c From line 558 ti line 597 (see http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/libecryptfs/decision_graph.c#L558): It will prompt user to enter the selection which is set to "val" variable and then run into "else" portion instead of "if" portion. However, "node->num_transitions" which was set to zero before causes the terrible result (dead loop): it will skip for loop and test if the "valid_val" is 0. If not, go back to get_value part (line 558) and do it one more time. Reason: 1) User doesn't install openssl module. 2) The developers of ecryptfs-manager doesn't take such case into consideration. Quote from Tyler (see https://bugs.launchpad.net/ecryptfs/+bug/878239/comments/3): "> Option 3 allows to generate a new public/private key pair, but asks for > a key type without giving the slightest hint about what type choices > there are. That's because you don't have the OpenSSL key module installed. The ecryptfs-manager prompts should take this into account, but they don't. Please consider filing a separate bug about this." Because of that, I'm opening this bug report! Reproduce case: 1) User doesn't install openssl. 2) Run ecryptfs-manager and make selection 3. It goes in the infinite loop...which means whatever selection you choose cannot end this command or alter your option. Details in code: Please look at src/libecryptfs/decision_graph.c From line 558 ti line 597 (see http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/libecryptfs/decision_graph.c#L558): It will prompt user to enter the selection which is set to "val" variable and then run into "else" portion instead of "if" portion. However, "node->num_transitions" which was set to zero before causes the terrible result (infinite loop): it will skip for loop and test if the "valid_val" is 0. If not, go back to get_value part (line 558) and do it one more time. Reason: 1) User doesn't install openssl module. 2) The developers of ecryptfs-manager doesn't take such case into consideration. Quote from Tyler (see https://bugs.launchpad.net/ecryptfs/+bug/878239/comments/3): "> Option 3 allows to generate a new public/private key pair, but asks for > a key type without giving the slightest hint about what type choices > there are. That's because you don't have the OpenSSL key module installed. The ecryptfs-manager prompts should take this into account, but they don't. Please consider filing a separate bug about this." Because of that, I'm opening this bug report!
2017-06-05 06:31:23 Jason Xing branch linked lp:~wlxing/ecryptfs/lp1695767
2017-06-05 13:40:42 Jason Xing branch linked lp:~wlxing/ecryptfs/lp1695767
2017-06-05 14:34:13 Jason Xing attachment added original test outputs.txt https://bugs.launchpad.net/ecryptfs/+bug/1695767/+attachment/4889413/+files/original%20test%20outputs.txt
2017-06-05 14:35:47 Jason Xing attachment added outputs after fixing the bug.txt https://bugs.launchpad.net/ecryptfs/+bug/1695767/+attachment/4889414/+files/outputs%20after%20fixing%20the%20bug.txt
2017-06-08 00:20:40 Launchpad Janitor branch linked lp:ecryptfs
2017-06-08 00:23:26 Tyler Hicks ecryptfs: status In Progress Fix Committed
2017-06-08 00:32:43 Jason Xing ecryptfs: assignee Jason Xing (wlxing)