Hi

and again I added some debug prints to SOGoSAML2Session.m. Now the important part looks like

---
- (void) processAuthnResponse: (NSString *) authnResponse

<multiple lines skipped>

  NSPrintErr(@"lasso_profile_get_identity:");
  lasso_identity = lasso_profile_get_identity (profile);
  if (lasso_identity)
    {
      dump = lasso_identity_dump (lasso_identity);
      nsDump = [NSString stringWithUTF8String: dump];
      NSPrintErr(@"nsDumpB: %@", nsDump);
      [saml2Dump setObject: nsDump forKey: @"identity"];
      NSPrintErr(@"identityAA: %@", nsDump);
      lasso_identity_destroy (lasso_identity);
      NSPrintErr(@"lasso_identity_destroy/post");
    }
  NSPrintErr("sharedCache/pre");
  [[SOGoCache sharedCache] setSaml2LoginDumps: saml2Dump
                                forIdentifier: identifier];
  NSPrintErr("sharedCache/post");
  free (responseData);
}
---

Again I tried to login, get redirected to keycloak (21.1.2, just upgraded today) and after comming back to sogo this gets logged:

---
lasso_profile_get_identity:
nsDumpB: <Identity xmlns="http://www.entrouvert.org/namespaces/lasso/0.0"; Version="2"><lasso:Federation xmlns:lasso="http://www.entrouvert.org/namespaces/lasso/0.0"; xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" RemoteProviderID="https://auth.example.com/realms/master"; FederationDumpVersion="2"><lasso:LocalNameIdentifier><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">G-2594070f-2a5d-452d-8a25-97a59350d785</saml:NameID></lasso:LocalNameIdentifier></lasso:Federation></Identity> identityAA: <Identity xmlns="http://www.entrouvert.org/namespaces/lasso/0.0"; Version="2"><lasso:Federation xmlns:lasso="http://www.entrouvert.org/namespaces/lasso/0.0"; xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" RemoteProviderID="https://auth.example.com/realms/master"; FederationDumpVersion="2"><lasso:LocalNameIdentifier><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">G-2594070f-2a5d-452d-8a25-97a59350d785</saml:NameID></lasso:LocalNameIdentifier></lasso:Federation></Identity>
lasso_identity_destroy/post

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7439d35 in objc_msg_lookup () from /lib/x86_64-linux-gnu/libobjc.so.4
(gdb) bt
#0 0x00007ffff7439d35 in objc_msg_lookup () at /lib/x86_64-linux-gnu/libobjc.so.4
#1  0x00007ffff6de9cb9 in  () at /lib/libgnustep-base.so.1.28
#2 0x00007ffff7f3d304 in NSPrintErr (format=0x7ffff7f526f6) at ./SoObjects/SOGo/SOGoSAML2Session.m:91
#3  0x00007ffff7f3f4d9 in -[SOGoSAML2Session processAuthnResponse:]
(self=0x555555877870, _cmd=0x7ffff25e1a30 <_OBJC_SELECTOR_TABLE+720>, authnResponse=0x5555559906d0) at ./SoObjects/SOGo/SOGoSAML2Session.m:546 #4 0x00007ffff25d6b39 in -[SOGoSAML2Actions saml2SignOnPOSTAction] (self=0x555555e2a1a0, _cmd=0x555555aa6510) at ./UI/MainUI/SOGoSAML2Actions.m:175
#5  0x00007ffff794cd31 in  () at /lib/libNGObjWeb.so.4.9
#6  0x00007ffff79ea252 in  () at /lib/libNGObjWeb.so.4.9
---

I also tried to comment out the call to lasso_identity_destroy() but this didn't change the segfault. So I assume something gets messed up before.

But now I really don't know how to get further on my own.

@[email protected]: Any ideas?


PS: The NSPrintErr is this one and the segfault is the NSString line.

---
// print to stderr
static void NSPrintErr(NSString *format, ...) {
    va_list args;
    va_start(args, format);

NSString *string = [[NSString alloc] initWithFormat:format arguments:args];

    va_end(args);

    fprintf(stderr, "%s\n", [string UTF8String]);
    fflush(stderr);

#if !__has_feature(objc_arc)
    [string release];
#endif
}
---

Reply via email to