Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* Re: [patch] Add note about there is no default permission mode in umask man page
       [not found] <CAJUC52H2YPD2B7Nh-eDO-QzbwuyYiNokYAWYQU1z0hWRpJ3y8A@mail.gmail.com>
@ 2020-07-24 11:36 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2020-07-24 11:36 UTC (permalink / raw)
  To: kevin dankwardt; +Cc: mtk.manpages, linux-man

Hi Kevin!

On 7/23/20 8:39 PM, kevin dankwardt wrote:
> man pages version 5.08
> 
>>From 884004f93893cb01002d886387c78ba58d1aff53 Mon Sep 17 00:00:00 2001
> From: Kevin Dankwardt <kevin.dankwardt@gmail.com>
> Date: Thu, 23 Jul 2020 11:31:55 -0700
> Subject: [PATCH] Add note about there is no default permission mode
> 
> ---
>  man2/umask.2 | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/man2/umask.2 b/man2/umask.2
> index e74e8ef..6bc8ba1 100644
> --- a/man2/umask.2
> +++ b/man2/umask.2
> @@ -138,6 +138,8 @@ Inspecting this field in
>  .IR /proc/self/status
>  allows a process to retrieve its umask without at the same time changing
> it.
>  .PP
> +The Linux kernel has no default permission modes for created files or
> directories and thus the permission modes are non-deterministic for a file
> or directory created with no requested permission modes.
> +.PP
>  The umask setting also affects the permissions assigned to POSIX IPC
> objects
>  .RB ( mq_open (3),
>  .BR sem_open (3),

The umask(2) page seems the wrong place for a note such as this,
since this doesn't really relate to the umask. I assume that what
you really care about here is a call to open(2) that wrongly 
omits mode:

fd = open(path, O_CREAT | O_RDWR);

The open(2) manual page already warns against that, but I have 
reworded the text in that page a little to further emphasize the
point.

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAJUC52H2YPD2B7Nh-eDO-QzbwuyYiNokYAWYQU1z0hWRpJ3y8A@mail.gmail.com>
2020-07-24 11:36 ` [patch] Add note about there is no default permission mode in umask man page Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git