Merge lp:~wlxing/ecryptfs/lp1449253 into lp:ecryptfs

Proposed by Jason Xing
Status: Merged
Merge reported by: Tyler Hicks
Merged at revision: not available
Proposed branch: lp:~wlxing/ecryptfs/lp1449253
Merge into: lp:ecryptfs
Diff against target: 42 lines (+16/-1)
2 files modified
doc/manpage/ecryptfs-mount-private.1 (+3/-1)
src/utils/ecryptfs-mount-private (+13/-0)
To merge this branch: bzr merge lp:~wlxing/ecryptfs/lp1449253
Reviewer Review Type Date Requested Status
Tyler Hicks Approve
Jason Xing (community) Needs Resubmitting
Review via email: mp+325310@code.launchpad.net

Description of the change

* Fix "ecryptfs-mount-private -h requests password instead of printing short usage message". if user add parameters to ecryptfs-mount-private, it will print the usage information.
* Also, update the manpage for ecryptfs-mount-private

To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for the patch!

Just a few nitpicks:

1) Please remove the initial newline in the echo command

2) There shouldn't be a newline after "usage:"

3) The test for $1 being not zero length isn't technically correct. Try this
   command to see why:

   $ ecryptfs-mount-private "" -h

   I think this is the test that you want:

   if [ "$#" -ne 0 ]; then
   ...

Thanks!

review: Needs Fixing
lp:~wlxing/ecryptfs/lp1449253 updated
889. By Jason Xing

src/utils/ecryptfs-mount-private, doc/manpage/ecryptfs-mount-private.1: ecryptfs-mount-private -h prints short usage message (LP: #1449253)

Revision history for this message
Jason Xing (wlxing) wrote :

Thanks for your instructions!!!

I tested it as you said. It requests the passphrase not prompts user usage information. But your code is what I want! Thanks again!

review: Needs Resubmitting
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Looks good to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'doc/manpage/ecryptfs-mount-private.1'
--- doc/manpage/ecryptfs-mount-private.1 2013-01-24 22:34:19 +0000
+++ doc/manpage/ecryptfs-mount-private.1 2017-06-08 15:12:34 +0000
@@ -3,11 +3,13 @@
3ecryptfs-mount-private \- interactive eCryptfs private mount wrapper script.3ecryptfs-mount-private \- interactive eCryptfs private mount wrapper script.
44
5.SH SYNOPSIS5.SH SYNOPSIS
6\fBecryptfs-mount-private\fP6\fBecryptfs-mount-private\fP [\-h|\-\-help]
77
8.SH DESCRIPTION8.SH DESCRIPTION
9\fBecryptfs-mount-private\fP is a wrapper script for the \fBmount.ecryptfs_private\fP utility that will interactively prompt for the user's login password, if necessary.9\fBecryptfs-mount-private\fP is a wrapper script for the \fBmount.ecryptfs_private\fP utility that will interactively prompt for the user's login password, if necessary.
1010
11The only valid options are \-h or \-\-help. If specified, the usage information will be printed.
12
11.SH FILES13.SH FILES
12\fI~/.Private\fP - underlying directory containing encrypted data14\fI~/.Private\fP - underlying directory containing encrypted data
1315
1416
=== modified file 'src/utils/ecryptfs-mount-private'
--- src/utils/ecryptfs-mount-private 2011-12-13 20:51:40 +0000
+++ src/utils/ecryptfs-mount-private 2017-06-08 15:12:34 +0000
@@ -18,6 +18,19 @@
18TEXTDOMAIN="ecryptfs-utils"18TEXTDOMAIN="ecryptfs-utils"
19MESSAGE=`gettext "Enter your login passphrase:"`19MESSAGE=`gettext "Enter your login passphrase:"`
2020
21usage() {
22echo "usage: ecryptfs-mount-private [OPTION]
23Interactive eCryptfs private mount wrapper.
24
25 -h, --help Show usage information
26"
27 exit 1;
28}
29
30if [ "$#" -ne 0 ]; then
31 usage
32fi
33
21if [ -f $HOME/.ecryptfs/wrapping-independent ]; then34if [ -f $HOME/.ecryptfs/wrapping-independent ]; then
22 # use a wrapping passphrase different from the login passphrase35 # use a wrapping passphrase different from the login passphrase
23 WRAPPING_PASS="INDEPENDENT"36 WRAPPING_PASS="INDEPENDENT"

Subscribers

People subscribed via source and target branches