unmounting broken, mounting for normal users

Bug #48407 reported by RK
10
Affects Status Importance Assigned to Milestone
libpam-mount (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: libpam-mount

mounting and unmounting doesn't work for normal users,
because the script does not run under root anymore. So
instead of symlinking the scripts to /sbin/*mount.crypt,
I put a little wrapper binary there that execle()s the
appropriate scripts. I also added a check that each script
is only called by /bin/umount resp. /bin/mount.

Additionally, umount doesn't work because the entry in
the mtab is wrong. It isn't set to fs type crypt because
the mount behind the scenes mounts the fs type that's
actually on the disc. To get this right, the mount must be
first done without mtab entry, then a fake mount entry
created. On unmount, care must be taken not te create
a recursive loop.

See the patch I'll add as soon as this thing allows me to.

Revision history for this message
RK (kubuntu-rk) wrote : patch to /usr/bin/mount.crypt and /usr/bin/umount.crypt

Attached promised patch.

Revision history for this message
Emmet Hikory (persia) wrote :

Thank you for the patch. My apologies that it has not been reviewed in so long. I have added the patch tag to make it easier for packagers to find the patch. I have unsubscribed ubuntu-universe-sponsors, as this is not a debdiff. If a debdiff is prepared, please resubscribe ubuntu-universe-sponsors.

Changed in libpam-mount:
status: Unconfirmed → Confirmed
Revision history for this message
A. Denton (aquina) wrote :

I tried to follow the "Workflow" described on [L1] but yet without success. On the one hand I don't know which OS bug #48407 refers to. Maybe it's Ubuntu 6.06 which has been discontinued except for the rarely used server distibution (until June 2011). On the other hand there is no demand for a fix I guess and so one shoudl rther check whether Hardy or Lucid suffer from the same problem.

[L1] https://wiki.ubuntu.com/ReviewersTeam/ReviewGuide#Workflow

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this patch, and sorry (again) it has languished this long.

The scripts you appear to be patching are no longer scripts, so the patches do not apply.

It appears to me a more general bug exists - mount.crypt as root doesn't work for me at all. I created a loopback aes-encrypted ext2 filesystem, but mount.crypt was failing to mount it.

tags: removed: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@RK sorry, I seem to have cut myself short.

If you have another patch you are using to work around this bug, please feel free to submit it and assign the review to me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.