]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/getdef.c: def_load(): Don't handle '"' specially master
authorAlejandro Colomar <alx@kernel.org>
Tue, 14 Jul 2026 12:40:43 +0000 (14:40 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Thu, 30 Jul 2026 11:51:22 +0000 (13:51 +0200)
commit855d15a04625818fa28a94e693dd4dc7acfb5af3
tree67efa9af3ede661085113cb1ada220ecd00ac24b
parent2bf36b7fdafb800cf4152f813d9b3e0682f30552
lib/getdef.c: def_load(): Don't handle '"' specially

That handling of '"' in login.defs(5) is undocumented, and doesn't seem
very robust:

name  "this value"string

The line above will be taken as if the value was 'this value', with the
remainder completely ignored.  Another weird case is:

name value"string

where the value is 'value'.

Since this is undocumented, brittle, and most likely not used, let's
remove it entirely.  After all, it's entirely useless.

The following entry

name value string

is interpreted as having a value of 'value string', as one would expect.
The quotations don't provide absolutely any value (they don't serve to
escape any characters) at all, and seem dangerous instead.

Fixes: 45c6603cc86c (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)")
Closes: <https://github.com/shadow-maint/shadow/issues/1674>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/getdef.c