rcook / ibt

Isolated Build Tool
MIT License
0 stars 0 forks source link

Ibt up: groupadd fails is the primary group contains space #11

Closed joerghall closed 6 years ago

joerghall commented 6 years ago

Ibt up: groupadd fails is the primary group contains spaces and special characters

joerghall commented 6 years ago

https://unix.stackexchange.com/questions/11477/what-are-the-allowed-group-names-for-groupadd

That leaves two options:

1) Sanitize name 2) Add the user and modify the group file after creation

rcook commented 6 years ago

I think sanitizing should be fine. If I recall correctly, that is the purpose of the _sanitize method (https://github.com/rcook/ibt/blob/master/ibt/util.py#L124). I think making appropriate changes to this method would address this problem.

I think I'll have a fix for this one soon.

rcook commented 6 years ago

Fix submitted. It doesn't conform precisely to the answer in the Stack Exchange answer, but I think it'll be close enough. Feel free to tweak it if you feel strongly motivated!