The Samba-Bugzilla – Attachment 4688 Details for
Bug 6722
Python bindings for ldb produce a segfault with Message.get()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script that allow to reproduce the error
demosegfault1.py (text/x-python), 1.43 KB, created by
Matthieu Patou
on 2009-09-14 08:51:49 UTC
(
hide
)
Description:
Script that allow to reproduce the error
Filename:
MIME Type:
Creator:
Matthieu Patou
Created:
2009-09-14 08:51:49 UTC
Size:
1.43 KB
patch
obsolete
>#!/usr/bin/python ># ># Copyright (C) Matthieu Patou <mat@matws.net> 2009 >import sys >import optparse >sys.path.insert(0, "bin/python") > >import samba >from samba.credentials import DONT_USE_KERBEROS >from samba.auth import system_session >from samba import Ldb, substitute_var, valid_netbios_name, check_all_substituted >from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError, \ > timestring, CHANGETYPE_MODIFY, CHANGETYPE_NONE >import ldb >import samba.getopt as options >from samba.samdb import SamDB >from samba import param >from samba.provision import ProvisionPaths, ProvisionNames,provision_paths_from_lp,setup_add_ldif,find_setup_dir,Schema,get_linked_attributes,FILL_FULL,provision >from samba.dcerpc import misc, security >from samba.ndr import ndr_pack, ndr_unpack > >parser = optparse.OptionParser("provision [options]") >sambaopts = options.SambaOptions(parser) >parser.add_option_group(sambaopts) >parser.add_option_group(options.VersionOptions(parser)) >credopts = options.CredentialsOptions(parser) >parser.add_option_group(credopts) >opts = parser.parse_args()[0] >lp = sambaopts.get_loadparm() >smbconf = lp.configfile > >creds = credopts.get_credentials(lp) >creds.set_kerberos_state(DONT_USE_KERBEROS) >session = system_session() >test_ldb = Ldb("/tmp/test.ldb", session_info=session, credentials=creds,lp=lp) >dn = ldb.Dn(test_ldb,str("CN=test1,DC=foo,DC=bar")) >test_msg =ldb.Message() >test_msg.dn = dn >print test_msg.get("dn") >#Boom >print test_msg.get(dn) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6722
: 4688