From 6a03b2a9c967d250825d614607d0bb7b901e8696 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 14 Jan 2011 10:39:17 -0500 Subject: Do not throw a DP error when a netgroup is not found https://fedorahosted.org/sssd/ticket/775 --- src/db/sysdb_ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/db/sysdb_ops.c') diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 23264b41b..e8ef9a249 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -2275,10 +2275,13 @@ int sysdb_delete_netgroup(struct sysdb_ctx *sysdb, ret = sysdb_search_netgroup_by_name(tmp_ctx, sysdb, domain, name, NULL, &msg); - if (ret != EOK) { + if (ret != EOK && ret != ENOENT) { DEBUG(6, ("sysdb_search_netgroup_by_name failed: %d (%s)\n", ret, strerror(ret))); goto done; + } else if (ret == ENOENT) { + DEBUG(6, ("Netgroup does not exist, nothing to delete\n")); + goto done; } ret = sysdb_delete_entry(sysdb, msg->dn, false); -- cgit