#1440 SSSD fails to store users if any of the requested attribute is empty.
Closed: Fixed None Opened 10 years ago by jhrozek.

https://bugzilla.redhat.com/show_bug.cgi?id=842842 (Red Hat Enterprise Linux 6)

Description of problem: SSSD fails to store if directory server returns an
attribute with empty value. For example:

Adding shadowFlag [] to attributes of [ldap_user].
[sdap_save_user] (0x0400): Storing info for user luser1
[sysdb_set_entry_attr] (0x0400): Error: 14 (Bad address)
[sysdb_store_user] (0x0400): Error: 14 (Bad address)

Version-Release number of selected component (if applicable):

How reproducible: Always

Steps to Reproduce:
1. Add an empty attribute to one of the user entry.


dn: uid=luser1,ou=People,dc=gsslab,dc=pnq,dc=redhat,dc=com
givenName: ldap
sn: user1
loginShell: /bin/bash
uidNumber: 1556
gidNumber: 1500
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: posixAccount
objectClass: shadowaccount
uid: luser1
gecos: Ldap User1
cn: ldap user1
homeDirectory: /home/luser1

2. Try to get the information of the above user though SSSD (ie; # id luser1, )

Actual results: User/group membership details missing.

# id luser1
uid=1556(luser1) gid=1500(redhat) groups=1500(redhat)
# getent group g1
# getent group g2
# id luser1

2. (clear cache, restart sssd, try group first)
# getent group g1
# getent group g2
# id luser1
id: luser1: No such user

Expected results: SSSD returns user/group details correctly.

eg: (Added 'ldap_user_shadow_flag = NoAttr' to sssd.conf and I get the results
as expected.)

# id luser1
uid=1556(luser1) gid=1500(redhat) groups=1500(redhat),2000(g1),2001(g2)
# id g1
id: g1: No such user
# getent group g1
# getent group g2

Additional info: As per discussion with Stephen/Jakub on IRC, tested latest
build (which includes
https://fedorahosted.org/pipermail/sssd-devel/2012-July/010602.html ) and the
logs show "LDB error [Invalid attribute syntax]"

[sdap_attrs_add_ldap_attr] (0x2000): Adding shadowFlag [] to attributes of
[sdap_attrs_add_ldap_attr] (0x2000): krbLastPwdChange is not available for
[sdap_attrs_add_ldap_attr] (0x2000): sshPublicKey is not available for
[sdap_save_user] (0x0400): Storing info for user luser1
[ldb] (0x4000): start ldb transaction (nesting: 1)
[sysdb_error_to_errno] (0x0020): LDB returned unexpected error: [Invalid
attribute syntax]
[sysdb_set_entry_attr] (0x0400): Error: 14 (Bad address)
[ldb] (0x4000): cancel ldb transaction (nesting: 1)
[sysdb_store_user] (0x0400): Error: 14 (Bad address)
[sdap_save_user] (0x0040): Failed to save user [luser1]

Fields changed

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: NEEDS_TRIAGE => SSSD 1.9.0
tests: => 0
testsupdated: => 0
upgrade: => 0

Fields changed

owner: somebody => mzidek

master: bb91897

patch: 0 => 1
resolution: => fixed
status: new => closed

Metadata Update from @jhrozek:
- Issue assigned to mzidek
- Issue set to the milestone: SSSD 1.9.0

5 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2482

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.