After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686415 - Use realmd from GoaKerberosProvider
Use realmd from GoaKerberosProvider
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Kerberos
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on: 686410
Blocks: 686416
 
 
Reported: 2012-10-18 22:36 UTC by Stef Walter
Modified: 2012-10-22 04:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use realmd from GoaKerberosProvider (68.33 KB, patch)
2012-10-18 22:37 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-10-18 22:36:59 UTC
There doesn't seem to be a need to expose the concept of realms
from the org.gnome.Identity interfaces.

realmd shouldn't be used long term anyway. It should be used in
a user interface or something like that, and be allowed to go away.
If called from a long running process then the o.f.r.Service.Release() 
method should be called so it doesn't wait around for the caller to
quit. 

I'll attach a rough untested patch which uses realmd from
GoaKerberosProvider directly and loads up the realms into the
user interface that way.

This removes an obscene amount of code from gnome-online-accounts.
Comment 1 Stef Walter 2012-10-18 22:37:05 UTC
Created attachment 226778 [details] [review]
Use realmd from GoaKerberosProvider

There's no real need to use it from the identity service.
Comment 2 Ray Strode [halfline] 2012-10-22 04:02:21 UTC
Review of attachment 226778 [details] [review]:

commit message is a little unclear to casual readers I think:

I think something like this is a little better.

    kerberos: Use realmd directly
    
    GoaKerberosProvider currently gets its realm list
    from gnome-online-accounts, who gets it from realmd.
    
    There's no advantage to having the middle man, so
    it makes sense to avoid doing so.
    
    This commit changes GoaKerberosProvider to talk
    to realmd directly.
    
I think the goaidentityservice stuff belongs as separate commit.

::: src/goabackend/goakerberosprovider.c
@@ +906,3 @@
                       &iter,
+                      0, goa_realm_kerberos_get_domain_name (kerberos),
+                      1, goa_realm_kerberos_get_realm_name (kerberos),

This is wrong.  the list store only has one column now.

@@ +1511,2 @@
   if (request.interface_added_id != 0)
     g_signal_handler_disconnect (G_OBJECT (self->object_manager), request.interface_added_id);

This needs to be request.realm_manager not self->object_manager now

::: src/goaidentity/goaidentityservice.c
@@ -615,3 @@
-
-static gboolean
-foo (GSimpleAsyncResult *operation_result)

holy crap, i suck.
Comment 3 Ray Strode [halfline] 2012-10-22 04:16:54 UTC
see bug 686416 for the goaidentityservice stuff broken out.  I put the patch there since it was really clean up folowing this stuff and that stuff landing.