Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host
Date: Tue, 8 May 2018 23:37:21 +0200	[thread overview]
Message-ID: <1fdbacbd-e80f-8735-89c8-2ca92224ee9a@mind.be> (raw)
In-Reply-To: <CAF7Xa=2FFzbnC8O7JRWCQrQN3ZA3ffNR=3v8c=nXFe+4Uzmc+w@mail.gmail.com>

[Added Matt as

On 07-05-18 17:00, M ZV wrote:
> Hello,?
> ?
> 
> 
>     On Thu, May 3, 2018 at 11:04 PM Yann E. MORIN <yann.morin.1998@free.fr
>     <mailto:yann.morin.1998@free.fr>> wrote:
> 
>         ditch our own bundled version, and switch to making our whois package a
>         hot pacakge, and use that as the provider for mkpasswd.
> 
>         Stefan, would you want to do that? ;-)
> 
> 
>     I'll give it a go, but can only work on this in a few weeks when I get some
>     free cycles...
> 
>     Regards, Stefan
> 
> 
> We're using?mkpasswd specifically for a single task (skeleton-init-common root
> password generation). I'm already tackling building this on Alpine (musl

 Yes, Alpine is a pain :-)

> environment) and facing?
> multiple issues: had to use -lintl for linking (that libintl musl/glibc can of
> worms) and of course, it only makes md5 hashes since all SHA functionalities are
> disabled on non-glibc systems via its header.
> 
> Can we just use a couple of python code using?crypt.crypt(...), since python is
> already a requirement. One less package to maintain is a good news (buildroots
> already brimming with a mind boggling?number of packages).

 Great idea! Indeed, the python script would be rather trivial - mostly
generating salt.

 Probably, when doing that, more of the mkusers script could migrate to python.
But to start with it could be a python "oneliner":

	dd if=/dev/urandom bs=1 count=12 | python -c "
			import sys, crypt, base64
			salt = sys.stdin.read()
			b64salt = base64.b64encode(salt, './')
			b64salt = b64salt.strip('=')
			print(crypt.crypt('${password}',
				'${PASSWD_METHOD}' + b64salt))"


 Normally, I'd say I want to avoid calling python in the normal build path
(because of python overhead, because it's a hard-to-reproduce environment,
because of python2/3 uncertainty, ...). However, that ship has sailed with the
introduction of check-uniq-files.


 Would you like to prepare a patch introducing the python-based approach? It
should be two patches: the first one introducing the python script in mkusers,
the second one removing the mkpasswd package.


 Regards,
 Arnout

> By the way, my first post here, I hope I'm not coming off as a nagging
> pedestrian just adding noise. I highly appreciate the effort you guys are
> putting into this.
> Thank you.
> 
> (My apologies for double posting - it seems, at first, I didn't reply to all)
> 
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2018-05-08 21:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02  9:05 [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host Stefan Becker
2018-05-02 17:57 ` Yann E. MORIN
2018-05-02 18:23   ` Stefan Becker
2018-05-02 20:38     ` Arnout Vandecappelle
2018-05-02 21:04       ` Yann E. MORIN
2018-05-03  6:11       ` Stefan Becker
2018-05-02 21:06     ` Yann E. MORIN
2018-05-03 19:56 ` Thomas Petazzoni
2018-05-03 20:04   ` Yann E. MORIN
2018-05-06 16:19     ` Stefan Becker
2018-05-07 15:00       ` M ZV
2018-05-08 21:37         ` Arnout Vandecappelle [this message]
2018-05-09 20:22           ` Yann E. MORIN
2018-05-10 16:02             ` M ZV
2018-05-29  7:37             ` Peter Korsgaard
2018-05-30 15:31               ` Yann E. MORIN
2018-05-30 16:45                 ` Arnout Vandecappelle
2018-06-01 12:58                   ` [Buildroot] [PATCH proposal/next] replace host-mkpasswd Stefan Becker
2018-06-01 12:58                     ` [Buildroot] [PATCH proposal/next 1/2] package/busybox: add host variant Stefan Becker
2018-06-01 13:03                       ` Thomas Petazzoni
2018-06-01 12:59                     ` [Buildroot] [PATCH proposal/next 2/2] package/mkpasswd: remove obsolete package Stefan Becker
2018-06-01 13:30                     ` [Buildroot] [PATCHv2 propsal/next] replace host-mkpasswd Stefan Becker
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 1/3] package/busybox: add host variant Stefan Becker
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 2/3] build: replace host-mkpasswd with host-busybox Stefan Becker
2018-06-04 22:21                         ` Arnout Vandecappelle
2018-06-05 11:22                           ` Carlos Santos
2018-06-05 16:15                             ` Yann E. MORIN
2018-06-05 16:35                               ` Christopher McCrory
2018-06-05 16:50                                 ` Yann E. MORIN
2018-06-07 21:29                                   ` Arnout Vandecappelle
2018-06-08 11:40                                     ` Stefan Becker
2018-06-08 17:13                                       ` Yann E. MORIN
2018-06-05 16:08                           ` Yann E. MORIN
2018-06-18  5:13                             ` Peter Korsgaard
2018-06-18  6:53                               ` Thomas Petazzoni
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 3/3] package/mkpasswd: remove obsolete package Stefan Becker
2018-05-29  6:43     ` [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host Stefan Becker
2018-05-03 21:26 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fdbacbd-e80f-8735-89c8-2ca92224ee9a@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox