On 18/02/2017 17:47, Bruce Dubbs wrote:
Pierre Labastie wrote:
Hi,
With shadow 4.4, when running:
-------------
useradd -m -c something somebody
-------------
The entry in /etc/passwd is:
-------------
somebody:x:1001:1001:something:/home/somebody:
-------------
Notice: the shell is not set, the entry should be:
-------------
somebody:x:1001:1001:something:/home/somebody:/bin/bash
-------------
at least if you have not modified /etc/default/useradd

This is a known bug, and has been fixed on master just a
few days after the release of 4.4 version [1].

Since the fix is to move a line, it is not easy to write
a sed command, and I'd suggest making a patch. That patch
could also include the security fix, whose sed
command is rather cryptic...

https://github.com/shadow-maint/shadow/commit/656424167451738b92ec75b0dc033df92cce98e2

Not sure about the security fix.  Can you point me to it?

But the fix above is:

sed -e '2029 a get_defaults ();' \
    -e '2039 d' \
    -i src/useradd.c

It can be all on one line.  I think that is clear enough.

The fixes need ot go into both LFS and BLFS.

  -- Bruce


For me, sed commands using line numbers _are_ cryptic.
Of course I understand them, but I am unable to figure out
what they do, without looking at the file itself, which
involves untarring the package somewhere and seeking the
modified line using its number (not easy with less for example).
In this case, a patch is clearer. Just read it...
The security fix is the sed with line numbers 47 and 60 or so...
Pierre

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to