Change offset in fdopen only if setting O_APPEND
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 17 Mar 2014 13:12:53 +0000 (18:42 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 17 Mar 2014 15:54:02 +0000 (21:24 +0530)
commitae42bbc55a9e05976269026ddabcfb917f6e922f
tree3d5c26ff77263cada4610720a1ea591c63185b1d
parentea33158c96c53a64402a772186956c1f5cb556ae
Change offset in fdopen only if setting O_APPEND

fdopen should only be allowed to change the offset in the file it
attaches to if it is setting O_APPEND.  If O_APPEND is already set, it
should not change the state of the handle.
ChangeLog
libio/iofdopen.c
libio/tst-ftell-active-handler.c