HomePhorge

(#1076) Show warning if an empty group is specified
c6d656ae204cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#1076) Show warning if an empty group is specified

If the user passes an empty group to the user type, puppet will execute
an invalid usermod command.

e.g. if groups of user 'foo' is currently 'bar' and we do

user { 'foo':
  groups     => '',
  membership => minimum # this is the default
}

puppet will build a should value of ',bar' (old group + the new group '') and
will pass '-G ,bar' to the usermod command (which will then fail).

To really specifiy 'no group' the group property does allow an empty
array so we should fail if we find an empty string as a group.

Details

Provenance
Stefan Schulte <stefan.schulte@taunusstein.net>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUe1f995705242: Maint: Remove unused mock objects in user spec
Branches
Unknown
Tags
Unknown

Event Timeline

Stefan Schulte <stefan.schulte@taunusstein.net> committed rPUc6d656ae204c: (#1076) Show warning if an empty group is specified (authored by Stefan Schulte <stefan.schulte@taunusstein.net>).Feb 27 2012, 1:12 AM