]> granicus.if.org Git - shadow/commitdiff
Fix removal of ranges.
authorNicolas François <nicolas.francois@centraliens.net>
Mon, 12 Aug 2013 21:57:32 +0000 (23:57 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Mon, 12 Aug 2013 21:57:32 +0000 (23:57 +0200)
* lib/subordinateio.c: Fix removal of ranges. The database needs
to be marked as changed or commonio_close will discard any change.

ChangeLog
lib/subordinateio.c

index aa482afdd8d4c861d274b28fc4fe6f0d98b30d2f..42483eb777d07ac14d52c1fef75aa8cf80a952b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
index 4196434b014793ecdebef589e2dfbab6a66b2b57..34630f2c608e43bf522ee0cf9f6e0cc94a92a3c6 100644 (file)
@@ -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;
                }
        }