New UID/GID allocation approach
Previously Unix UIDs/GIDs were allocated by using the highest used ID + 1. This caused ID reuse when the newest user/group was deleted. In addition, the implementation did not work on MariaDB (at all, it was not possible to create users/groups). The new approach accounts for all IDs ever used regardless of whether or not users/groups are deleted. It always allocates the lowest ID in the configured range that was never used. Aside from the different allocation algorithm, this change introduces a generic locking mechanism and prerequisites for testing migration scripts.
Showing
- tests/migrations/__init__.py 0 additions, 0 deletionstests/migrations/__init__.py
- tests/migrations/test_missing_locks.py 16 additions, 0 deletionstests/migrations/test_missing_locks.py
- tests/migrations/versions/__init__.py 0 additions, 0 deletionstests/migrations/versions/__init__.py
- tests/migrations/versions/test_aeb07202a6c8_locking_and_new_id_allocation.py 144 additions, 0 deletions...rsions/test_aeb07202a6c8_locking_and_new_id_allocation.py
- tests/models/test_misc.py 32 additions, 3 deletionstests/models/test_misc.py
- tests/models/test_user.py 101 additions, 22 deletionstests/models/test_user.py
- tests/utils.py 95 additions, 39 deletionstests/utils.py
- uffd/migrations/versions/aeb07202a6c8_locking_and_new_id_allocation.py 158 additions, 0 deletions...ns/versions/aeb07202a6c8_locking_and_new_id_allocation.py
- uffd/models/__init__.py 4 additions, 4 deletionsuffd/models/__init__.py
- uffd/models/misc.py 37 additions, 0 deletionsuffd/models/misc.py
- uffd/models/user.py 117 additions, 40 deletionsuffd/models/user.py
- uffd/translations/de/LC_MESSAGES/messages.mo 0 additions, 0 deletionsuffd/translations/de/LC_MESSAGES/messages.mo
- uffd/translations/de/LC_MESSAGES/messages.po 11 additions, 7 deletionsuffd/translations/de/LC_MESSAGES/messages.po
- uffd/views/group.py 5 additions, 1 deletionuffd/views/group.py
Loading
Please register or sign in to comment