diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-11-02 11:38:19 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-11-02 14:10:31 -0400 |
commit | 583f7e8c7178f2019df0f00d9dafe973e88ed707 (patch) | |
tree | 65dcb8c4a02a0838b8c9f868cce7905243e52df6 /src | |
parent | ed80a7f8ff76089bdcfae7007dbdef42d05e2cc8 (diff) | |
download | sssd-583f7e8c7178f2019df0f00d9dafe973e88ed707.tar.gz sssd-583f7e8c7178f2019df0f00d9dafe973e88ed707.tar.bz2 sssd-583f7e8c7178f2019df0f00d9dafe973e88ed707.zip |
Handle group renaming correctly
https://fedorahosted.org/sssd/ticket/1040
Diffstat (limited to 'src')
-rw-r--r-- | src/db/sysdb_ops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 9aaea586..3734bb18 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -1139,8 +1139,13 @@ int sysdb_add_group(struct sysdb_ctx *sysdb, ret = sysdb_search_group_by_gid(tmp_ctx, sysdb, gid, NULL, &msg); if (ret != ENOENT) { - if (ret == EOK) ret = EEXIST; - goto done; + if (ret == EOK) { + ret = sysdb_delete_group(sysdb, NULL, gid); + } + + if (ret != EOK) { + goto done; + } } } |