https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66143

            Bug ID: 66143
           Summary: __gnat_set_executable insufficient for correct
                    gprinstall
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeditekunum at gmail dot com
  Target Milestone: ---

When installing asis the tool executables installed by gprinstall have
permissions rwxr--r--.

gprinstall eventually calls __gnat_set_executable in adaint.c which adds only
S_IXUSR to chmod. This should probably be (S_IXUSR | S_IXGRP | S_IXOTH) and
should probably be filtered through current umask setting.

Additionally, similar problems may exist for __gnat_set_writable and
__gnat_set_non_writable, __gnat_set_readable, __gnat_set_non_readable. Readable
uses S_IREAD which in the same source file is defined as (S_IRUSR | S_IRGRP |
S_IROTH) for vxworks and android. However, S_IREAD is only S_IRUSR on OS X and
Solaris and indeed is an obsolete BSD compatibility that is suppose to be only
S_IRUSR.

Reply via email to