summaryrefslogtreecommitdiffstats
path: root/server/db
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-10 09:13:25 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-10 14:02:43 -0400
commit28bbb2ec4c5f29339488f07f63f55e5c6657e9a1 (patch)
treeec48cb796e5af1726e4642dbd7faccea4534f77b /server/db
parent3f36267012d444acabbf0b003af30af4644344bc (diff)
downloadsssd-28bbb2ec4c5f29339488f07f63f55e5c6657e9a1.tar.gz
sssd-28bbb2ec4c5f29339488f07f63f55e5c6657e9a1.tar.xz
sssd-28bbb2ec4c5f29339488f07f63f55e5c6657e9a1.zip
Do not fail enumerations because of range checks
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/db/sysdb_ops.c b/server/db/sysdb_ops.c
index 8610e634b..687c754f6 100644
--- a/server/db/sysdb_ops.c
+++ b/server/db/sysdb_ops.c
@@ -1692,14 +1692,14 @@ struct tevent_req *sysdb_add_user_send(TALLOC_CTX *mem_ctx,
(uid < domain->id_min || uid > domain->id_max)) {
DEBUG(2, ("Supplied uid [%d] is not in the allowed range [%d-%d].\n",
uid, domain->id_min, domain->id_max));
- ERROR_OUT(ret, EINVAL, fail);
+ ERROR_OUT(ret, ERANGE, fail);
}
if (domain->id_max != 0 && gid != 0 &&
(gid < domain->id_min || gid > domain->id_max)) {
DEBUG(2, ("Supplied gid [%d] is not in the allowed range [%d-%d].\n",
gid, domain->id_min, domain->id_max));
- ERROR_OUT(ret, EINVAL, fail);
+ ERROR_OUT(ret, ERANGE, fail);
}
if (domain->mpg) {
@@ -2104,7 +2104,7 @@ struct tevent_req *sysdb_add_group_send(TALLOC_CTX *mem_ctx,
(gid < domain->id_min || gid > domain->id_max)) {
DEBUG(2, ("Supplied gid [%d] is not in the allowed range [%d-%d].\n",
gid, domain->id_min, domain->id_max));
- ERROR_OUT(ret, EINVAL, fail);
+ ERROR_OUT(ret, ERANGE, fail);
}
if (domain->mpg) {