Re: [PATCH] BSD Secure Levels LSM

From: Serge E. Hallyn (hallyn@private)
Date: Fri Nov 28 2003 - 07:56:57 PST


> This looks like something that could easily be hooked up to the
> setprocattr interface.

Regarding this, would there be any complaints to a patch to add the
following documentation to include/linux/security.h?

thanks,
-serge

--- security.h	2003-11-11 15:36:48.000000000 -0500
+++ security.h.new	2003-11-28 10:48:16.000000000 -0500
@@ -1178,6 +1178,23 @@
  *      @tz contains new timezone
  *      Return 0 if permission is granted.
  *
+ * @setprocattr:
+ *	Called in response to a write to a file under proc/<pid>/attr/.
+ *	@p is the task <pid>
+ *	@name is the name of the file being written.
+ *	@value is the value being written.
+ *	@size is the size of @value.
+ *	Returns the number of bytes read from @value.
+ * @getprocattr:
+ *	Called in response to a read of a file under proc/<pid>/attr.  If the
+ *	file is not applicable to the security module, -EINVAL should be
+ *	returned.
+ *	@p is the task <pid>
+ *	@name is the name of the file being read.
+ *	@value is a buffer to which the file's contents are to be written.
+ *	@size is the size of the buffer @value.
+ *	Returns the number of bytes written to @value.
+ *
  * @register_security:
  * 	allow module stacking.
  * 	@name contains the name of the security module being stacked.



This archive was generated by hypermail 2b30 : Fri Nov 28 2003 - 07:57:53 PST