David Zeuthen [Sat, 13 Aug 2011 15:59:02 +0000 (11:59 -0400)]
Don't leak fd while enumerating directories
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 19:56:41 +0000 (15:56 -0400)]
Add work-around to identify firewire devices without serial/wwn as drives
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 18:11:01 +0000 (14:11 -0400)]
Update docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 18:04:44 +0000 (14:04 -0400)]
Use /dev/mapper/$DM_NAME as fallback, if available
This ensures that PreferredDeviceFile will be /dev/mapper/sd_card
instead of e.g. /dev/dm-3 if DM_NAME is "sd_card".
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 17:47:57 +0000 (13:47 -0400)]
Support /etc/crypttab for unlocking and locking LUKS devices
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 16:40:17 +0000 (12:40 -0400)]
Allow mounting/unmounting fstab devices without the 'user' or 'users' option
... by introducing a new org.freedesktop.udisks2.filesystem-nonuser-fstab
polkit action.
http://people.freedesktop.org/~david/palimpsest-nonuser-fstab-devices.png
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 12 Aug 2011 14:09:54 +0000 (10:09 -0400)]
Revert "Use -T for eject(1) on optical drives"
This causes failures on my optical drive that can't close its tray. We
can probably do this by adding a Drive:CloseTray() method as well as a
Drive:TrayIsOpen property...
This reverts commit
51255b864c09390a96f49ed14a70916eb75b6456.
David Zeuthen [Thu, 11 Aug 2011 22:05:11 +0000 (18:05 -0400)]
Use -T for eject(1) on optical drives
This enables the "eject" button in palimpsest to close the tray if
it's opened already.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 11 Aug 2011 21:17:50 +0000 (17:17 -0400)]
Preserve mode_t of /etc/fstab and /etc/crypttab when updating
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 11 Aug 2011 20:27:43 +0000 (16:27 -0400)]
Also consider the device file in addition to symlinks
Otherwise things like /dev/sr0 in the /etc/{fstab,crypttab} files
won't work.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 11 Aug 2011 19:46:12 +0000 (15:46 -0400)]
Add support for /etc/crypttab
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 10 Aug 2011 16:13:35 +0000 (12:13 -0400)]
Also unmount filesystems when devices mounted via /etc/fstab disappears
But only if mounted via udisks.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 9 Aug 2011 19:16:04 +0000 (15:16 -0400)]
Add missing files
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 9 Aug 2011 19:14:17 +0000 (15:14 -0400)]
Add facilities for adding/removing a block device to /etc/fstab
http://people.freedesktop.org/~david/palimpsest-fstab-1.png
http://people.freedesktop.org/~david/palimpsest-fstab-2.png
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 7 Aug 2011 15:39:58 +0000 (11:39 -0400)]
Export SMART data for drives using the ATA protocol
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 5 Aug 2011 14:23:53 +0000 (10:23 -0400)]
Remove non-existant file from POTFILES.in
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 4 Aug 2011 18:22:52 +0000 (14:22 -0400)]
Add an Eject() method to the Drive interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 4 Aug 2011 16:46:58 +0000 (12:46 -0400)]
Add udisks_client_settle() and use it in udisksctl(1) to show device files
... instead of object paths.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 4 Aug 2011 15:51:47 +0000 (11:51 -0400)]
Add a @long_string option to udisks_util_get_part_type_for_display()
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 4 Aug 2011 10:51:27 +0000 (06:51 -0400)]
Add work arounds for missing udev properties for virtio-blk devices
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 20:53:17 +0000 (16:53 -0400)]
Allow locking LUKS devices that were manually unlocked
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 19:20:02 +0000 (15:20 -0400)]
Allow unmounting stuff not mentioned in the mounted-fs file
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 18:56:18 +0000 (14:56 -0400)]
If a device is referenced in fstab, invoke mount/umount as the calling user
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 17:08:55 +0000 (13:08 -0400)]
Add files missed in previous commit
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 17:06:41 +0000 (13:06 -0400)]
Move docs around a bit
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 1 Aug 2011 17:04:10 +0000 (13:04 -0400)]
Move Linux swapspace implementation into separate type
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 26 Jul 2011 20:41:01 +0000 (16:41 -0400)]
Fix ignore check for loop devices
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 26 Jul 2011 20:20:30 +0000 (16:20 -0400)]
Fix up loop device authorizations
In particular, don't require authorization to remove a loop device
you've set up yourself.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 26 Jul 2011 17:23:22 +0000 (13:23 -0400)]
Clean up loop devices
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 23 Jul 2011 17:13:45 +0000 (13:13 -0400)]
Track loop devices set up in /run/udisks2/loop
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 23 Jul 2011 17:11:23 +0000 (13:11 -0400)]
Improve udisks_daemon_wait_for_object_sync() implementation
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 22 Jul 2011 15:04:09 +0000 (11:04 -0400)]
Add udisks_daemon_util_setup_by_user() and use it when mounting
This way you won't be asked for polkit auth if you want to mount a
device that you have just unlocked.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 22 Jul 2011 14:00:56 +0000 (10:00 -0400)]
Add a way to setup and delete loop devices
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 20 Jul 2011 18:08:45 +0000 (14:08 -0400)]
Add Manager D-Bus interface and a Linux implementation
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 20 Jul 2011 14:16:17 +0000 (10:16 -0400)]
udisksctl: Don't ask for passphrase when locking
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 20:45:31 +0000 (16:45 -0400)]
Fix polkit description for filesystem-unmount-others
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 20:28:37 +0000 (16:28 -0400)]
Fix polkit defaults for encrypted-unlock-system
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 18:27:08 +0000 (14:27 -0400)]
Rework UDISKS_* udev properties
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 15:35:48 +0000 (11:35 -0400)]
Move properties around
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 14:55:11 +0000 (10:55 -0400)]
Update man pages
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 14:20:42 +0000 (10:20 -0400)]
Rework polkit actions
In particular, make sure that managing swapspace always requires
authentication as e.g. passwords may be paged onto the swap device.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 19 Jul 2011 12:42:07 +0000 (08:42 -0400)]
Slightly change wording in cleanup message
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 21:35:02 +0000 (17:35 -0400)]
udisks(1): Mention lock/unlock commands in help output
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 21:32:55 +0000 (17:32 -0400)]
Add unlock/lock commands to udisksctl(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 20:53:58 +0000 (16:53 -0400)]
Find device by dev_t, not name
This is important especially since udev no longer includes
/dev/block/%d:%d in its DEVLINKS variable (it's implicit).
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 20:37:26 +0000 (16:37 -0400)]
Update polkit actions
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 18:06:24 +0000 (14:06 -0400)]
Minor fixes to the cleanup logic
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 18 Jul 2011 17:52:57 +0000 (13:52 -0400)]
Don't log location and function to syslog
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 14 Jul 2011 21:27:41 +0000 (17:27 -0400)]
Avoid trailing semicolon in macros
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 14 Jul 2011 20:59:26 +0000 (16:59 -0400)]
Improve UDisksCleanup docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 14 Jul 2011 18:42:28 +0000 (14:42 -0400)]
Clean up unlocked LUKS devices on device removal
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 13 Jul 2011 18:58:17 +0000 (14:58 -0400)]
Add new cleanup object
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 25 Jun 2011 15:51:39 +0000 (11:51 -0400)]
Add locking and caching to persistent store
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 24 Jun 2011 19:48:02 +0000 (15:48 -0400)]
Move mounted-fs functionaliy to UDisksDaemon class
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 24 Jun 2011 19:06:56 +0000 (15:06 -0400)]
Move persistent store location
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 22 Jun 2011 19:09:15 +0000 (15:09 -0400)]
Add .Encrypted interface with Unlock() and Lock() methods
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 17 Jun 2011 15:55:19 +0000 (11:55 -0400)]
Use a{sv} for options instead of just as
It's much more future-proof to do it this way.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 20:14:11 +0000 (16:14 -0400)]
Use udisksd, not udisks, as the name in syslog
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 19:54:24 +0000 (15:54 -0400)]
Update license and copyright headers
No big changes, basically we just want to convey that the library is
LGPLv2+ and everything else is GPLv2+. If there is any doubt that this
is the intention, this commit can be used to set the record straight.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 19:43:27 +0000 (15:43 -0400)]
Add better logging routines
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 18:28:19 +0000 (14:28 -0400)]
Make error output prettier
No need to mention both stdout and stderror unless both are non-empty.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 17:36:18 +0000 (13:36 -0400)]
Move SetLabel() method from BlockDevice to Filesystem interface
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 17:09:20 +0000 (13:09 -0400)]
Use g_unix_signal_add_watch_full() instead of own GPosixSignal
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 16:46:59 +0000 (12:46 -0400)]
Remove configuration-item interface and the fstab provider implementing this
Was never really implemented and is easier to implement in another
way.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 16 Jun 2011 16:42:05 +0000 (12:42 -0400)]
Update docs
100% doc coverage now.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Jun 2011 16:55:56 +0000 (12:55 -0400)]
Rename Lun interface to Drive
The term "Lun" (Logical Unit Number) is too abstract / overloaded for
what we are trying to convey. Drive is a lot closer so rename it to
that.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Jun 2011 15:47:38 +0000 (11:47 -0400)]
Remove iSCSI bits for now
Will add this back later.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 15 Jun 2011 15:30:05 +0000 (11:30 -0400)]
Add WIP iSCSI patches
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 25 May 2011 16:21:44 +0000 (12:21 -0400)]
Get info via iscsiadm(8), not by parsing private data in /var/lib/iscsi
Also make it work for the case where we don't know the tpgt for the
configured target.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 23 May 2011 21:59:40 +0000 (17:59 -0400)]
Catch up with latest gdbus-codegen(1) changes
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sat, 16 Apr 2011 18:54:12 +0000 (14:54 -0400)]
Add introspection bits for libudisks2 and a small pygi example
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 13 Apr 2011 20:35:19 +0000 (16:35 -0400)]
Catch up with s/Stub/Skeleton/ rename in GLib's gdbus-codegen branch
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 13 Apr 2011 01:06:21 +0000 (21:06 -0400)]
Use GLib's gdbus-codegen branch for now
This will get merged onto GLib master in the near future.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 4 Apr 2011 19:19:55 +0000 (15:19 -0400)]
Nuke interface org.freedesktop.UDisks2.LinuxSysfsDevice
There's no need for this interface. Clients can get the device file
themselves and listen for uevents via libgudev1 or similar.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 4 Apr 2011 18:22:46 +0000 (14:22 -0400)]
Use new gdbus-codegen(1) facility for generating D-Bus docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 19:36:35 +0000 (15:36 -0400)]
Properly name types header file for daemon
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 19:09:51 +0000 (15:09 -0400)]
Use intltool to generate merged .policy file
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 19:02:46 +0000 (15:02 -0400)]
Implement Swapspace's Start() and Stop() method
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 17:46:06 +0000 (13:46 -0400)]
Add org.freedesktop.UDisks2.Swapspace interface
Whether an swap device is in use or not, can be tracked via the
:Active property. A swap device can be activated or deactivated with
the Start() and Stop() methods.
For now, Start() and Stop() are not actually hooked up.
Implementation-wise, monitoring /proc/swaps requires this patch
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=
66d7dd518ae413a383ab2c6c263cc30617329842
which is in Linux 2.6.38 or later.
Example:
$ udisksctl monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
13:49:08.441: The udisks-daemon is running (name-owner :1.315).
13:49:11.720: /org/freedesktop/UDisks2/block_devices/sda3: org.freedesktop.UDisks2.Swapspace: Properties Changed
Active: false
13:49:11.746: /org/freedesktop/UDisks2/block_devices/sda3: org.freedesktop.UDisks2.LinuxSysfsDevice::UEvent (b'change',)
13:49:15.310: /org/freedesktop/UDisks2/block_devices/sda3: org.freedesktop.UDisks2.Swapspace: Properties Changed
Active: true
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 14:34:58 +0000 (10:34 -0400)]
Set Lun:ConnectionBus for firewire drives
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 11:32:37 +0000 (07:32 -0400)]
Don't probe the LUN for information
It's no longer needed since we now use the block device (not the LUN
scsi_device) for tracking LUNs.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 11:21:58 +0000 (07:21 -0400)]
Print better warning when unable to find iscsi_session device
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 30 Mar 2011 11:20:01 +0000 (07:20 -0400)]
Use persistent_address sysfs file, not address, for iscsi connections
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 22:20:05 +0000 (18:20 -0400)]
Add Lun:ConnectionBus property and use it in udisks_util_get_lun_info()
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 21:55:09 +0000 (17:55 -0400)]
Reimplement udisks_util_get_lun_info()
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 21:51:45 +0000 (17:51 -0400)]
Actually use WARN_CFLAGS
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 18:22:44 +0000 (14:22 -0400)]
Specify behavior of udisks_util_get_lun_info()
We still need to actually implement this behavior - most of it can be
lifted from gnome-disk-utility....
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 17:24:01 +0000 (13:24 -0400)]
Put files with translatable strings in POTFILES.in, not POTFILES.skip
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 16:43:55 +0000 (12:43 -0400)]
Fix 'make distcheck'
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 16:29:52 +0000 (12:29 -0400)]
Nuke blackbox tests for now
They don't work because the udisks2 interfaces are different from the
old ones - better to add the tests back when they are ported to the
new interface.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 29 Mar 2011 16:27:24 +0000 (12:27 -0400)]
Rework autotooling and setup i18n
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 25 Mar 2011 22:17:39 +0000 (18:17 -0400)]
Preliminary support for iSCSI targets
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Sun, 20 Mar 2011 17:26:26 +0000 (13:26 -0400)]
Update signal names
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 18 Mar 2011 19:26:40 +0000 (15:26 -0400)]
Update docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 18 Mar 2011 19:21:53 +0000 (15:21 -0400)]
Factor out filesystem to sep D-Bus interface and unify polkit interaction
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 18 Mar 2011 16:46:35 +0000 (12:46 -0400)]
Use new type-safe CALLBACK macros
Incidently, this actually found a bug - I was missing the user_data
parameters of the callback functions. So YAY!
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Thu, 17 Mar 2011 18:33:11 +0000 (14:33 -0400)]
Update to latest gdbus-codegen changes
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 16 Mar 2011 19:45:02 +0000 (15:45 -0400)]
Update to latest GDBus
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 21:24:52 +0000 (17:24 -0400)]
Export udisks_util_get_media_compat_for_display()
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Mon, 14 Mar 2011 11:13:24 +0000 (07:13 -0400)]
Cope with the fact that ID_FS_VERSION is udev encoded
For example, LVM2 PVs have version LVM2\x20001 which should be
presented as "LVM2 001".
Signed-off-by: David Zeuthen <davidz@redhat.com>