Project

General

Profile

Bug #25326

Fix UTF-8 encoding for Auxiliary Parameters

Added by Jens Rauch over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Expected
Assignee:
John Hixson
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Sadly the generation of the sssd.conf is broken again.

If any value in "Auxiliary Parameters:" is given when defining an LDAP connection it fails with:

Traceback (most recent call last):
  File "/usr/local/libexec/nas/generate_sssd_conf.py", line 907, in <module>
    main()
  File "/usr/local/libexec/nas/generate_sssd_conf.py", line 901, in main
    add_ldap_section(client, sc)
  File "/usr/local/libexec/nas/generate_sssd_conf.py", line 731, in add_ldap_section
    f.write(ldap.ldap_auxiliary_parameters)
TypeError: a bytes-like object is required, not 'str'

If there is no value it succeeds and the config is where it should be in: /usr/local/etc/sssd/sssd.conf

(Maybe this is an duplicate, I did a quick search and didn't find anything so I thought I'll go ahead and post)

Associated revisions

Revision 48e2a453 (diff)
Added by John Hixson over 3 years ago

encode utf-8 auxiliary parameters Ticket: #25326

Revision f950048d (diff)
Added by John Hixson over 3 years ago

encode utf-8 auxiliary parameters Ticket: #25326 (cherry picked from commit 48e2a45330f1c6b2983a9d47693ac8c7098fb4f4)

Revision da6a67e9 (diff)
Added by John Hixson over 3 years ago

encode utf-8 auxiliary parameters Ticket: #25326

History

#1 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to John Hixson

John: is this some remaining fallout from removing NT4?

#2 Updated by John Hixson over 3 years ago

  • Status changed from Unscreened to Screened
  • Target version set to 11.0-U3

#3 Updated by John Hixson over 3 years ago

Dru Lavigne wrote:

John: is this some remaining fallout from removing NT4?

fallout from python3 conversion, very easy to fix.

#4 Updated by John Hixson over 3 years ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from John Hixson to Release Council
  • Priority changed from No priority to Expected

#5 Updated by John Hixson over 3 years ago

#6 Updated by Dru Lavigne over 3 years ago

  • Assignee changed from Release Council to Timur Bakeyev

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore over 3 years ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from Timur Bakeyev to John Hixson

#8 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Reviewed by Developer to 47

#9 Updated by Dru Lavigne over 3 years ago

  • Subject changed from Script for sssd.conf generation is broken to Fix UTF-8 encoding for Auxiliary Parameters

#10 Updated by Joe Maloney over 3 years ago

  • Status changed from 47 to Ready For Release
  • Needs QA changed from Yes to No
  • QA Status Test Passes added
  • QA Status deleted (Not Tested)

Added the following to auxiliary parameters in Directory Services/LDAP:

dos charset = cp866
unix charset = UTF8
display charset = UTF8

Verified that smb4.conf was generated with the auxiliary parameters in global after ldap started:

root@bonniemini:/usr/local/etc # more smb4.conf
[global]
    server max protocol = SMB3
    encrypt passwords = yes
    dns proxy = no
    strict locking = no
    oplocks = yes
    deadtime = 15
    max log size = 51200
    max open files = 941834
    logging = file
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    getwd cache = yes
    guest account = nobody
    map to guest = Bad User
    obey pam restrictions = yes
    ntlm auth = no
    directory name cache size = 0
    kernel change notify = no
    panic action = /usr/local/libexec/samba/samba-backtrace
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    server string = FreeNAS Server
    ea support = yes
    store dos attributes = yes
    lm announce = yes
    hostname lookups = yes
    acl allow execute always = true
    dos filemode = yes
    multicast dns register = yes
    domain logons = no
    local master = no
    idmap config *: backend = tdb
    idmap config *: range = 90000001-100000000
    server role = standalone
    netbios name = BONNIEMINI
    workgroup = WORKGROUP
    security = user
    pid directory = /var/run/samba
    create mask = 0666
    directory mask = 0777
    client ntlmv2 auth = yes
    dos charset = CP437
    unix charset = UTF-8
    log level = 10

#11 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF