Skip to content

svc: allow longer user and group names - #507

Merged
troglobit merged 1 commit into
finit-project:masterfrom
anees-r3hman:master
Sep 27, 2026
Merged

troglobit merged 1 commit into
finit-project:masterfrom
anees-r3hman:master

Conversation

@anees-r3hman

Copy link
Copy Markdown

Service user and group names are currently limited to 15 characters because
they are stored in 16-byte buffers. Longer names are silently truncated before
being passed to getpwnam() or getgrnam(), preventing affected services from
starting.

Increase MAX_USER_LEN to MAX_ARG_LEN, allowing names up to 63 characters.
This covers service users, primary groups, supplementary groups, and initctl
status output.

Service user and group names are stored in 16-byte buffers, limiting
them to 15 characters. This silently truncates longer names before
getpwnam() and getgrnam(), preventing services configured with valid
longer account names from starting.

Increase the buffers to match the existing maximum configuration
argument length.

Signed-off-by: Anees Rehman <anees.rehman@atlascopco.com>
@troglobit
troglobit merged commit 24911eb into finit-project:master Sep 27, 2026
@troglobit

Copy link
Copy Markdown
Collaborator

Thanks! Merged to master for the next -rc of 5.0, and to 4.x as 0448151 for the upcoming 4.18.

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.

2 participants