A NOTE has been added to this issue. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1778 
====================================================================== 
Reported By:                kre
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1778
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Objection
Priority:                   normal
Status:                     New
Name:                       Robert Elz 
Organization:                
User Reference:              
Section:                    XCU 3/read 
Page Number:                3291-3294 
Line Number:                111869-111878, 111961-111963, 11946, 11979-11980 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2023-10-02 13:58 UTC
Last Modified:              2023-10-18 00:08 UTC
====================================================================== 
Summary:                    The read utility needs field splitting
updates/corrections )and a little more)
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0001649 Field splitting is woefully under speci...
====================================================================== 

---------------------------------------------------------------------- 
 (0006547) kre (reporter) - 2023-10-18 00:08
 https://www.austingroupbugs.net/view.php?id=1778#c6547 
---------------------------------------------------------------------- 
Re https://www.austingroupbugs.net/view.php?id=1778#c6543

This proposed new text has the same problem as (one of the ones) in the
previous version:

    the new value assigned to the variable would change the current locale

again, that's unknowable to the script writer, so their only possible
response is to not read directly into whichever of those vars you
imagine that they're using (LANG in the example from your previous note).

It truly is not worth attempting to make this as specified as possible,
there is no rational safe way to do a read into IFS, PATH, any of the
locale
vars (and more) directly - ones like PATH don't need mention here, as
using that (or anything similar) would be perfectly defined for how read
processes it, but that doesn't make it sane for an application to do (and
perhaps the APPLICATION USAGE section should make that point) - vars which
immediately affect how the shell works need to be validated before being
altered if the input comes from outside the script itself.   That's just
sensible programming.

So, I still claim there is no possible point attempting to find language
to do other than simply specify that any attempt to read into any var
whose value is (or ever could be) used as part of the <i>read</i>
processing
produces unspecified results (at least in cases when read processes the
input, if you want to exempt the case when IFS="" then that's fine -
that's
simple enough - I'd also need to think about \ processing when -r isn't
used,
not for line joining, that's simple enough, but for removing it afterwards
if the
    IFS='' read LANG
has managed to make a change such that the code point that represents \
is no longer the same after the read as it was before, since even though
no field splitting happens, the escape chars still need to be removed, and
it would be truly weird, if the char that enabled lines to be joined, and
the one later removed, were not the same one). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2023-10-02 13:58 kre            New Issue                                    
2023-10-02 13:58 kre            Name                      => Robert Elz      
2023-10-02 13:58 kre            Section                   => XCU 3/read      
2023-10-02 13:58 kre            Page Number               => 3291-3294       
2023-10-02 13:58 kre            Line Number               => 111869-111878,
111961-111963, 11946, 11979-11980
2023-10-02 14:00 kre            Note Added: 0006500                          
2023-10-02 14:02 kre            Note Edited: 0006500                         
2023-10-02 14:20 kre            Note Added: 0006502                          
2023-10-02 14:22 kre            Note Edited: 0006502                         
2023-10-02 14:24 kre            Note Edited: 0006502                         
2023-10-02 14:30 kre            Note Added: 0006503                          
2023-10-02 14:33 kre            Note Edited: 0006502                         
2023-10-02 14:34 kre            Note Edited: 0006502                         
2023-10-02 14:44 kre            Note Edited: 0006500                         
2023-10-02 16:18 geoffclare     Project                  1003.1(2013)/Issue7+TC1
=> Issue 8 drafts
2023-10-02 16:19 geoffclare     version                   => Draft 3         
2023-10-02 16:20 geoffclare     Note Added: 0006507                          
2023-10-02 16:21 geoffclare     Relationship added       related to 0001649  
2023-10-03 09:23 geoffclare     Note Added: 0006509                          
2023-10-03 11:59 kre            Note Added: 0006510                          
2023-10-03 12:11 kre            Note Added: 0006511                          
2023-10-03 13:42 geoffclare     Note Added: 0006512                          
2023-10-04 14:42 kre            Note Added: 0006513                          
2023-10-04 17:36 kre            Note Added: 0006514                          
2023-10-05 08:59 geoffclare     Note Added: 0006515                          
2023-10-05 11:08 kre            Note Added: 0006516                          
2023-10-05 14:53 geoffclare     Note Added: 0006517                          
2023-10-05 15:34 kre            Note Edited: 0006516                         
2023-10-05 15:35 kre            Note Edited: 0006516                         
2023-10-05 15:36 kre            Note Edited: 0006516                         
2023-10-05 15:38 kre            Note Added: 0006519                          
2023-10-05 15:41 kre            Note Edited: 0006513                         
2023-10-06 07:58 geoffclare     Note Edited: 0006515                         
2023-10-06 21:41 chet_ramey     Note Added: 0006524                          
2023-10-10 11:06 geoffclare     Note Edited: 0006515                         
2023-10-10 14:36 geoffclare     Note Added: 0006526                          
2023-10-10 17:19 kre            Note Added: 0006527                          
2023-10-11 08:04 geoffclare     Note Added: 0006528                          
2023-10-11 17:13 kre            Note Added: 0006529                          
2023-10-12 08:30 geoffclare     Note Added: 0006530                          
2023-10-12 18:33 kre            Note Added: 0006531                          
2023-10-12 18:45 kre            Note Edited: 0006516                         
2023-10-12 18:54 kre            Note Added: 0006532                          
2023-10-16 09:02 geoffclare     Note Added: 0006533                          
2023-10-16 09:03 geoffclare     Note Edited: 0006533                         
2023-10-16 09:19 geoffclare     Note Added: 0006534                          
2023-10-16 21:43 kre            Note Added: 0006537                          
2023-10-16 22:10 kre            Note Added: 0006538                          
2023-10-17 13:34 geoffclare     Note Added: 0006543                          
2023-10-18 00:08 kre            Note Added: 0006547                          
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to