* lib/commonio.c (commonio_remove): Fail when the name to be

removed is used by different entries (like commonio_update does).
* NEWS: This fix the behavior of groupdel when the system is not
  configured to support split group but different group entries
  have the name of the group to be deleted.
This commit is contained in:
nekral-guest
2008-03-08 22:52:44 +00:00
parent 1b808e62df
commit b1a0769d3d
3 changed files with 14 additions and 0 deletions

View File

@ -886,6 +886,10 @@ int commonio_remove (struct commonio_db *db, const char *name)
errno = ENOENT;
return 0;
}
if (next_entry_by_name (db, p->next, name)) {
fprintf (stderr, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), name, db->filename);
return 0;
}
commonio_del_entry (db, p);