Using calibre safely?
sktsee
sktseer at gmail.com
Thu Dec 1 15:47:22 UTC 2011
On Wed, 30 Nov 2011 14:23:29 -0800, Kevin O'Gorman wrote:
[snip]
>
> Dunno about Lucid, but it's definitely there (and using udisks) in
> Natty's 0.7.44,
> as /usr/bin/calibre-mount-helper.
>
> OTOH, the current calibre from its author has a binary mount helper
> instead of the
> script that was there before, but it's still SUID+SGID which seems an
> overreach for a non-administrative package. I have removed the admin
> bits, and will see if the package still works for me. I have no idea
> why the mount helper is even needed -- maybe for remote libraries?
>
>
That's a bit odd that it still installs calibre-mount-helper as SUID+SGID,
since it doesn't actually do anything.
$ strace -q -eprocess /opt/calibre/bin/calibre-mount-helper
execve("/opt/calibre/bin/calibre-mount-helper", ["/opt/calibre/bin/
calibre-mount-h"...], [/* 43 vars */]) = 0
exit_group(1)
If you examine the source code, apparently this is exactly what it is
supposed to do:
http://bazaar.launchpad.net/~kovid/calibre/trunk/view/head:/src/calibre/
devices/linux_mount_helper.c
I was under the impression that the developer had modified calibre-mount-
helper to simply call udisks to handle removable media, but he actually
has calibre-mount-helper do nothing but exit with an error. Calibre now
calls a separate helper program (called udisks.py appropriately enough)
to invoke udisks.
>From what I can tell just perusing some of the changed files in that
particular revision, it doesn't appear that the mount helper is called by
anything. In fact, if you were to install Calibre in your home directory
as non-root, the mount helper doesn't get installed at all. I guess there
could be some 3rd party plugins that depend on the mount helper being
present, but other than that scenario, I'm at loss to explain why it's
still included with the main program.
Removing the suid+sgid bits sounds like a good idea though, even if the
program does nothing more than immediately exit when run.
--
sktsee
More information about the ubuntu-users
mailing list