Skip to content

lib/getdef.c: def_load(): Don't handle '"' specially#1675

Open
alejandro-colomar wants to merge 1 commit into
shadow-maint:masterfrom
alejandro-colomar:quotes
Open

lib/getdef.c: def_load(): Don't handle '"' specially#1675
alejandro-colomar wants to merge 1 commit into
shadow-maint:masterfrom
alejandro-colomar:quotes

Conversation

@alejandro-colomar

@alejandro-colomar alejandro-colomar commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

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: 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)")
Closes: #1674

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: 45c6603 (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (19990709)")
Closes: <shadow-maint#1674>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling of quotation marks in login.defs(5)

1 participant