summaryrefslogtreecommitdiff
path: root/perlvars.h
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2010-08-28 11:37:33 -0500
committerCraig A. Berry <craigberry@mac.com>2010-08-28 12:28:04 -0500
commit5e2ce0f3dcb618e7ce72180948b6c29c8b949a53 (patch)
treec7d390ef9268fbec4cdfaef23177fd26011a70d6 /perlvars.h
parent903fd87c2fde69d5e919253206007158c6a3a2b5 (diff)
downloadperl-5e2ce0f3dcb618e7ce72180948b6c29c8b949a53.tar.gz
Make PerlIOUnix_open honor default permissions on VMS.
When perlio became the default and unixio became the default bottom layer, the most common path for creating files from Perl became PerlIOUnix_open, which has always explicitly used 0666 as the permission mask. This has the following undesireable effects on VMS: 1.) The execute bit is lost regardless of whether it's in the default permissions. 2.) Delete permission (which doesn't exist in the Unix permission mask) is copied from write permission, so granting write permission also grants delete even if it's not in the default permission mask. This can result in an inadvertent widening of permissions. 3.) System permissions (which don't exist in the Unix permission mask) are copied from owner permissions, so any distinction between system and owner is lost. 4.) ACLs are not inherited. For example, setting a default_protection ACE on a directory such that all world access is disallowed will be ignored; world will have the intersection of RWD (the final 6 in 0666) and whatever the default permissions are regardless of what the ACL says. Thus not inheriting ACLs can result in the inadvertent widening of permissions. The way to avoid all of this is to pass 0777 as the permissions to open(). In the VMS CRTL, 0777 has a special meaning over and above intersecting with the current umask; specifically, it allows Unix syscalls to preserve native default permissions. Details currently documented at: http://h71000.www7.hp.com/doc/732final/5763/5763pro_060.html#umask_routine
Diffstat (limited to 'perlvars.h')
0 files changed, 0 insertions, 0 deletions