Fix edge cases when specifying the user to run as.

* check the username fits the format expected by adduser;
 * don't allow root;
 * if the user exists, don't try to create it; usually, this is
   harmless, but it fails if the user exists with a UID outside the
   normal range for system users.

Fixes .
This commit is contained in:
Oliver Jowett 2015-02-19 22:41:39 +00:00
parent f391bf4b22
commit ab8c4db85b
5 changed files with 34 additions and 6 deletions

View file

@ -332,3 +332,7 @@ Type: error
Template: dump1090-mutability/invalid-is_valid_gain
Description: Value must be a numeric gain value, or "max", or "agc".
Type: error
Template: dump1090-mutability/invalid-is_non_root_user
Description: Value must be a username (without spaces) that isn't root.
Type: error