note that even set -o noclobber can be coërced into dropping O_EXCL by a TOCTOU
This commit is contained in:
10
mksh.1
10
mksh.1
@@ -1,4 +1,4 @@
|
|||||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.324 2013/11/17 22:24:06 tg Exp $
|
.\" $MirOS: src/bin/mksh/mksh.1,v 1.325 2013/11/30 18:16:54 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1,v 1.148 2013/09/04 15:49:18 millert Exp $
|
.\" $OpenBSD: ksh.1,v 1.148 2013/09/04 15:49:18 millert Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
.\" with -mandoc, it might implement .Mx itself, but we want to
|
.\" with -mandoc, it might implement .Mx itself, but we want to
|
||||||
.\" use our own definition. And .Dd must come *first*, always.
|
.\" use our own definition. And .Dd must come *first*, always.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: November 17 2013 $
|
.Dd $Mdocdate: November 30 2013 $
|
||||||
.\"
|
.\"
|
||||||
.\" Check which macro package we use, and do other -mdoc setup.
|
.\" Check which macro package we use, and do other -mdoc setup.
|
||||||
.\"
|
.\"
|
||||||
@@ -4044,6 +4044,12 @@ Only used if job control is enabled
|
|||||||
.It Fl C \*(Ba Fl o Ic noclobber
|
.It Fl C \*(Ba Fl o Ic noclobber
|
||||||
Prevent \*(Gt redirection from overwriting existing files.
|
Prevent \*(Gt redirection from overwriting existing files.
|
||||||
Instead, \*(Gt\*(Ba must be used to force an overwrite.
|
Instead, \*(Gt\*(Ba must be used to force an overwrite.
|
||||||
|
Note that this is not safe to use for creation of temporary files or
|
||||||
|
lockfiles due to a TOCTOU in a check allowing one to redirect output to
|
||||||
|
.Pa /dev/null
|
||||||
|
or other device files even in
|
||||||
|
.Ic noclobber
|
||||||
|
mode.
|
||||||
.It Fl e \*(Ba Fl o Ic errexit
|
.It Fl e \*(Ba Fl o Ic errexit
|
||||||
Exit (after executing the
|
Exit (after executing the
|
||||||
.Dv ERR
|
.Dv ERR
|
||||||
|
Reference in New Issue
Block a user