BUG/MINOR: unix: properly check for octal digits in the "mode" argument
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Oct 2017 12:43:44 +0000 (14:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Oct 2017 12:43:44 +0000 (14:43 +0200)
commita1a247bd90248f92005b3a456b0ccabc11efe602
treea4fac74d0ecb49462e3c15a11282a712177ace59
parentc09572fd8be6e7d7a1207bca31e14856ee7ac9d2
BUG/MINOR: unix: properly check for octal digits in the "mode" argument

A config containing "stats socket /path/to/socket mode admin" used to
silently start and be unusable (mode 0, level user) because the "mode"
parser doesn't take care of non-digits. Now it properly reports :

   [ALERT] 276/144303 (7019) : parsing [ext-check.cfg:4] : 'stats socket' : ''mode' : missing or invalid mode 'admin' (octal integer expected)'

This can probably be backported to 1.7, 1.6 and 1.5, though reporting
parsing errors in very old versions probably isn't a good idea if the
feature was left unused for years.
src/proto_uxst.c