> > > dlmgmt_main.c: > > > > > * 103: Why S_IWRITE? (And I think S_IRUSR is the more > > > standardized form of S_IREAD.) > > > > > Apparently, write permission is required in order to do fattach(). I've > changed to > > O_CREAT|O_RDWR and S_IRUSR|S_IWUSR. > > I'm a bit confused by this, as the file was previously packaged 0444 and > that worked fine (this brings up a related point: will we need 0444 > instead of 0400 to later enable show-link to work as a normal user?).
It seems uid 0 is different from non root uid, see secpolicy_vnode_access() (which is called by nm_mount()). For the root user, write permission is not needed. A non-root user will use the door call to communicate with the dlmgmtd daemon. I believe that is not related to what permission of the door file has. > Also, I'm unclear why O_RDWR would be needed instead of O_RDONLY as we > never actually write to (or read from) the file. > See above. Thanks - Cathy
