A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=251 ====================================================================== Reported By: dwheeler Assigned To: ajosey ====================================================================== Project: 1003.1(2008)/Issue 7 Issue ID: 251 Category: Base Definitions and Headers Type: Enhancement Request Severity: Objection Priority: normal Status: Under Review Name: David A. Wheeler Organization: User Reference: Section: XBD 3.170 Filename Page Number: 60 Line Number: 1781 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2010-05-03 18:49 UTC Last Modified: 2023-10-30 17:24 UTC ====================================================================== Summary: Forbid newline, or even bytes 1 through 31 (inclusive), in filenames ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0000293 restricting readdir normalization of fi... related to 0000573 Please add '+' to the portable filename... related to 0000243 Add -print0 to "find" related to 0000244 Add -0 to xargs related to 0000245 Add -0 option to shell's "read" related to 0000248 Fix the numerous filename/pathname proc... has duplicate 0000545 Escape Filenames as per Uniform Resourc... related to 0000291 filenames need not contain characters ======================================================================
---------------------------------------------------------------------- (0006561) Don Cragun (manager) - 2023-10-30 17:24 https://austingroupbugs.net/view.php?id=251#c6561 ---------------------------------------------------------------------- Proposed changes (All page and line numbers refer to Issue 8 Draft 3) to be applied after the changes for https://austingroupbugs.net/view.php?id=253 have been applied: Change P266 L23296 (XSH bind rationale) from:<blockquote>None.<blockquote>to:<blockquote>Implementions are encouraged to have <i>bind</i>() report an [EILSEQ] error if the last component of the address to be bound to an AF_UNIX family socket contains any bytes that have the encoded value of a <newline> character.</blockquote> Move the [EEXIST] error on P1027, L35244-35245 (XSH fopen errors) before the [EILSEQ] error on P1027, L35241-35243 to put the errors in alphabetical order. Add a new paragraph after P977, L33357 (XSH fopen rationale):<blockquote>Implementations are encouraged to have <i>fopen</i>() and <i>freopen</i>() report an [EILSEQ] error if <i>mode</i> begins with 'w' or 'a', the file did not previously exist, and the last component of <i>pathname</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1330, L44792 (XSH link rationale):<blockquote>Implementations are encouraged to have <i>link</i>() and <i>linkat</i>() report an [EILSEQ] error if the file named by <i<path2</i> did not previously exist, and the last component of that pathname contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1407, L47277 (XSH mkdir rationale):<blockquote>Implementations are encouraged to have <i>mkdir</i>() and <i>mkdirat</i>() report an [EILSEQ] error if the last component of <i>path</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1411, L47406 (XSH mkdtemp rationale):<blockquote>Implementations are encouraged to have <i>mkdtemp</i>(), <i>mkostemp</i>() and <i>mkstemp</i>() report an [EILSEQ] error if the last component of the pathname in <i>template</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1414, L47532 (XSH mkfifo rationale):<blockquote>Implementations are encouraged to have <i>mkfifo</i>() and <i>mkfifoat</i>() report an [EILSEQ] error if the last component of <i>path</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1419, L47699 (XSH mknod rationale):<blockquote>Implementations are encouraged to have <i>mknod</i>() and <i>mknodat</i>() report an [EILSEQ] error if the last component of <i>path</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1514, L50793 (XSH open rationale):<blockquote>Implementations are encouraged to have <i>open</i>() and <i>openat</i>() report an [EILSEQ] error if <i>oflag</i> contains O_CREAT, the file did not previously exist, and the last component of <i>path</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P1891, L62567 (XSH rename rationale):<blockquote>Implementations are encouraged to have <i>rename</i>() and <i>renameat</i>() report an [EILSEQ] error if the file named by <i>new</i> does not already exist and the last component of that pathname contains any bytes that have the encoded value of a <newline> character.</blockquote> Add a new paragraph after P2183, L71316 (XSH symlink rationale):<blockquote>Implementations are encouraged to have <i>symlink</i>() and <i>symlinkat</i>() report an [EILSEQ] error if the last component of <i>path2</i> contains any bytes that have the encoded value of a <newline> character.</blockquote> After P2454 L79567 XCU section 1.4 (Utility Description Defaults: CONSEQUENCES OF ERRORS), add to the first bullet item:<blockquote><small><b>Note:</b> If the requested action is to write one or more pathnames in a format that has <newline> as a terminator or separator, and a pathname to be written contains any bytes that have the encoded value of a <newline> character, this should be treated as an action that cannot be performed. A future version of this standard may require that utilities treat this as an error.</small></blockquote> Start of editor's notes for changes below to XCU: Replace each occurrence of the string "PARAGRAPH DELIM" with the paragraph:<blockquote>If this utility is directed to display a pathname that contains any bytes that have the encoded value of a <newline> character when <newline> is a terminator or separator in the output format being used, implementations are encouraged to treat this as an error. A future version of this standard may require implementations to treat this as an error.</blockquote> Replace each occurrence of the string "PARAGRAPH DIRENT" with the paragraph:<blockquote>If this utility is directed to create a new directory entry that contains any bytes that have the encoded value of a <newline> character, implementations are encouraged to treat this as an error. A future version of this standard may require implementations to treat this as an error.</blockquote> End of editor's notes. Change P2562, L83722 section admin FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Change P2573, L84133 section ar FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Add after P2624, Lx86260 section awk FUTURE DIRECTIONS:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2629, L86431 section basename FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Add after P2664, L87886 section c17 FUTURE DIRECTIONS:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Change P2678, L88346 section cd FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2701, L89252 section cksum FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Add after P2705, L89390 section cmp FUTURE DIRECTIONS:<blockquote>None.</blockquote></blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2715, L89771 section command FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Add after P2721, L89999 section compress FUTURE DIRECTIONS:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2730, L90318 section cp FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2737, L90620 section csplit FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2742, L90803 section ctags FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Change P2750, L91075 section cxref FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Add after P2767, L91587 section dd FUTURE DIRECTIONS:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2771, L91742 section delta FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Change P2775, L91898 section df FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2784, L92243 section diff FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2787, L92359 section dirname FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2791, L92498 section du FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2796, L92681 section ed OPERANDS from:<blockquote><i>file</i> If the <i>file</i> argument is given, <i>ed</i> shall simulate an <b>e</b> command on the file named by the pathname, <i>file</i>, before accepting commands from the standard input.</blockquote>to:<blockquote><i>file</i> If the <i>file</i> argument is given, <i>ed</i> shall perform the effect of an <b>e</b> command on the pathname <i>file</i> before accepting commands from the standard input, except that <i>file</i> can contain a <newline>, even though this is not possible for the argument to the <b>e</b> command.</blockquote> Change P2811, L93294 section ed FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2888, L96380 section ex FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P2916, L97389 section file FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2926, L97857 section find FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2935, L98138 section fuser FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2947, L98555 section get FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Change P2970, L99423 section grep FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2974, L99526 section hash FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2977, L99637 section head FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P2994, L100247 section ipcs FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3025, L101427 section link FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3029, L101596 section ln FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3040, L102002 section localedef FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Add a new paragraph after P3053, L102472 section ls OPTIONS -C description:<blockquote><small><b>Note:</b> Since the output from this option may use separator characters that include characters that might appear in filenames (in addition to the problems related to <newline>s in filenames), <b>-C</b> should not be used when filenames might be extracted from the output by a script.</small></blockquote> Change P3055, L102530-102531 section ls OPTIONS -q description from:<blockquote>Force each instance of non-printable filename characters and <tab> characters to be written as the <question-mark> ('?') character.</blockquote>to:<blockquote>Force each instance of non-printable filename characters (including <newline>, <tab>, and other control characters) to be written as the <question-mark> ('?') character.</blockquote> Add after P3062, L102840 section ls FUTURE DIRECTIONS:<blockquote>PARAGRAPH DELIM</blockquote> Change P3072, L103313 section m4 FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3101, L104386 section mailx FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Add after P3133, L105820 section make FUTURE DIRECTIONS:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3140, L106025 section man FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3146, L106228 section mkdir FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3148, L106320 section mkfifo FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3169, L107117 section msgfmt FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3174, L107320 section mv FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3192, L107932 section nm FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3216, L108834 section patch FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3259, L110622 section pax FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote><blockquote>PARAGRAPH DIRENT</blockquote> Add a new paragraph after P3266, L110876, section pr APPLICATION USAGE:<blockquote>If a <i>file</i> operand contains <newline>, <form-feed>, or <vertical-tab> characters, or is overly long, and the <i>pr</i> utility is instructed to include the name of that file in the header, pagination may not be handled correctly. Applications can guard against this by using the <b>-h</b> option (for example, passing a sanitized, truncated form of the pathname with <b>-h</b>).</blockquote> Change P3280, L111438 section prs FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3289, L111832 section pwd FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3299, L112192 section realpath FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3308, L112527 section rm FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3310, L112621 section rmdel FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3315, L112792 section sact FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3350, L114226 section sh FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3361, L114651 section sort FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3365, L114788 section split FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3396, L115906 section tee FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3421, L116838 section touch FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3441, L117545 section type FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3461, L118235 section unget FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3466, L118382 section uniq FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3471, L118593 section uucp FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to: <blockquote>PARAGRAPH DIRENT</blockquote> Change P3475, L118703 section uudecode FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3490, L119265 section val FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3544, L121335 section vi FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3553, L121654 section wc FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Change P3556, L121752 section what FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DELIM</blockquote> Add after P3575, L122506 section xgettext FUTURE DIRECTIONS:<blockquote>PARAGRAPH DIRENT</blockquote> Change P3594, L123258 section yacc FUTURE DIRECTIONS from:<blockquote>None.</blockquote>to:<blockquote>PARAGRAPH DIRENT</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2010-05-03 18:49 dwheeler New Issue 2010-05-03 18:49 dwheeler Status New => Under Review 2010-05-03 18:49 dwheeler Assigned To => ajosey 2010-05-03 18:49 dwheeler Name => David A. Wheeler 2010-05-03 18:49 dwheeler Section => XBD 3.170 Filename 2010-05-03 18:49 dwheeler Page Number => 60 2010-05-03 18:49 dwheeler Line Number => 1781 2010-05-03 19:37 dwheeler Note Added: 0000412 2011-03-10 16:04 msbrown Note Added: 0000689 2011-04-11 20:28 eblake Interp Status => --- 2011-04-11 20:28 eblake Note Added: 0000739 2011-04-11 20:28 eblake Summary Forbid bytes 1 through 31 (inclusive) in filenames => Forbid newline, or even bytes 1 through 31 (inclusive), in filenames 2011-04-11 21:17 dwheeler Note Added: 0000740 2011-07-07 15:31 user27 Note Added: 0000887 2011-12-17 21:43 dwheeler Issue Monitored: dwheeler 2012-02-22 06:48 oiaohm Note Added: 0001140 2012-02-22 19:25 dwheeler Note Added: 0001141 2012-02-22 19:38 wlerch Note Added: 0001142 2012-02-23 00:55 oiaohm Note Added: 0001143 2012-02-25 02:25 oiaohm Note Added: 0001147 2012-02-25 02:40 eblake Relationship added related to 0000545 2012-03-29 23:10 Don Cragun Relationship replaced has duplicate 0000545 2012-08-03 19:35 eblake Relationship added related to 0000291 2012-08-03 19:36 eblake Relationship added related to 0000293 2012-08-03 19:36 eblake Relationship added related to 0000573 2012-12-23 05:12 user229 Note Added: 0001437 2013-01-07 23:29 oiaohm Note Added: 0001438 2013-01-07 23:47 oiaohm Note Added: 0001439 2013-08-14 02:43 jrincayc Note Added: 0001711 2013-08-14 03:23 dwheeler Note Added: 0001712 2013-08-14 05:41 dalias Note Added: 0001713 2013-08-14 07:34 oiaohm Note Added: 0001714 2013-08-15 02:33 jrincayc Note Added: 0001715 2013-08-15 02:48 dalias Note Added: 0001716 2013-08-15 03:31 jrincayc Note Added: 0001717 2013-08-16 02:43 jrincayc Note Added: 0001721 2013-08-16 05:03 oiaohm Note Added: 0001722 2013-08-16 10:46 a brouwer Note Added: 0001723 2013-08-17 15:03 dwheeler Note Added: 0001724 2013-08-17 16:13 dalias Note Added: 0001725 2013-08-18 02:01 dwheeler Note Added: 0001726 2013-08-18 05:22 oiaohm Note Added: 0001727 2013-08-18 06:10 oiaohm Note Added: 0001728 2013-08-18 13:12 jrincayc Note Added: 0001730 2013-08-18 19:09 dwheeler Note Added: 0001731 2013-08-19 09:25 geoffclare Note Added: 0001732 2013-08-19 10:48 a brouwer Note Added: 0001733 2013-08-19 12:34 jrincayc Note Added: 0001734 2013-08-19 14:55 oiaohm Note Added: 0001735 2013-08-19 22:40 oiaohm Note Added: 0001736 2013-08-19 22:57 user229 Note Added: 0001737 2013-08-19 23:21 dalias Note Added: 0001738 2013-08-19 23:48 shware_systems Note Added: 0001739 2013-08-20 02:40 user229 Note Added: 0001740 2013-08-20 03:23 dalias Note Added: 0001741 2013-08-20 06:38 shware_systems Note Added: 0001742 2013-08-20 07:02 dalias Note Added: 0001743 2013-08-20 14:52 dwheeler Note Added: 0001744 2013-08-21 12:23 oiaohm Note Added: 0001745 2013-08-21 12:25 oiaohm Note Added: 0001746 2013-08-21 12:49 oiaohm Note Added: 0001747 2013-08-21 13:12 steffen Note Added: 0001748 2013-08-21 14:02 oiaohm Note Added: 0001749 2013-08-30 04:44 oiaohm Note Added: 0001779 2014-12-05 14:45 safinaskar Note Added: 0002480 2015-06-22 16:48 mirabilos Note Added: 0002730 2016-03-27 10:43 dannyniu Issue Monitored: dannyniu 2023-02-10 18:14 dwheeler Note Added: 0006146 2023-02-10 18:15 dwheeler Note Added: 0006147 2023-02-10 18:16 dwheeler Note Added: 0006148 2023-02-10 21:16 dwheeler Note Deleted: 0006147 2023-02-10 21:16 dwheeler Note Deleted: 0006148 2023-02-18 20:19 mirabilos Note Added: 0006154 2023-02-18 20:21 mirabilos Note Added: 0006155 2023-08-22 06:28 Don Cragun Relationship added related to 0000243 2023-08-22 06:29 Don Cragun Relationship added related to 0000244 2023-08-22 06:30 Don Cragun Relationship added related to 0000245 2023-09-20 16:17 kre Note Added: 0006481 2023-09-21 19:02 eblake Note Added: 0006484 2023-09-21 19:04 eblake Note Edited: 0006484 2023-09-21 20:05 kre Note Added: 0006486 2023-09-22 06:25 safinaskar Issue Monitored: safinaskar 2023-09-22 06:25 safinaskar Issue End Monitor: safinaskar 2023-10-19 16:32 geoffclare Note Added: 0006549 2023-10-20 20:23 kre Note Added: 0006551 2023-10-23 09:25 geoffclare Note Added: 0006552 2023-10-24 00:30 steffen Note Added: 0006553 2023-10-24 00:39 steffen Note Added: 0006554 2023-10-30 15:26 eblake Relationship added related to 0000248 2023-10-30 17:24 Don Cragun Note Added: 0006561 ======================================================================