Re: LSM Patch Additions for CAPP (C2) Audit Trails

From: Stephen Smalley (sdsat_private)
Date: Wed Jun 27 2001 - 07:48:28 PDT

  • Next message: Stephen Smalley: "Re: LSM Patch Additions for CAPP (C2) Audit Trails"

    I diff'd the head of the WireX BitKeeper tree against the NAI Labs
    tree again, and here are the remaining differences.
    
    --
    Stephen D. Smalley, NAI Labs
    ssmalleyat_private
    
    
    
    
    
    diff -Nru -X dontdiff wirex/lsm/fs/super.c lsm/lsm-new/fs/super.c
    --- wirex/lsm/fs/super.c	Fri Jun 22 09:06:59 2001
    +++ lsm/lsm-new/fs/super.c	Mon Jun 18 15:37:37 2001
    @@ -1094,7 +1094,7 @@
     	 * call reboot(9). Then init(8) could umount root and exec /reboot.
     	 */
     	if (mnt == current->fs->rootmnt) {
    -		retval = 0;
    +		int retval = 0;
     		/*
     		 * Special case for "unmounting" root ...
     		 * we just try to remount it readonly.
    diff -Nru -X dontdiff wirex/lsm/include/asm-i386/softirq.h lsm/lsm-new/include/asm-i386/softirq.h
    --- wirex/lsm/include/asm-i386/softirq.h	Tue Jun 26 16:37:57 2001
    +++ lsm/lsm-new/include/asm-i386/softirq.h	Tue Jun 19 16:49:53 2001
    @@ -36,13 +36,13 @@
     									\
     			".section .text.lock,\"ax\";"			\
     			"2: pushl %%eax; pushl %%ecx; pushl %%edx;"	\
    -			"call do_softirq;"				\
    +			"call %c1;"				\
     			"popl %%edx; popl %%ecx; popl %%eax;"		\
     			"jmp 1b;"					\
     			".previous;"					\
     									\
     		: /* no output */					\
    -		: "r" (ptr)						\
    +		: "r" (ptr), "i" (do_softirq)				\
     		/* no registers clobbered */ );				\
     } while (0)
     
    diff -Nru -X dontdiff wirex/lsm/include/linux/security.h lsm/lsm-new/include/linux/security.h
    --- wirex/lsm/include/linux/security.h	Tue Jun 26 16:37:57 2001
    +++ lsm/lsm-new/include/linux/security.h	Thu Jun 21 11:42:36 2001
    @@ -30,6 +30,7 @@
     #include <linux/resource.h>
     #include <linux/ipc.h>
     #include <linux/sem.h>
    +#include <linux/sysctl.h>
     #include <linux/shm.h>
     #include <linux/msg.h>
     
    @@ -138,12 +139,19 @@
     	int (* getinfo)		(int id, int cmd);
     };
     
    +struct msg_msg_security_ops {
    +	int  (* alloc_security)		(struct msg_msg *msg);
    +	void (* free_security)		(struct msg_msg *msg);
    +	int  (* test_message)		(struct msg_msg *msg, long type, int mode);
    +};
    +
     struct msg_queue_security_ops {
    -	int (* create)			(key_t key);	// can i create
    -	int (* permission)		(void);		
    -	int (* setmaxqbytes)		(void);		
    -	int (* setattr)			(void);		// can i set attributes
    -	int (* delete)			(void);		// can i delete
    +	int (* alloc_security)		(struct msg_queue *msq);
    +	void (* free_security)		(struct msg_queue *msq);
    +	int (* associate)		(struct msg_queue *msq, int msqid, int msqflg);
    +	int (* msgctl)			(struct msg_queue *msq, int msqid, int cmd);
    +	int (* msgsnd)			(struct msg_queue *msq, struct msg_msg *msg, int msqid, int msqflg);
    +	int (* msgrcv)			(struct msg_queue *msq, struct msg_msg *msg, int msqid, int msgflg);
     };
     
     struct shm_security_ops {
    @@ -183,6 +191,7 @@
     	int  (* ptrace)			(struct task_struct *parent, struct task_struct *child);		
     	int  (* setcapability)		(void);		
     	int  (* acct)			(struct file *file);
    +	int (* sysctl)			(ctl_table * table, int op);
     	int  (* capable)	        (struct task_struct *tsk, int cap); 
     
     	struct binprm_security_ops	* bprm_ops;
    @@ -193,6 +202,7 @@
     	struct socket_security_ops	* socket_ops;
     	struct module_security_ops 	* module_ops;
     	struct ipc_security_ops		* ipc_ops;
    +	struct msg_msg_security_ops	* msg_msg_ops;
     	struct msg_queue_security_ops	* msg_queue_ops;
     	struct shm_security_ops		* shm_ops;
     	struct sem_security_ops		* sem_ops;
    diff -Nru -X dontdiff wirex/lsm/kernel/security.c lsm/lsm-new/kernel/security.c
    --- wirex/lsm/kernel/security.c	Fri Jun 22 09:07:01 2001
    +++ lsm/lsm-new/kernel/security.c	Thu Jun 21 11:48:18 2001
    @@ -63,7 +63,6 @@
     }
     
     static int dummy_sysctl         (ctl_table * table, int op)     {return 0;}
    -
     static int dummy_binprm_alloc_security(struct linux_binprm *bprm)	{return 0;}
     static void dummy_binprm_free_security	(struct linux_binprm *bprm)		{return;}
     static void dummy_binprm_compute_creds	(struct linux_binprm *bprm)	{return;}
    @@ -125,7 +124,9 @@
     static int dummy_task_setrlimit	(unsigned int resource, struct rlimit *new_rlim)	{return 0;}
     static int dummy_task_setscheduler	(struct task_struct *p, int policy)	{return 0;}
     static int dummy_task_wait		(struct task_struct *p) {return 0;}
    +
     static int dummy_task_kill		(struct task_struct *p, struct siginfo *info, int sig)	{return 0;}
    +
     static int dummy_task_set_label		(char *filename)	{return 0;}
     static void dummy_task_reset_label	(void)			{return;}
     static void dummy_task_kmod_set_label	(void)	                {return;}
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Wed Jun 27 2001 - 07:49:51 PDT