Update group handling: set primary gid, leave suplemental with group users

- If NB_GID is set, it is likely that files created should have NB_GID
  as their gid (if it doesn't matter, then this change is irrelevant.
  If it does matter, the liklihood that 100 matches with what the user
  wants is low).
- When NB_GID is set, create a new group with that gid.  Then, set
  this as the primary gid of the user.  Set the user's supplemental
  gids to NB_GID,100.
This commit is contained in:
Richard Darst
2018-08-01 23:42:06 +03:00
parent 8d22c86ed4
commit fc72be36ad
2 changed files with 6 additions and 5 deletions

View File

@@ -57,8 +57,8 @@ def test_gid_change(container):
)
c.wait(timeout=10)
logs = c.logs(stdout=True).decode('utf-8')
assert 'gid=100(users)' in logs
assert 'groups=100(users),110(jovyan)' in logs
assert 'gid=110(jovyan)' in logs
assert 'groups=110(jovyan),100(users)' in logs
def test_sudo(container):