Bug#868269: Regression from jessie to stretch in handling of %u, %U, %s, and %h

Michael Biebl biebl at debian.org
Thu Nov 15 23:55:21 GMT 2018


On Sat, 9 Sep 2017 17:18:35 -0700 Josh Triplett <josh at joshtriplett.org>
wrote:
> On Sun, Sep 10, 2017 at 01:43:09AM +0200, Michael Biebl wrote:
> > On Thu, 13 Jul 2017 15:09:29 -0700 Josh Triplett <josh at joshtriplett.org>
> > wrote:
> > > Package: systemd
> > > Version: 233-10
> > > Severity: normal
> > > 
> > > I'm not suggesting a change here, but I do think this could use
> > > documentation in the release notes and NEWS.Debian file.
> > > 
> > > Commit 79413b673b45adc98dfeaec882bbdda2343cb2f9 in systemd 228 (between
> > > jessie and stretch) effectively broke/disabled the %u, %U, %s and %h
> > > specifiers in units.  I ran into this with a local unit that used %u,
> > > which went from expanding to the value of User to expanding to "root".
> > > It took quite a bit of investigating to figure out the cause.
> > > 
> > > At a minimum, I would suggest adding something to the stretch release
> > > notes about this, as well as a NEWS.Debian entry.
> > > 
> > > You might also consider, in your next stretch-proposed-updates upload,
> > > including the same NEWS.Debian entry.
> > 
> > While I'm a bit wary of the inflationary use of NEWS.Debian, I'd be ok
> > with adding a NEWS entry if one was provided in this case.
> > Josh, would you be willing to write such a text?
> 
> Sure. How does this look?
> 
> systemd 228 changed the behavior of the %u, %U, %s, and %h specifiers.
> They were previously documented as returning the user name, numeric user
> ID, shell, and home directory of the user configured to run a unit.
> However, PID 1 cannot safely perform lookups in the username database,
> due to NSS; thus, these directives already did not work consistently for
> non-root users. In particular, %u and %U would only resolve whichever of
> a name or UID was configured via the User= directive.
> 
> In systemd 228 and later, these directives always return the information
> for the user running systemd (root for the system instance), not the
> unit's configured user. Units shipped by Debian do not use these
> directives. Please update any local units that use these directives.
> 
> For instanced units that use the instance name as the user, substitute
> that instance name for %u. For other units, substitute the appropriate
> information directly, or run a script at launch time that looks up the
> desired information.

Hm, just to clarify, are you suggesting this should be documented in the
buster release notes?
I somehow feel that we missed the boat here and given that we didn't
really have any bug reports regarding this issue, I'm not sure if it's
worth mentioning as promimently as in NEWS.Debian.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20181116/324974ef/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list