Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
NetworkManager
NetworkManager
Commits
39ed9c29
Commit
39ed9c29
authored
Oct 26, 2010
by
Dan Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: get D-Bus manager during auth if not provided
parent
1b219493
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/nm-manager-auth.c
src/nm-manager-auth.c
+8
-1
No files found.
src/nm-manager-auth.c
View file @
39ed9c29
...
...
@@ -20,6 +20,7 @@
#include "nm-manager-auth.h"
#include "nm-logging.h"
#include "nm-dbus-manager.h"
#include <dbus/dbus-glib-lowlevel.h>
#include <string.h>
...
...
@@ -325,9 +326,14 @@ nm_auth_get_caller_uid (DBusGMethodInvocation *context,
DBusError
dbus_error
;
g_return_val_if_fail
(
context
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
dbus_mgr
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
out_uid
!=
NULL
,
FALSE
);
if
(
!
dbus_mgr
)
{
dbus_mgr
=
nm_dbus_manager_get
();
g_assert
(
dbus_mgr
);
}
else
g_object_ref
(
dbus_mgr
);
*
out_uid
=
G_MAXULONG
;
sender
=
dbus_g_method_get_sender
(
context
);
...
...
@@ -356,6 +362,7 @@ nm_auth_get_caller_uid (DBusGMethodInvocation *context,
success
=
TRUE
;
out:
g_object_unref
(
dbus_mgr
);
g_free
(
sender
);
return
success
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment