~wlxing/ecryptfs/lp1695767

Viewing all changes in revision 888.

  • Committer: Jason Xing
  • Date: 2017-06-07 03:29:02 UTC
  • Revision ID: kerneljasonxing@gmail.com-20170607032902-fix721dkolv30omw
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 enter next cannot end this command or alter your option.

Explanation for the patch:
Adding several lines to take such a case into consideration, through testing whether "num_transitions" is set to zero or not we could prevent the infinite loop. If it is set to zero, it will return -EINVAL because "num_transitions" means how many options this command could show to users and zero means that user has no option to choose. (LP: #1695767)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: