0

Now I use cryfs or gocryptfs to encrypt some data. This data can only be accessed by the specified process. If another process want to accessed this data,cryfs or gocryptfs just return ciphertext to this unauthorized process.

Does libfuse support this function?Or there are some good ways to know which process is accessing confidential data.

steve
  • 89
  • 8

1 Answers1

2

libfuse supplies the current calling process id (among other things) with this call: fuse_get_context()

With the returned struct being:

struct fuse_context {
    /** Pointer to the fuse object */
    struct fuse *fuse;

    /** User ID of the calling process */
    uid_t uid;

    /** Group ID of the calling process */
    gid_t gid;

    /** Process ID of the calling thread */
    pid_t pid;

    /** Private filesystem data */
    void *private_data;

    /** Umask of the calling process */
    mode_t umask;
};
Oren Kishon
  • 509
  • 6
  • 8