summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device-factory.c7
-rw-r--r--src/dhcp/nm-dhcp-manager.c5
-rw-r--r--src/nm-core-utils.c7
3 files changed, 18 insertions, 1 deletions
diff --git a/src/devices/nm-device-factory.c b/src/devices/nm-device-factory.c
index d8e303460c..92cb4d34ea 100644
--- a/src/devices/nm-device-factory.c
+++ b/src/devices/nm-device-factory.c
@@ -425,5 +425,12 @@ nm_device_factory_manager_load_factories (NMDeviceFactoryManagerFactoryFunc call
_ADD_INTERNAL (nm_vlan_device_factory_get_type);
_ADD_INTERNAL (nm_vxlan_device_factory_get_type);
+#if DEVELOP
+ load_factories_from_dir ("./src/devices/adsl/.libs", callback, user_data);
+ load_factories_from_dir ("./src/devices/bluetooth/.libs", callback, user_data);
+ load_factories_from_dir ("./src/devices/wifi/.libs", callback, user_data);
+ load_factories_from_dir ("./src/devices/wwan/.libs", callback, user_data);
+#else
load_factories_from_dir (NMPLUGINDIR, callback, user_data);
+#endif
}
diff --git a/src/dhcp/nm-dhcp-manager.c b/src/dhcp/nm-dhcp-manager.c
index 020eeed578..e17d9135b7 100644
--- a/src/dhcp/nm-dhcp-manager.c
+++ b/src/dhcp/nm-dhcp-manager.c
@@ -62,8 +62,11 @@ G_DEFINE_TYPE (NMDhcpManager, nm_dhcp_manager, G_TYPE_OBJECT)
/*****************************************************************************/
-/* default to installed helper, but can be modified for testing */
+#if DEVELOP
+const char *nm_dhcp_helper_path = LIBEXECDIR "./src/dhcp/nm-dhcp-helper";
+#else
const char *nm_dhcp_helper_path = LIBEXECDIR "/nm-dhcp-helper";
+#endif
/*****************************************************************************/
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index 197fa49ba9..76d8aad09a 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -4213,12 +4213,19 @@ nm_utils_validate_plugin (const char *path, struct stat *st, GError **error)
return FALSE;
}
+#if DEVELOP
+ /* Do not check plugin ownership when running NetworkManager from the
+ * build directory. It will typically belong to the user who is using
+ * sudo to run NetworkManager as root.
+ */
+#else
if (st->st_uid != 0) {
g_set_error_literal (error,
NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN,
"file has invalid owner (should be root)");
return FALSE;
}
+#endif
if (st->st_mode & (S_IWGRP | S_IWOTH | S_ISUID)) {
g_set_error_literal (error,