summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_ops.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-08 13:45:55 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:03 +0100
commitc14184c07634801cda7864aa17c6fa8dc9ab43d1 (patch)
tree2dfce6637085a2c5975eb610cfd1c724c424b293 /src/db/sysdb_ops.c
parent46675b5033169e1e954cd570413ce85b2c5e11fc (diff)
downloadsssd-c14184c07634801cda7864aa17c6fa8dc9ab43d1.tar.gz
sssd-c14184c07634801cda7864aa17c6fa8dc9ab43d1.tar.xz
sssd-c14184c07634801cda7864aa17c6fa8dc9ab43d1.zip
Move mpg flag to the domain where it belongs
A sysdb contains now multiple domains, but the mpg property is a property of a specific domain not of the underlying database.
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r--src/db/sysdb_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 5e6f6fb0a..46ab64d39 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1086,7 +1086,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
uint32_t id;
int ret;
- if (sysdb->mpg) {
+ if (domain->mpg) {
if (gid != 0) {
DEBUG(0, ("Cannot add user with arbitrary GID in MPG domain!\n"));
return EINVAL;
@@ -1120,7 +1120,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
return ret;
}
- if (sysdb->mpg) {
+ if (domain->mpg) {
/* In MPG domains you can't have groups with the same name as users,
* search if a group with the same name exists.
* Don't worry about users, if we try to add a user with the same
@@ -1161,7 +1161,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
ret = sysdb_attrs_add_uint32(id_attrs, SYSDB_UIDNUM, id);
if (ret) goto done;
- if (sysdb->mpg) {
+ if (domain->mpg) {
ret = sysdb_attrs_add_uint32(id_attrs, SYSDB_GIDNUM, id);
if (ret) goto done;
}
@@ -1300,7 +1300,7 @@ int sysdb_add_group(struct sysdb_ctx *sysdb,
return ret;
}
- if (sysdb->mpg) {
+ if (domain->mpg) {
/* In MPG domains you can't have groups with the same name as users,
* search if a group with the same name exists.
* Don't worry about users, if we try to add a user with the same
@@ -1710,7 +1710,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
if (ret) goto fail;
}
- if (uid && !gid && sysdb->mpg) {
+ if (uid && !gid && domain->mpg) {
ret = sysdb_attrs_add_uint32(attrs, SYSDB_GIDNUM, uid);
if (ret) goto fail;
}