<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/support/scripts/mkusers, branch 2017.08</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2017.08</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2017.08'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2017-06-24T15:49:48+00:00</updated>
<entry>
<title>support/scripts: allow /etc/shadow to be symlinked</title>
<updated>2017-06-24T15:49:48+00:00</updated>
<author>
<name>Jens Maus</name>
<email>mail@jens-maus.de</email>
</author>
<published>2017-06-12T13:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=82f64203a8f017d50b754323194694374f92add5'/>
<id>urn:sha1:82f64203a8f017d50b754323194694374f92add5</id>
<content type='text'>
This commit fixes a problem where it was not possible to replace
/etc/shadow with a symlink to a e.g. a user partition where the
shadow file is placed. This is required, e.g. for systems where the
rootfs is mounted read-only but users should still be able to be
added. Thus, if within an filesystem overlay setup a user tries
to replace /etc/shadow with a symlink to the real file on a user
partition a buildroot build stops with an error message because
sed is called on the symlink instead of following the symlink.
This commit fixes this shortcoming.

Signed-off-by: Jens Maus &lt;mail@jens-maus.de&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>support/mkusers: rename variable to avoid name clashing</title>
<updated>2017-03-04T10:56:51+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2017-03-03T22:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=00d34e8a6f378653a384c66d68f9a65e13b8034f'/>
<id>urn:sha1:00d34e8a6f378653a384c66d68f9a65e13b8034f</id>
<content type='text'>
The LINES variable is automatically set by bash to represent the number
of lines in the terminal. That variable can be set when the shell
receives SIGWINCH.

If the shell does receive SIGWINCH after our LINES array is filled, the
content of the array is mangled.

Rename the variable to avoid that.

Fixes #9456

Reported-by: George Y. &lt;georgebrmz@oss3d.com&gt;
Reported-by: Paul Stewart &lt;paulstewartis@gmail.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>mkusers: fix spelling in intro comment</title>
<updated>2016-12-20T08:32:06+00:00</updated>
<author>
<name>Danomi Manchego</name>
<email>danomimanchego123@gmail.com</email>
</author>
<published>2016-12-20T03:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=1ac9d83f55f9ec30bd67767fab3c8e09249ae372'/>
<id>urn:sha1:1ac9d83f55f9ec30bd67767fab3c8e09249ae372</id>
<content type='text'>
Signed-off-by: Danomi Manchego &lt;danomimanchego123@gmail.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>support/mkusers: allow comments in users tables</title>
<updated>2015-10-18T15:52:21+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-10-17T15:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=f0c4456530b60e5b5119e74eb52c50cd7317792d'/>
<id>urn:sha1:f0c4456530b60e5b5119e74eb52c50cd7317792d</id>
<content type='text'>
The format of the users table files is non trivial, so it is sometimes
handy to add comments explaining the syntax (or simply the reason for
the user) inline in the files.

Ignore empty lines and comment lines prefixed with '#' similar to shell
or makedevs files.

Packages that defined no user (the vast majority) would cause an empty
line to be present in the internal users table, hence the reason we
skipped empty usernames. Now that we ignore empty lines, we no longer
need to check for empty usernames.

Reported-by: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>scripts/mkusers: allow users with no password value set</title>
<updated>2015-06-09T21:13:41+00:00</updated>
<author>
<name>James Knight</name>
<email>james.knight@rockwellcollins.com</email>
</author>
<published>2015-05-23T17:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=8d972df185de6e841a1752b67e466e8ffc95bfac'/>
<id>urn:sha1:8d972df185de6e841a1752b67e466e8ffc95bfac</id>
<content type='text'>
The following allows a user definition to specify that a created user
entry should not have a password value set. Original implementation
allowed a user definition to provide a password value of "=" (no quotes)
to generate a crypt-encoded empty string value. In some cases, it may be
desired to have no value specified for a user's password. By using a
value "-" for a password, no value will be set in the shadow value.

An example when this can be used is when logging into a terminal.
Logging into a session with an encoded empty password will prompt a user
to enter a password since it does not know the password is empty. If the
password field blank, a login session will not prompt for a password.

Signed-off-by: James Knight &lt;james.knight@rockwellcollins.com&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>support/mkusers: enhance error messages</title>
<updated>2015-03-29T11:39:25+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2015-03-29T09:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=96a8321a3c3edc8f696e14bbd07556582bb5b133'/>
<id>urn:sha1:96a8321a3c3edc8f696e14bbd07556582bb5b133</id>
<content type='text'>
The current error messages are a bit terse, and do not provide all the
required information.

Expand them to provide more context.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Tom Elliott &lt;tommygunsster@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>Change /bin/bash shebangs into /usr/bin/env bash</title>
<updated>2014-10-24T23:55:37+00:00</updated>
<author>
<name>Bjørn Forsman</name>
<email>bjorn.forsman@gmail.com</email>
</author>
<published>2014-10-21T14:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=acc76a6ef9fd204cc79a3d63e90c8b43163bdeab'/>
<id>urn:sha1:acc76a6ef9fd204cc79a3d63e90c8b43163bdeab</id>
<content type='text'>
Not all systems have /bin/bash (e.g. NixOS[1] doesn't). Buildroot
already uses /usr/bin/env shebangs for other interpreters (perl,
python), so why not bash?

This changes only the shebangs used by Buildroot itself; stuff installed
to the target system is left unchanged.

With this applied I can run Buildroot unmodified on NixOS.

[1]: http://nixos.org/

Signed-off-by: Bjørn Forsman &lt;bjorn.forsman@gmail.com&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>scripts/mkusers: allow the creation of groups alone</title>
<updated>2014-10-22T19:39:12+00:00</updated>
<author>
<name>Gustavo Zacarias</name>
<email>gustavo@zacarias.com.ar</email>
</author>
<published>2014-10-21T14:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2ff8f54e7930b029ea6cdf6037af7437f2cc1919'/>
<id>urn:sha1:2ff8f54e7930b029ea6cdf6037af7437f2cc1919</id>
<content type='text'>
Let mkusers create groups alone, useful for supplementary permissions in
udev/systemd for example where users can be added to later at runtime.
Use a magic string "-" to signal that user creation should be skipped.

Signed-off-by: Gustavo Zacarias &lt;gustavo@zacarias.com.ar&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>filesystems: also chown symlinks</title>
<updated>2014-06-09T09:28:57+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2014-06-08T20:02:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=3fbd9887b324f7b64a583243bf0a770527cb5f61'/>
<id>urn:sha1:3fbd9887b324f7b64a583243bf0a770527cb5f61</id>
<content type='text'>
Currently, the symlinks in the generated filesystems will have the
UID of the user running the build, because 'chown' does not change
the ownership of symlinks, by default.

Although the implications are limited, some may not want that UID
to leak in the generated filesystems.

So, use 'chown -h' so even symlinks get properly chowned.

Reported-by: Angelo Dureghello &lt;angelo@barix.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas De Schampheleire &lt;patrickdepinguin@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>support/mkusers: fix warnings when adding a new user</title>
<updated>2014-04-05T16:39:16+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2014-04-05T16:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4955a31cecb698def9eb4b395fc297e56f76d492'/>
<id>urn:sha1:4955a31cecb698def9eb4b395fc297e56f76d492</id>
<content type='text'>
When adding a new user (or a new group), we would get warnings, like:
  [...]/support/scripts/mkusers: line 145: [: too many arguments

This is because we're checking if a UID (or a GID) is already defined,
and/or is different from the requested one, both checks in the same
test.

Of course, if a UID (or a GID) is not defined, it does not have a value,
so we can not compare it to an integer.

Fix that by splitting the test in two, so the second is only executed if
the first is sucessful.

Reported-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
