summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorDaniel Gollub <dgollub@brocade.com>2014-09-01 19:37:53 +0000
committerJakub Hrozek <jhrozek@redhat.com>2014-09-17 14:30:29 +0200
commit23600a657f84bbd71dca4dd77d65a1c6f4f4ff86 (patch)
tree6036df71ab45fcaad9361e9ca511bf785c83077a /src/db
parent8ef1a136c1406bd1bab66e4ebf75b9375090cd86 (diff)
downloadsssd-23600a657f84bbd71dca4dd77d65a1c6f4f4ff86.tar.gz
sssd-23600a657f84bbd71dca4dd77d65a1c6f4f4ff86.tar.xz
sssd-23600a657f84bbd71dca4dd77d65a1c6f4f4ff86.zip
sysdb: Write additional attrs in sysdb_add_user
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. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 8a7feaefe..9a8d9fab5 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1350,7 +1350,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) {