[SSSD] [PATCH] sysdb: Write additional attrs in sysdb_add_user

Daniel Gollub dgollub at brocade.com
Mon Sep 1 20:37:53 UTC 2014


In the uid=0 case (to obtain new free id) only uidNumber and gidNumber
attributes got written, but not the additonal provided attributes like
alias or others.
---
 src/db/sysdb_ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index e32d79a..b1a2992 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1401,7 +1401,8 @@ int sysdb_add_user(struct sss_domain_info *domain,
         }
 
         ret = sysdb_set_user_attr(domain, name, id_attrs, SYSDB_MOD_REP);
-        goto done;
+        /* continue on success, to commit additional attrs */
+        if (ret) goto done;
     }
 
     if (!attrs) {
-- 
1.9.1




More information about the sssd-devel mailing list