Project

General

Profile

Actions

Backport #10897

closed

Segmentation fault with ruby-ldap under rails 4.2.0 during bind

Added by funnymanva (Carlton O'Riley) about 9 years ago. Updated about 9 years ago.

Status:
Third Party's Issue
Assignee:
-
[ruby-core:68271]

Description

Running the same code from the command line using a script and the same bundler gems works correctly. However, when running inside or rails, or the rails console, when the bind is called a segmentation fault occurs. The basic code is as follows (this is the working command line script, however it is equivalent to the rails one):

#!/usr/bin/env ruby

require 'rubygems'
require 'bundler/setup'

require 'ldap'
username = 'username'

connect = LDAP::SSLConn.new( 'ldapserver', 636 )
connect.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
connect.bind('cn=Login,ou=Service Accounts,dc=example,dc=com','Password') do |conn|
  connect.perror("bind")
  scope = LDAP::LDAP_SCOPE_SUBTREE
  base = "dc=example,dc=com"
  filter = "(uid=#{username})"
  result = nil
  conn.search(base, scope, filter, "dn") do |entry|
    result = entry.dn
  end
  puts result.inspect
end

Files

stacktrace.txt (200 KB) stacktrace.txt funnymanva (Carlton O'Riley), 02/24/2015 01:26 AM

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

  • Description updated (diff)
  • Status changed from Open to Third Party's Issue
  • Priority changed from 5 to Normal

Occurs inside ldap gem and system libraries called by it, please report there.
And you should show the crash report file too.

Actions

Also available in: Atom PDF

Like0
Like0