Re: [AppArmor 37/41] AppArmor: Main Part

2007-04-13 Thread Andreas Gruenbacher
On Thursday 12 April 2007 12:37, Alan Cox wrote: The proc file system may not be mounted at /proc. There are environments where this is done for good reason (eg not wanting the /proc info exposed to a low trust environment). Another is when FUSE is providing an arbitrated proc either by

Re: [AppArmor 37/41] AppArmor: Main Part

2007-04-13 Thread Andreas Gruenbacher
On Thursday 12 April 2007 12:37, Alan Cox wrote: + if (PTR_ERR(sa-name) == -ENOENT (check AA_CHECK_FD)) + denied_mask = 0; Now there is an interesting question. Is PTR_ERR() safe for kernel pointers on all platforms or just for user ones ? It's used for kernel

Re: [AppArmor 37/41] AppArmor: Main Part

2007-04-13 Thread Nick Piggin
Andreas Gruenbacher wrote: On Thursday 12 April 2007 12:37, Alan Cox wrote: + if (PTR_ERR(sa-name) == -ENOENT (check AA_CHECK_FD)) + denied_mask = 0; Now there is an interesting question. Is PTR_ERR() safe for kernel pointers on all platforms or just for

[AppArmor 37/41] AppArmor: Main Part

2007-04-12 Thread jjohansen
The underlying functions by which the AppArmor LSM hooks are implemented. Signed-off-by: John Johansen [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- security/apparmor/main.c | 1322 +++ 1 file changed, 1322 insertions(+)

Re: [AppArmor 37/41] AppArmor: Main Part

2007-04-12 Thread Alan Cox
+ * aa_taskattr_access + * @name: name of the file to check + * + * Check if name matches /proc/self/attr/current, with self resolved + * to the current pid. This file is the usermode iterface for + * changing one's hat. + */ +static inline int aa_taskattr_access(const char *name) +{ +