Fix removal of ranges.
* lib/subordinateio.c: Fix removal of ranges. The database needs to be marked as changed or commonio_close will discard any change.
This commit is contained in:
parent
5d3a785c55
commit
d9d1bb4acb
@ -1,3 +1,8 @@
|
||||
2013-08-12 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/subordinateio.c: Fix removal of ranges. The database needs
|
||||
to be marked as changed or commonio_close will discard any change.
|
||||
|
||||
2013-08-11 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* man/newusers.8.xml: Include documentation of SUB_GID_MIN,
|
||||
|
@ -319,12 +319,14 @@ static int remove_range(struct commonio_db *db,
|
||||
range->count = (last - range->start) + 1;
|
||||
|
||||
ent->changed = true;
|
||||
db->changed = true;
|
||||
}
|
||||
/* Is just the end of the entry removed? */
|
||||
else if ((start > first) && (end >= last)) {
|
||||
range->count = (start - range->start) + 1;
|
||||
|
||||
ent->changed = true;
|
||||
db->changed = true;
|
||||
}
|
||||
/* The middle of the range is removed */
|
||||
else {
|
||||
@ -339,6 +341,7 @@ static int remove_range(struct commonio_db *db,
|
||||
range->count = (start - range->start) + 1;
|
||||
|
||||
ent->changed = true;
|
||||
db->changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user