Re: how to set the xattr information of current task

2007-02-06 Thread Ian jonhson
On 2/6/07, Casey Schaufler [EMAIL PROTECTED] wrote: --- Ian jonhson [EMAIL PROTECTED] wrote: (1) Think twice about using a binary struct in your /proc/self/attr API, much less one whose size is not fixed. Stephen is correct on this. (2) The return code from the write is not the same

how to set the xattr information of current task

2007-02-02 Thread Ian jonhson
Hi, I used the LSM to implement access control of security. I know how to set the private information to static files via setfattr or setxattr in syscall, but I don't know how to set xattr information to current task. I means, whether we can run a program in user mode and set the private

Re: how to set the xattr information of current task

2007-02-02 Thread Casey Schaufler
--- Ian jonhson [EMAIL PROTECTED] wrote: I used the LSM to implement access control of security. I know how to set the private information to static files via setfattr or setxattr in syscall, but I don't know how to set xattr information to current task. The hooks you're looking

Re: how to set the xattr information of current task

2007-02-02 Thread Ian jonhson
You can look at the selinux hooks. In this case they are simple enough. Thanks, the selinux codes is a good example, but I don't understand how the hooks communicate with program of user mode. I have checked all the docs in SELinux site and did not find any hint description about the two