Bug 665876 - Mounting encrypted /tmp by /etc/crypttab fails if NetworkManager has no connection
Summary: Mounting encrypted /tmp by /etc/crypttab fails if NetworkManager has no conne...
Keywords:
Status: CLOSED DUPLICATE of bug 250881
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-27 16:24 UTC by Adalbert Prokop
Modified: 2014-03-17 03:26 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-01-03 16:43:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for /etc/init.d/functions (406 bytes, patch)
2010-12-27 16:25 UTC, Adalbert Prokop
no flags Details | Diff
Init script mounting encrypted /tmp (954 bytes, text/plain)
2010-12-27 16:26 UTC, Adalbert Prokop
no flags Details

Description Adalbert Prokop 2010-12-27 16:24:11 UTC
Description of problem:
A possible entry for encrypted /tmp directory specified in /etc/crypttab does not result in an mounted /tmp if NetworkManager is being used and has no connection.

Version-Release number of selected component (if applicable):
initscripts-9.20.1-1.fc14.i686

How reproducible:
Use NetworkManager instead of the network subsystem
# chkconfig network off
# chkconfig NetworkManager on

Prepare encrypted /tmp directory:
# file: /etc/crypttab
tmp /dev/disk/by-id/scsi-SATA_Maxtor_6Y080L0_Y23QEQDE-part9 /dev/urandom cipher=aes-cbc-essiv:sha256,tmp

# file: /etc/fstab
/dev/mapper/tmp /tmp ext2 noexec,rootcontext=system_u:object_r:tmp_t:s0 0 0

Reboot.
 
Actual results:
The encrypted directory is present as /dev/mapper/tmp but it won't be mounted.

Expected results:
If encrypted /tmp is defined, it should always be present, no matter if the network is present or not.

Additional info:
The only reason why encrypted /tmp works when the network subsystem is used (or NM is online) is the netfs init script which does mounts all automount definitions from the fstab. If the network subsystem is not used and NM is offline the netfs script exits early and does not mount /tmp.

I've create two independent patches as proposals for a fix.
One attempt is to automount all entries from fstab after an encryption mapping has been created.
The other is an init script which checks if encrypted tmp is used but not mounted and mounts it. I'll attach them to this bug.

Comment 1 Adalbert Prokop 2010-12-27 16:25:00 UTC
Created attachment 470859 [details]
Patch for /etc/init.d/functions

Comment 2 Adalbert Prokop 2010-12-27 16:26:03 UTC
Created attachment 470860 [details]
Init script mounting encrypted /tmp

Comment 3 Bill Nottingham 2011-01-03 16:43:33 UTC
This is a manifestation of a different, older, issue.

*** This bug has been marked as a duplicate of bug 250881 ***


Note You need to log in before you can comment on or make changes to this bug.