User plugin: do not return the SID on user creation

The SID is not part of the default user attributes and does not
need to be returned in the user-add output.

Related: https://pagure.io/freeipa/issue/8995
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud 2021-10-21 15:18:12 +02:00
parent 02b4241e19
commit bede62bf19

View File

@ -659,6 +659,10 @@ class user_add(baseuser_add):
entry_attrs.update(newentry)
# delete ipantsecurityidentifier if present
if ('ipantsecurityidentifier' in entry_attrs):
del entry_attrs['ipantsecurityidentifier']
if options.get('random', False):
try:
entry_attrs['randompassword'] = unicode(getattr(context, 'randompassword'))