mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] rootfs: change permissions of initial device nodes according to LFS 6.1.1
@ 2012-10-16 15:45 Alexander Dahl
  2012-10-16 16:01 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2012-10-16 15:45 UTC (permalink / raw)
  To: ptxdist

Non priviledged users could not write to /dev/null before. Checked the
correct permissions by looking at Ubuntu/Debian and LFS. The
permissions are maybe overwritten by udev, but on targets without udev
but static dev tree, this would prevent non-root users to access these
devices.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/rootfs.make |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/rootfs.make b/rules/rootfs.make
index 4ba33d1..1f9a0f0 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -38,9 +38,9 @@ ifdef PTXCONF_ROOTFS_DEV
 	@$(call install_copy, rootfs, 0, 0, 0755, /dev)
 endif
 ifdef PTXCONF_ROOTFS_DEV_INITIAL
-	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 3, /dev/null)
-	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 5, /dev/zero)
-	@$(call install_node, rootfs, 0, 0, 0600, c, 5, 1, /dev/console)
+	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 3, /dev/null)
+	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 5, /dev/zero)
+	@$(call install_node, rootfs, 0, 0, 0622, c, 5, 1, /dev/console)
 endif
 ifdef PTXCONF_ROOTFS_HOME
 	@$(call install_copy, rootfs, 0, 0, 2775, /home)
-- 
1.7.2.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] rootfs: change permissions of initial device nodes according to LFS 6.1.1
  2012-10-16 15:45 [ptxdist] [PATCH] rootfs: change permissions of initial device nodes according to LFS 6.1.1 Alexander Dahl
@ 2012-10-16 16:01 ` Michael Olbrich
  2012-10-17  7:22   ` [ptxdist] [PATCH] rootfs: change permissions of initial device nodes Alexander Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2012-10-16 16:01 UTC (permalink / raw)
  To: ptxdist

On Tue, Oct 16, 2012 at 05:45:32PM +0200, Alexander Dahl wrote:
> Non priviledged users could not write to /dev/null before. Checked the
> correct permissions by looking at Ubuntu/Debian and LFS. The
> permissions are maybe overwritten by udev, but on targets without udev
> but static dev tree, this would prevent non-root users to access these
> devices.

I can accept the changes for /dev/null and /dev/zero, but I don't think
user processes should access /dev/console. That's what ttys are for.

Michael

> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
>  rules/rootfs.make |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/rootfs.make b/rules/rootfs.make
> index 4ba33d1..1f9a0f0 100644
> --- a/rules/rootfs.make
> +++ b/rules/rootfs.make
> @@ -38,9 +38,9 @@ ifdef PTXCONF_ROOTFS_DEV
>  	@$(call install_copy, rootfs, 0, 0, 0755, /dev)
>  endif
>  ifdef PTXCONF_ROOTFS_DEV_INITIAL
> -	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 3, /dev/null)
> -	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 5, /dev/zero)
> -	@$(call install_node, rootfs, 0, 0, 0600, c, 5, 1, /dev/console)
> +	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 3, /dev/null)
> +	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 5, /dev/zero)
> +	@$(call install_node, rootfs, 0, 0, 0622, c, 5, 1, /dev/console)
>  endif
>  ifdef PTXCONF_ROOTFS_HOME
>  	@$(call install_copy, rootfs, 0, 0, 2775, /home)
> -- 
> 1.7.2.5
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH] rootfs: change permissions of initial device nodes
  2012-10-16 16:01 ` Michael Olbrich
@ 2012-10-17  7:22   ` Alexander Dahl
  2012-10-18 12:35     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2012-10-17  7:22 UTC (permalink / raw)
  To: ptxdist

Non priviledged users could not write to /dev/null before. Checked the
correct permissions by looking at Ubuntu/Debian and LFS. The
permissions are maybe overwritten by udev, but on targets without udev
but static dev tree, this would prevent non-root users to access these
devices.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/rootfs.make |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/rootfs.make b/rules/rootfs.make
index 4ba33d1..602391f 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -38,8 +38,8 @@ ifdef PTXCONF_ROOTFS_DEV
 	@$(call install_copy, rootfs, 0, 0, 0755, /dev)
 endif
 ifdef PTXCONF_ROOTFS_DEV_INITIAL
-	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 3, /dev/null)
-	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 5, /dev/zero)
+	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 3, /dev/null)
+	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 5, /dev/zero)
 	@$(call install_node, rootfs, 0, 0, 0600, c, 5, 1, /dev/console)
 endif
 ifdef PTXCONF_ROOTFS_HOME
-- 
1.7.2.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] rootfs: change permissions of initial device nodes
  2012-10-17  7:22   ` [ptxdist] [PATCH] rootfs: change permissions of initial device nodes Alexander Dahl
@ 2012-10-18 12:35     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2012-10-18 12:35 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 17, 2012 at 09:22:52AM +0200, Alexander Dahl wrote:
> Non priviledged users could not write to /dev/null before. Checked the
> correct permissions by looking at Ubuntu/Debian and LFS. The
> permissions are maybe overwritten by udev, but on targets without udev
> but static dev tree, this would prevent non-root users to access these
> devices.
> 
> Signed-off-by: Alexander Dahl <post@lespocky.de>

Thanks, applied.

Michael

> ---
>  rules/rootfs.make |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/rootfs.make b/rules/rootfs.make
> index 4ba33d1..602391f 100644
> --- a/rules/rootfs.make
> +++ b/rules/rootfs.make
> @@ -38,8 +38,8 @@ ifdef PTXCONF_ROOTFS_DEV
>  	@$(call install_copy, rootfs, 0, 0, 0755, /dev)
>  endif
>  ifdef PTXCONF_ROOTFS_DEV_INITIAL
> -	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 3, /dev/null)
> -	@$(call install_node, rootfs, 0, 0, 0644, c, 1, 5, /dev/zero)
> +	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 3, /dev/null)
> +	@$(call install_node, rootfs, 0, 0, 0666, c, 1, 5, /dev/zero)
>  	@$(call install_node, rootfs, 0, 0, 0600, c, 5, 1, /dev/console)
>  endif
>  ifdef PTXCONF_ROOTFS_HOME
> -- 
> 1.7.2.5
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-18 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 15:45 [ptxdist] [PATCH] rootfs: change permissions of initial device nodes according to LFS 6.1.1 Alexander Dahl
2012-10-16 16:01 ` Michael Olbrich
2012-10-17  7:22   ` [ptxdist] [PATCH] rootfs: change permissions of initial device nodes Alexander Dahl
2012-10-18 12:35     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox