Wouldn't it be easier to either use a custom /etc/passwd, or create a /root
dir in the filesystem ? That sounds better than patching systemd.

Guillermo

2016-07-26 14:09 GMT+02:00 David Jander <david.jander@protonic.nl>:

Dear Michael,

I have prepared a patch against ptxdist git for the package systemd-230.
I would like to know the right way to proceed to submit this patch, since I am
not a ptxdist developer and am not familiar with how tools like
git-ptxdist-patch are supposed to be used (to generate the correct series file
in this case).

The patch is really trivial and I don't know if it deserves so much work (I
suspect that I have to clone the git repository of systemd first and apply all
patches there, right?).

What I am trying to fix here is the notion that systemd has about what the
$HOME directory of the user 'root' (uid=0) should be. As it seems, in systemd
this is hardcoded to be "/root", while ptxdist by default seems to insist in
"/home" for some reason (according to shipped /etc/passwd). Here's the gist
of what the patch does:

--- systemd-230.orig/src/basic/user-util.c
+++ systemd-230/src/basic/user-util.c
@@ -123,7 +123,7 @@ int get_user_creds(
                         *gid = 0;

                 if (home)
-                        *home = "/root";
+                        *home = "/home";

                 if (shell)
                         *shell = "/bin/sh";

Without this patch, things like services that declare "User=root" get screwed
up with the wrong home directory for example.

Thanks.

Best regards,

--
David Jander
Protonic Holland.

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de



--
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com