Bug 69557

Summary: Using %h with inexistent user results in "cannot allocate memory"
Product: systemd Reporter: Florian Bruhin <freedesktop.org>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: example service file

Description Florian Bruhin 2013-09-19 06:46:06 UTC
Created attachment 86122 [details]
example service file

Hi,

I'm using systemd 207 on an Archlinux.

When using %h and setting User= to an user which does not exist, I get the following, non-descriptive error in my journal:

test.service failed to run 'start' task: Cannot allocate memory

See the attached service file for an example. Probably, the user check should take place before %h gets substituted or so.
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-09-19 15:28:55 UTC
This was a limitation of the internal API - NULL would be returned on all errors. It is fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=19f6d7107.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.