* [ptxdist] [PATCH] treewide: Consistently use ':' instead to separate user and group for chown
@ 2022-12-16 10:45 Uwe Kleine-König
2023-01-03 11:08 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2022-12-16 10:45 UTC (permalink / raw)
To: ptxdist
Since coreutils 9.1 chown warns when a '.' is used as separator. Fix this
consistently also for documentation and scripts that are expected to use
busybox's chown which (up to now) has no problem with '.'.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
config/busybox/Config.in | 4 ++--
config/busybox/networking/Config.in | 2 +-
projectroot/usr/sbin/mysqlinit | 2 +-
scripts/lib/ptxd_lib_dopermissions.awk | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/config/busybox/Config.in b/config/busybox/Config.in
index 199cc6ab272f..329e2f8e8a1b 100644
--- a/config/busybox/Config.in
+++ b/config/busybox/Config.in
@@ -267,10 +267,10 @@ config BUSYBOX_FEATURE_SUID_CONFIG
The file has to be owned by user root, group root and has to be
writeable only by root:
- (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
+ (chown 0:0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
The busybox executable has to be owned by user root, group
root and has to be setuid root for this to work:
- (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
+ (chown 0:0 /bin/busybox; chmod 4755 /bin/busybox)
Robert 'sandman' Griebl has more information here:
<url: http://www.softforge.de/bb/suid.html >.
diff --git a/config/busybox/networking/Config.in b/config/busybox/networking/Config.in
index 3a3ad56d93f7..27e0f44ba811 100644
--- a/config/busybox/networking/Config.in
+++ b/config/busybox/networking/Config.in
@@ -959,7 +959,7 @@ config BUSYBOX_TELNETD
FEATURE_SUID enabled. And finally, you should make
certain that busybox has been installed setuid root:
- chown root.root /bin/busybox
+ chown root:root /bin/busybox
chmod 4755 /bin/busybox
with all that done, telnetd _should_ work....
diff --git a/projectroot/usr/sbin/mysqlinit b/projectroot/usr/sbin/mysqlinit
index 72b6d1f10cf5..c98946025264 100644
--- a/projectroot/usr/sbin/mysqlinit
+++ b/projectroot/usr/sbin/mysqlinit
@@ -5,7 +5,7 @@ MYSQLD_OPTS=
# since mySQL runs as a regular user, we need to give its working directory
# to it.
-chown mysql.mysql "$1"
+chown mysql:mysql "$1"
chmod 0755 "$1"
# now let mySQL do its initializing job
diff --git a/scripts/lib/ptxd_lib_dopermissions.awk b/scripts/lib/ptxd_lib_dopermissions.awk
index 56e951b45b75..9ab45d4979dd 100755
--- a/scripts/lib/ptxd_lib_dopermissions.awk
+++ b/scripts/lib/ptxd_lib_dopermissions.awk
@@ -7,14 +7,14 @@ BEGIN {
$1 ~ "[df]" {
printf("chmod %s '.%s'\n" \
- "chown %s.%s '.%s'\n", \
+ "chown %s:%s '.%s'\n", \
$5, $2, $3, $4, $2);
}
$1 ~ "n" {
printf("if [ ! \\( -b '.%s' -o -c '.%s' -o -p '.%s' \\) ]; then " \
" mknod -m %s '.%s' %s %s %s\n" \
- " chown %s.%s '.%s'\n" \
+ " chown %s:%s '.%s'\n" \
"fi\n", \
$2, $2, $2, $5, $2, $6, $7, $8, $3, $4, $2);
}
--
2.38.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] treewide: Consistently use ':' instead to separate user and group for chown
2022-12-16 10:45 [ptxdist] [PATCH] treewide: Consistently use ':' instead to separate user and group for chown Uwe Kleine-König
@ 2023-01-03 11:08 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2023-01-03 11:08 UTC (permalink / raw)
To: ptxdist; +Cc: Uwe Kleine-König
Thanks, applied as f51d04cbcf2c0f5a014b319d554700ead28e5d84.
Michael
[sent from post-receive hook]
On Tue, 03 Jan 2023 12:08:34 +0100, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> Since coreutils 9.1 chown warns when a '.' is used as separator. Fix this
> consistently also for documentation and scripts that are expected to use
> busybox's chown which (up to now) has no problem with '.'.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Message-Id: <20221216104522.116336-1-u.kleine-koenig@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/config/busybox/Config.in b/config/busybox/Config.in
> index 199cc6ab272f..329e2f8e8a1b 100644
> --- a/config/busybox/Config.in
> +++ b/config/busybox/Config.in
> @@ -267,10 +267,10 @@ config BUSYBOX_FEATURE_SUID_CONFIG
>
> The file has to be owned by user root, group root and has to be
> writeable only by root:
> - (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
> + (chown 0:0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
> The busybox executable has to be owned by user root, group
> root and has to be setuid root for this to work:
> - (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
> + (chown 0:0 /bin/busybox; chmod 4755 /bin/busybox)
>
> Robert 'sandman' Griebl has more information here:
> <url: http://www.softforge.de/bb/suid.html >.
> diff --git a/config/busybox/networking/Config.in b/config/busybox/networking/Config.in
> index 3a3ad56d93f7..27e0f44ba811 100644
> --- a/config/busybox/networking/Config.in
> +++ b/config/busybox/networking/Config.in
> @@ -959,7 +959,7 @@ config BUSYBOX_TELNETD
> FEATURE_SUID enabled. And finally, you should make
> certain that busybox has been installed setuid root:
>
> - chown root.root /bin/busybox
> + chown root:root /bin/busybox
> chmod 4755 /bin/busybox
>
> with all that done, telnetd _should_ work....
> diff --git a/projectroot/usr/sbin/mysqlinit b/projectroot/usr/sbin/mysqlinit
> index 72b6d1f10cf5..c98946025264 100644
> --- a/projectroot/usr/sbin/mysqlinit
> +++ b/projectroot/usr/sbin/mysqlinit
> @@ -5,7 +5,7 @@ MYSQLD_OPTS=
> # since mySQL runs as a regular user, we need to give its working directory
> # to it.
>
> -chown mysql.mysql "$1"
> +chown mysql:mysql "$1"
> chmod 0755 "$1"
>
> # now let mySQL do its initializing job
> diff --git a/scripts/lib/ptxd_lib_dopermissions.awk b/scripts/lib/ptxd_lib_dopermissions.awk
> index 56e951b45b75..9ab45d4979dd 100755
> --- a/scripts/lib/ptxd_lib_dopermissions.awk
> +++ b/scripts/lib/ptxd_lib_dopermissions.awk
> @@ -7,14 +7,14 @@ BEGIN {
>
> $1 ~ "[df]" {
> printf("chmod %s '.%s'\n" \
> - "chown %s.%s '.%s'\n", \
> + "chown %s:%s '.%s'\n", \
> $5, $2, $3, $4, $2);
> }
>
> $1 ~ "n" {
> printf("if [ ! \\( -b '.%s' -o -c '.%s' -o -p '.%s' \\) ]; then " \
> " mknod -m %s '.%s' %s %s %s\n" \
> - " chown %s.%s '.%s'\n" \
> + " chown %s:%s '.%s'\n" \
> "fi\n", \
> $2, $2, $2, $5, $2, $6, $7, $8, $3, $4, $2);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-03 11:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 10:45 [ptxdist] [PATCH] treewide: Consistently use ':' instead to separate user and group for chown Uwe Kleine-König
2023-01-03 11:08 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox