New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIX 5.8.5 (-w $gsadir) broken #7443
Comments
From david@davidfavor.comCreated by david@davidfavor.comThe -w operator is broken for GSA directories. Here is the output of a test script which shows the problem. You may contact me directly with a patch and I'll try it and Thanks. ======= test script results ======= reg: okay: 200: . afs: okay: 200: /afs/apd.pok.ibm.com/u/dfavor gsa: okay: 200: /gsa/ausgsa/home/d/f/dfavor/favor-tools/archive/aix510 ======= test script ======= #!/usr/local/bin/perl -w use strict; use File::stat; my @dirs = qw(. /afs/apd.pok.ibm.com/u/dfavor /gsa/ausgsa/home/d/f/dfavor/favor-tools/archive/aix510); # owner writable bit from /usr/include/sys/mode.h foreach my $dir (@dirs) { my $type; switch ($dir) { my $stats = stat($dir); # is stat() returning correct bits? printf("$type: owr : 0x%09O\n",$S_IWUSR); foreach my $shell ('ksh','ksh93','zsh','bash') { my $res = system("$shell -c '[[ -w $dir ]] && echo \"dir: $shell: writable\"'"); } if (-w $dir) { print "$type: perl: writable\n"; } print "\n"; } Perl Info
|
From @rgsdavid@davidfavor.com (via RT) wrote:
What's a GSA filesystem ? where can we find docs about the behaviour of |
The RT System itself - Status changed from 'new' to 'open' |
From david@davidfavor.comRafael Garcia-Suarez via RT wrote:
GSA is the filesystem IBM is promoting to replace AFS and DFS. My initial /* version information */ #define S_IJRNL 0x04000000 /* journalled */ GSA supports extended ACLS, so 0x02000000 is set automatically for AIX now supports extended ACLs on regular directories also, so when This is a can of worms. There are several ways to fix/bandage this: 1) attempt to use the AIX extended ACL API everywhere permissions 2) mask off high order bits and only use low order 3 octets #1 is the most correct and complex. There is an abundance of info about #2 is probably the best approach for now. This does mean if extended ACLs Probably best to do #2 now and put #1 on the future todo list. If someone can provide a patch I can test it or if you prefer, point me Thanks for your assistance. - David -- |
From @rgsDavid Favor wrote:
I think that's the correct way for the filetest pragma.
I think that's the correct way for the core.
The precise internal function that implements -w is pp_ftewrite() in pp_sys.c. |
From david@davidfavor.comFor every pp_*() routine in pp_sys.c change: if (cando(S_IXUSR, 1, &PL_statcache)) to: #ifdef _AIX This seems to be correct as access()/accessx() has already determined Also hard coding _AIX is a bad idea, as many operating systems use #ifdef (OSLIST) and define OSLIST as all operating systems implementing access()/accessx(). An even simplier approach might be to simply say: #ifdef PERL_EFF_ACCESS_W_OK I'll try to work this all out for AIX and send you a copy of the patch. Thanks for your assistance. Easy to see the problem, once you told me -- |
From david@davidfavor.com
Here's what I found. 1) Code for pp_ftewrite() in pp_sys.c is correct. Depending on availability 2) Code for Perl_cando() in doio.c is broken. After all the hoops gone through This breaks for any file system with any type of extended ACLs like DFS, AFS The problem in all these cases is the uid and gid may or may not match the I've never been under the hood of perl, so am unsure if I should try and fix Let me know. -- |
From @rgsDavid Favor wrote:
That sounds like a good approach.
The output of diff -u is preferred (diff -c if your diff doesn't support |
From @rgsI'm putting P5P in the mail loop again... David Favor wrote:
Thanks for your work :) I've several questions : |
From david@davidfavor.comRafael Garcia-Suarez wrote:
You're welcome... and... thanks may be premature. Several other
5.8.5-RC2.
Ah... Perhaps a perl guru should consider how best to arrange
ACC_SELF checks effective user and ACC_INVOKER checks real
The SvPOK(TOPs) check explains one thing I couldn't figure out. result = my_stat() so my fix turned off this test altogether, which is why filetest.t faccessx() - with file descriptors Along the same lines there is another consideration. When stat() _____ This patch appears to be more complicated then I first imagined as # path #1 for file descriptors # path #2 for file paths This means all the PERL_EFF_ACCESS_[RWX]_OK() macros appear to be Then my_stat() in doio.c should be rewritten to use accessx(). Along the lines of the the future patch I talked about concerning It might be worthwhile to consider some sort of wrapper for determining _______ If someone has an idea of how to patch the current problem by modifying the Thanks for your assistance. -- |
From tammer@tammer.netHello, Bye |
From david@davidfavor.comRainer Tammer via RT wrote:
Geez... yes. Do it! -- |
@cpansprout - Status changed from 'open' to 'stalled' |
Migrated from rt.perl.org#30885 (status was 'stalled')
Searchable as RT30885$
The text was updated successfully, but these errors were encountered: