From: Sebastian P. <web...@ha...> - 2011-07-06 18:45:51
|
On 07/06/2011 02:26 PM, Miklos Szeredi wrote: > Sebastian Pipping <web...@ha...> writes: > >> It seems as if the pid, gid and uid I get from fuse_get_context() are >> all zero during a call to my own release handler (i.e. inside >> req->f->op.release(...)), always. Does it have to be like that? I >> would benefit from that information filled with proper values. > > ->release() is called when the file refcount drops to zero in the > kernel. This usually happens on close() but not always. It could > happen from proc code or various other places. Giving info about the > process that happens to trigger the release would not only be useless > but a possible information leak. Alright. I was asking because I would like to relate calls to open and release 1:1 (in a scenario of logging calls and replaying these logs in a test bed). Previously I believed that with the fd alone I could not do that - which is why I was interested in a non-zero value for pid. Now it seems that I actually could relate these calls by just looking at the file descriptors as they all belong to the FUSE process and are therefore unique (until closed and re-used). Best, Sebastian |