This is a significant refactoring, replacing the old getUserBy*()
functions with a new Principal class, and replacing the old
CalDAVPrincipal class with a new DAVPrincipal class which extends
the Principal class.
At this point all regression tests pass (again) but there could
well be issues for people who use alternative authenticators
such as LDAP, although I have endeavoured to resolve those
potential issues.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
PAM authentication uses a regular expression to extract the user's real
name from the 'user name or comment field' passwd file when creating a
new account.
The current regular expression assumes the comment field contains the
user name followed by a comma and some other comma-delimited information
(the Linux 'adduser' command adds room number, work phone, home phone
and 'other' info given half a chance).
If the field just contains the user name, there is no trailing comma
and the RE match fails. Make the trailing comma optional.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>