fileops: Don't process ,ccs= as individual mode flags (BZ#18906)
commit5324d258427fd11ca0f4f595c94016e568b26d6b
authorJoe Simmons-Talbott <josimmon@redhat.com>
Wed, 5 Jul 2023 21:23:28 +0000 (5 21:23 +0000)
committerJoe Simmons-Talbott <josimmon@redhat.com>
Wed, 5 Jul 2023 21:24:06 +0000 (5 21:24 +0000)
treeccdb786892d04ac4eab6dbd32bb649d5309ee606
parent02261d1bd930b50e9166086462dca885e9847826
fileops: Don't process ,ccs= as individual mode flags (BZ#18906)

In processing the first 7 individual characters of the mode for fopen
if ,ccs= is used those characters will be processed as well.  Stop
processing individual mode flags once a comma is encountered.  This has
the effect of requiring ,ccs= to be the last mode flag in the mode
string.  Add a testcase to check that the ,ccs= mode flag is not
processed as individual mode flags.

Reviewed-by: DJ Delorie <dj@redhat.com>
libio/fileops.c
libio/tst-fopenloc.c