On Tue, 2007-11-27 at 09:31 -0500, Andrew Blaich wrote: > Is there a way to retrieve the full path of the currently running task > via a task_struct or similar structure from the view of the LSM? > Currently, the work I am doing with LSM design requires hooking into > bprm_alloc_security in order to read the linux_binprm structure which > contains the path of the application as it was run. Is there a > similar way to access the full path dynamically say if I'm checking a > socket based LSM hook which does not receive the linux_binprm > structure > > I have been unsuccessful in using dentry and vfsmnt from the current > task_struct via the d_path() lookup function.
audit_log_task_info() is an example. It isn't a perfect technique, but usually yields the expected answer. But I wouldn't recommend doing that on every LSM hook call. -- Stephen Smalley National Security Agency - To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html