aganea marked 3 inline comments as done.
aganea added inline comments.

================
Comment at: clang/test/Misc/permissions.cpp:8
 
 // RUN: umask 002
 // RUN: %clang_cc1 -emit-llvm-bc %s -o %t
----------------
rnk wrote:
> aganea wrote:
> > rnk wrote:
> > > If you change this to `umask 022`, does that result in `rw-r-----`? That 
> > > would make the test meaningful on your system.
> > No, using `umask 022` has no effect, still yields 'rw':
> > ```
> > $ umask
> > 0000
> > $ umask 0077
> > $ touch test
> > $ ls -l
> > -rw-rw---- 1 aganea sudosgroup    0 Dec  3 11:02 test
> > ```
> > So this seems to be related to the interaction between ACL and `umask`. The 
> > [[ http://man7.org/linux/man-pages/man2/umask.2.html | umask doc ]] says 
> > they should interact, but that doesn't seem to work on my Ubuntu 18.04.01. 
> > No matter what I set in the umask mode, creating a new file inherits the 
> > default ACL.
> > All my folders have ACL enabled:
> > ```
> > $ ls -l /mnt/
> > drwxrws--x+ 8 root sudosgroup 4096 Dec  3 17:07 f       <-- note the + 
> > which indicates ACL is being used
> > ```
> > 
> > I could give 'rw' permissions to others:
> > ```
> > $ setfacl -R -d -m o::rw /mnt/f
> > ```
> > However even with that, the test fails (because umask has no effect).
> > I'm not sure what the right fix would be here. I can investigate other 
> > things. Any suggestions?
> > I'm not sure what the right fix would be here. I can investigate other 
> > things. Any suggestions?
> 
> I don't think it's worth it. Let's go with your fix and make the test pass.
Good. I'll add a comment above in the test to explain the situation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70854/new/

https://reviews.llvm.org/D70854



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to