summaryrefslogtreecommitdiffstats
path: root/server/db
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-04-24 16:14:17 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-04-27 07:09:26 -0400
commit567612e262c69d71f66f9b2b62b6f8e2839d91b5 (patch)
tree928a5271ad349cbe09b31f149af05cbd705bacc1 /server/db
parent9ed4394fb569d64a61e27784a73e2068393e7fa0 (diff)
downloadsssd-567612e262c69d71f66f9b2b62b6f8e2839d91b5.tar.gz
sssd-567612e262c69d71f66f9b2b62b6f8e2839d91b5.tar.xz
sssd-567612e262c69d71f66f9b2b62b6f8e2839d91b5.zip
enable uid/gid generation again
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb_ops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/db/sysdb_ops.c b/server/db/sysdb_ops.c
index 7daf11706..041e10b7a 100644
--- a/server/db/sysdb_ops.c
+++ b/server/db/sysdb_ops.c
@@ -868,13 +868,15 @@ int sysdb_add_user(struct sysdb_req *sysreq,
return EINVAL;
}
- if (domain->id_max != 0 && (uid < domain->id_min || uid > domain->id_max)) {
+ if (domain->id_max != 0 && uid != 0 &&
+ (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));
return EINVAL;
}
- if (domain->id_max != 0 && (gid < domain->id_min || gid > domain->id_max)) {
+ 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));
return EINVAL;
@@ -1065,7 +1067,8 @@ int sysdb_add_group(struct sysdb_req *sysreq,
return EINVAL;
}
- if (domain->id_max != 0 && (gid < domain->id_min || gid > domain->id_max)) {
+ 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));
return EINVAL;