plymouth ask-for-passphrase

Bug #887410 reported by Jay R. Wren on 2011-11-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Clint Byrum
Clint Byrum

Bug Description

/usr/share/apache2/ask-for-passphrase has some rediculous plymouth integration with no documentation on how to disable it.

Related branches

Steve Langasek (vorlon) on 2011-11-08
affects: plymouth (Ubuntu) → apache2 (Ubuntu)
Dave Walker (davewalker) on 2011-11-11
Changed in apache2 (Ubuntu):
importance: Undecided → Medium
Changed in apache2 (Ubuntu Precise):
milestone: none → precise-alpha-1
Dave Walker (davewalker) on 2011-11-18
Changed in apache2 (Ubuntu Precise):
assignee: nobody → Clint Byrum (clint-fewbar)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Jay, can you please explain what you expect to happen, and what actually happens?

The code is quite clear, if plymouth is running and available, we ask a question via plymouth's normal methods using the exact same prompt text that apache's internal passphrase module uses. If plymouth is not running anymore, we use the normal method that Apache uses which is to ask the question via the user's controlling terminal. If there is no way to ask the question, we exit with an error.

Changed in apache2 (Ubuntu Precise):
status: New → Incomplete
Revision history for this message
Jay R. Wren (evarlast) wrote :


I expect a prompt to be displayed to stdout and prompt for input on stdin. What actually happens is that I start apache via ssh and the prompt is displayed via plymouth on the server's console which I rarely see.

It would be nice if the check was not just "if plymouth is running and available" but instead "if plymouth is running and available and the request was from a tty on which plymouth can prompt a request". Or maybe even just "and we are not on a pseudo terminal"

Here is my patch for ask-for-password in /usr/share/apache2
@@ -23,7 +23,7 @@

 prompt="Apache needs to decrypt your SSL Keys for $sitename ($keytype)
 Please enter passphrase:"
-if [ -x /bin/plymouth ] && plymouth --ping ; then
+if [ -x /bin/plymouth ] && plymouth --ping && ! `tty |grep pty`; then
     echo $prompt | logger
     exec plymouth ask-for-password --prompt="$prompt"

Dave Walker (davewalker) on 2011-12-01
Changed in apache2 (Ubuntu):
milestone: precise-alpha-1 → precise-alpha-2
Changed in apache2 (Ubuntu Precise):
status: Incomplete → Triaged
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks Jay, thats quite helpful.

I think the answer then is to simply flip the check order around. We'll only try plymouth if apache doesn't have a controlling terminal.

Changed in apache2 (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apache2 - 2.2.21-3ubuntu2

apache2 (2.2.21-3ubuntu2) precise; urgency=low

  * d/ask-for-passphrase: Flip the logic of this script so that it checks
    first to see if apache is being started from a TTY, and then if not,
    tries plymouth. (LP: #887410)
 -- Clint Byrum <email address hidden> Tue, 06 Dec 2011 16:49:33 -0800

Changed in apache2 (Ubuntu Precise):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers