diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:53 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:53 +0100 |
| commit | 4d939c60d4ac257a2977871baf3b8b3671b5a4f7 (patch) | |
| tree | 318c08dea542d7865422af76e2d36a9559340cd3 /src/nm-session-utils.c | |
| parent | bb9eef75b2aaaab741e2b99911c8be3db6d1bc0b (diff) | |
| parent | 2c032d8f1c6292c1338a615e6ec40252889ba85c (diff) | |
Merge tag 'upstream/1.0.0' into experimental
Upstream version 1.0.0
Diffstat (limited to 'src/nm-session-utils.c')
| -rw-r--r-- | src/nm-session-utils.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/nm-session-utils.c b/src/nm-session-utils.c index 269e2f81..eb156fad 100644 --- a/src/nm-session-utils.c +++ b/src/nm-session-utils.c @@ -17,22 +17,13 @@ * Author: Dan Williams <dcbw@redhat.com> */ +#include "config.h" + #include <pwd.h> #include <sys/types.h> #include "nm-session-utils.h" - -/********************************************************************/ - -GQuark -nm_session_monitor_error_quark (void) -{ - static GQuark ret = 0; - - if (G_UNLIKELY (ret == 0)) - ret = g_quark_from_static_string ("nm-session-monitor-error"); - return ret; -} +#include "nm-errors.h" /********************************************************************/ @@ -44,8 +35,8 @@ nm_session_uid_to_user (uid_t uid, const char **out_user, GError **error) pw = getpwuid (uid); if (!pw) { g_set_error (error, - NM_SESSION_MONITOR_ERROR, - NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, + NM_MANAGER_ERROR, + NM_MANAGER_ERROR_FAILED, "Could not get username for UID %d", uid); return FALSE; @@ -64,8 +55,8 @@ nm_session_user_to_uid (const char *user, uid_t *out_uid, GError **error) pw = getpwnam (user); if (!pw) { g_set_error (error, - NM_SESSION_MONITOR_ERROR, - NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, + NM_MANAGER_ERROR, + NM_MANAGER_ERROR_FAILED, "Could not get UID for username '%s'", user); return FALSE; |