[Bug 1817959] Re: "test -e" inaccurately returns false when stat() is disallowed

2019-02-28 Thread Thorsten Glaser
I don’t consider it a bug. If you break stat(2) in your system, expect follow-up breakage, as per the GIGO principle. -- You received this bug notification because you are a member of mksh Mailing List, which is subscribed to mksh. Matching subscriptions: mkshlist-to-mksh-bugmail https://bugs.la

[Bug 1817789] Re: misleading error message for SELinux denials

2019-02-28 Thread Nick Kralevich
To be clear, the current implementation of using stat(), reading the permissions, then later exec()ing is subject to the same race conditions described in the access() man page. Just because stat() doesn't include these warnings in the man page shouldn't be interpreted that the current usage is rac

[Bug 1817959] Re: "test -e" inaccurately returns false when stat() is disallowed

2019-02-28 Thread Nick Kralevich
Since the concern raised is about portability and buggy implementations, another strategy which addresses "test" returning inaccurate information is to conditionally use access(F_OK) only on platforms where it is known to be reliable. One way (but not the only way) is to use ifdefs, eg. #ifdef L