From bede62bf199544dc91cc33e74adccb2b0166ef60 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Thu, 21 Oct 2021 15:18:12 +0200 Subject: [PATCH] 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 Reviewed-By: Rob Crittenden Reviewed-By: Alexander Bokovoy --- ipaserver/plugins/user.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipaserver/plugins/user.py b/ipaserver/plugins/user.py index b9ac09008..ffca80782 100644 --- a/ipaserver/plugins/user.py +++ b/ipaserver/plugins/user.py @@ -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'))