diff options
Diffstat (limited to 'src/nm-core-utils.c')
-rw-r--r-- | src/nm-core-utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |