On Mon, Sep 01, 2014 at 10:37:53PM +0200, Daniel Gollub wrote:
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) {
Thank you for the patch. I'm not aware of any reason to not store the
attributes and the patch works as expected. ACK.
Attached is also a unit test that fails w/o your patch and succeeds with
your patch applied.