fix path expansion to accept valid POSIX usernames
authorManzur Mukhitdinov <manzurmm@gmail.com>
Sat, 12 Nov 2016 19:16:20 +0000 (20:16 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 19 Nov 2016 21:31:36 +0000 (22:31 +0100)
commitbf785ec9c2b1284287edfb5fef4dc3564ac0ec5a
treeb6e4235690b4b4fabbebb5b72d49adc9ab88dc86
parent2a25b3b0402df288e047201c9942689c31695055
fix path expansion to accept valid POSIX usernames

To be portable across systems conforming to POSIX.1-2008, the
username is composed of characters from the portable filename character
set([A-Za-z._-])[1][2].

The <hyphen-minus> character should not be used as the first
character of a portable user name.

Links:
[1] Username format:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_435

[2] Portable filename character set:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282
src/ascii.h
src/util.c