hal/hald device_info.c,1.13,1.14 hald_dbus.c,1.14,1.15
David Zeuthen
david at freedesktop.org
Wed Oct 13 06:50:10 PDT 2004
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv12717/hald
Modified Files:
device_info.c hald_dbus.c
Log Message:
2004-10-13 David Zeuthen <davidz at redhat.com>
* fdi/20freedesktop/sony_dsc.fdi: New file, to match krh's camera
that is USB Mass Storage based.
* fdi/20freedesktop/canon-digital-ixus-v.fdi: Removed
* fdi/20freedesktop/Makefile.am (dist_fdi20freedesktop_DATA):
add sony, remove canon.
* doc/spec/hal-spec.xml.in: Add a bunch of documentation to match
the new .fdi parser and the policy stuff for storage devices
* hald/device_info.c (handle_match): Remove debug output
* hald/hald_dbus.c (device_remove_property): Require superuser
Index: device_info.c
===================================================================
RCS file: /cvs/hal/hal/hald/device_info.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- device_info.c 12 Oct 2004 20:17:08 -0000 1.13
+++ device_info.c 13 Oct 2004 13:50:07 -0000 1.14
@@ -504,11 +504,8 @@
} else if (strcmp (attr[2], "compare_lt") == 0) {
dbus_int64_t result;
if (!match_compare_property (d, prop_to_check, attr[3], &result)) {
- HAL_INFO (("foob failed"));
return FALSE;
} else {
- HAL_INFO (("foob result = %lld", result));
- HAL_INFO (("foob %d", result < 0));
return result < 0;
}
} else if (strcmp (attr[2], "compare_le") == 0) {
Index: hald_dbus.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_dbus.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- hald_dbus.c 27 Sep 2004 14:49:45 -0000 1.14
+++ hald_dbus.c 13 Oct 2004 13:50:08 -0000 1.15
@@ -1081,6 +1081,7 @@
* void Device.AddCapability(string capability)
*
* raises org.freedesktop.Hal.NoSuchDevice,
+ * raises org.freedesktop.Hal.PermissionDenied,
* </pre>
*
* @param connection D-BUS connection
@@ -1160,6 +1161,7 @@
*
* raises org.freedesktop.Hal.NoSuchDevice,
* org.freedesktop.Hal.NoSuchProperty
+ * org.freedesktop.Hal.PermissionDenied
* </pre>
*
* @param connection D-BUS connection
@@ -1179,6 +1181,11 @@
udi = dbus_message_get_path (message);
+ if (!sender_has_superuser_privileges (connection, message)) {
+ raise_permission_denied (connection, message, "RemoveProperty: not privileged");
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
d = hal_device_store_find (hald_get_gdl (), udi);
if (d == NULL)
d = hal_device_store_find (hald_get_tdl (), udi);
More information about the hal-commit
mailing list