samba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes
authorAndrew Bartlett <abartlet@samba.org>
Sun, 11 Nov 2012 00:35:02 +0000 (11:35 +1100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 3 Dec 2012 11:35:33 +0000 (12:35 +0100)
commit73af1ab5556d332e15aaf863db7647a3a341e7e0
treef5de569b388fe3ce704e8e9eeb2449776d2fbb4a
parentc993daaf95c392d46994520a3f4c0dd79d5efed1
samba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes

Is is not required that these additional attributes be filled in, so
catch KeyError in both the nsswitch and ldap backend case.

We rework get_posix_attr_from_ldap_backend() so it raises KeyError
rather than trying to return None, and does not ignore other errors.

Andrew Bartlett

Tested-by: Chirana Gheorghita Eugeniu Theodor <office@adaptcom.ro>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit b4d8629f511005540cb1fbbbe9abfb278c064ba2)

Fix bug #9271 - backport samba-tool fixes from master.
source4/scripting/python/samba/upgrade.py