[PATCH] cleanup spaces between functions and arguments

From: James Morris (jmorrisat_private)
Date: Thu Oct 11 2001 - 02:53:56 PDT

  • Next message: David Wheeler: "Re: Authoritiative hooks patch updated to 2.4.11 (richard offer)"

    Below is a patch against the current bitkeeper tree which removes spaces
    between function names and arguments.
    
    This is in response to a general comment on this issue by one of the core
    kernel developers: http://www.uwsg.iu.edu/hypermail/linux/kernel/0110.1/0851.html
    
    I've left the declarations in the security.h file alone, as I feel that
    they're somewhat clearer as is.
    
    
    - James
    -- 
    James Morris
    <jmorrisat_private>
    
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/fs/dquot.c lsm-w1/fs/dquot.c
    --- lsm/fs/dquot.c	Wed Oct 10 23:23:02 2001
    +++ lsm-w1/fs/dquot.c	Thu Oct 11 19:30:23 2001
    @@ -1448,7 +1448,7 @@
     			goto out;
     	}
    
    -	ret = security_ops->quotactl (cmds, type, id, sb);
    +	ret = security_ops->quotactl(cmds, type, id, sb);
     	if (ret)
     		goto out;
    
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/fs/file_table.c lsm-w1/fs/file_table.c
    --- lsm/fs/file_table.c	Mon Sep 24 18:29:01 2001
    +++ lsm-w1/fs/file_table.c	Thu Oct 11 19:30:23 2001
    @@ -118,7 +118,7 @@
    
     		if (file->f_op && file->f_op->release)
     			file->f_op->release(inode, file);
    -		security_ops->file_ops->free_security (file);
    +		security_ops->file_ops->free_security(file);
    
     		fops_put(file->f_op);
     		if (file->f_mode & FMODE_WRITE)
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/fs/read_write.c lsm-w1/fs/read_write.c
    --- lsm/fs/read_write.c	Mon Aug 13 20:23:22 2001
    +++ lsm-w1/fs/read_write.c	Thu Oct 11 19:30:23 2001
    @@ -172,7 +172,7 @@
     				ssize_t (*read)(struct file *, char *, size_t, loff_t *);
     				ret = -EINVAL;
     				if (file->f_op && (read = file->f_op->read) != NULL) {
    -					ret = security_ops->file_ops->permission (file, MAY_READ);
    +					ret = security_ops->file_ops->permission(file, MAY_READ);
     					if (!ret)
     						ret = read(file, buf, count, &file->f_pos);
     				}
    @@ -202,7 +202,7 @@
     				ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
     				ret = -EINVAL;
     				if (file->f_op && (write = file->f_op->write) != NULL) {
    -					ret = security_ops->file_ops->permission (file, MAY_WRITE);
    +					ret = security_ops->file_ops->permission(file, MAY_WRITE);
     					if (!ret)
     						ret = write(file, buf, count, &file->f_pos);
     				}
    @@ -332,7 +332,7 @@
     		goto bad_file;
     	if (file->f_op && (file->f_mode & FMODE_READ) &&
     	    (file->f_op->readv || file->f_op->read)) {
    -		ret = security_ops->file_ops->permission (file, MAY_READ);
    +		ret = security_ops->file_ops->permission(file, MAY_READ);
     		if (!ret)
     			ret = do_readv_writev(VERIFY_WRITE, file, vector, count);
     	}
    @@ -355,7 +355,7 @@
     		goto bad_file;
     	if (file->f_op && (file->f_mode & FMODE_WRITE) &&
     	    (file->f_op->writev || file->f_op->write)) {
    -		ret = security_ops->file_ops->permission (file, MAY_WRITE);
    +		ret = security_ops->file_ops->permission(file, MAY_WRITE);
     		if (!ret)
     			ret = do_readv_writev(VERIFY_READ, file, vector, count);
     	}
    @@ -392,7 +392,7 @@
     	if (pos < 0)
     		goto out;
    
    -	ret = security_ops->file_ops->permission (file, MAY_READ);
    +	ret = security_ops->file_ops->permission(file, MAY_READ);
     	if (ret)
     		goto out;
    
    @@ -428,7 +428,7 @@
     	if (pos < 0)
     		goto out;
    
    -	ret = security_ops->file_ops->permission (file, MAY_WRITE);
    +	ret = security_ops->file_ops->permission(file, MAY_WRITE);
     	if (ret)
     		goto out;
    
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/mm/filemap.c lsm-w1/mm/filemap.c
    --- lsm/mm/filemap.c	Wed Oct 10 23:23:02 2001
    +++ lsm-w1/mm/filemap.c	Thu Oct 11 19:30:23 2001
    @@ -1471,7 +1471,7 @@
     	if (retval)
     		goto fput_in;
    
    -	retval = security_ops->file_ops->permission (in_file, MAY_READ);
    +	retval = security_ops->file_ops->permission(in_file, MAY_READ);
     	if (retval)
     		goto fput_in;
    
    @@ -1492,7 +1492,7 @@
     	if (retval)
     		goto fput_out;
    
    -	retval = security_ops->file_ops->permission (out_file, MAY_WRITE);
    +	retval = security_ops->file_ops->permission(out_file, MAY_WRITE);
     	if (retval)
     		goto fput_out;
    
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/security/capability_plug.c lsm-w1/security/capability_plug.c
    --- lsm/security/capability_plug.c	Wed Oct 10 23:22:57 2001
    +++ lsm-w1/security/capability_plug.c	Thu Oct 11 19:40:08 2001
    @@ -21,106 +21,106 @@
     /* flag to keep track of how we were registered */
     static int secondary;
    
    -static int cap_sethostname (char *hostname)
    +static int cap_sethostname(char *hostname)
     {
     	return 0;
     }
    
    -static int cap_setdomainname (char *domainname)
    +static int cap_setdomainname(char *domainname)
     {
     	return 0;
     }
    
    -static int cap_reboot (unsigned int cmd)
    +static int cap_reboot(unsigned int cmd)
     {
     	return 0;
     }
    
    -static int cap_ioperm (unsigned long from, unsigned long num, int turn_on)
    +static int cap_ioperm(unsigned long from, unsigned long num, int turn_on)
     {
     	return 0;
     }
    
    -static int cap_iopl (unsigned int old, unsigned int level)
    +static int cap_iopl(unsigned int old, unsigned int level)
     {
     	return 0;
     }
    
    -static int cap_capable (struct task_struct *tsk, int cap)
    +static int cap_capable(struct task_struct *tsk, int cap)
     {
     	/* Derived from include/linux/sched.h:capable. */
    -	if (cap_raised (tsk->cap_effective, cap))
    +	if (cap_raised(tsk->cap_effective, cap))
     		return 0;
     	else
     		return -EPERM;
     }
    
    -static int cap_sys_security (unsigned int id, unsigned int call,
    -			     unsigned long *args)
    +static int cap_sys_security(unsigned int id, unsigned int call,
    +			    unsigned long *args)
     {
     	return -ENOSYS;
     }
    
    -static int cap_swapon (struct dentry *dentry)
    +static int cap_swapon(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int cap_swapoff (struct dentry *dentry)
    +static int cap_swapoff(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int cap_nfsservctl (int cmd, struct nfsctl_arg *arg)
    +static int cap_nfsservctl(int cmd, struct nfsctl_arg *arg)
     {
     	return 0;
     }
    
    -static int cap_quotactl (int cmds, int type, int id, struct super_block *sb)
    +static int cap_quotactl(int cmds, int type, int id, struct super_block *sb)
     {
     	return 0;
     }
    
    -static int cap_quota_on (struct file *f)
    +static int cap_quota_on(struct file *f)
     {
     	return 0;
     }
    
    -static int cap_bdflush (int func, long data)
    +static int cap_bdflush(int func, long data)
     {
     	return 0;
     }
    
    -static int cap_syslog (int type)
    +static int cap_syslog(int type)
     {
     	return 0;
     }
    
    -static int cap_netlink_send (struct sk_buff *skb)
    +static int cap_netlink_send(struct sk_buff *skb)
     {
    -	NETLINK_CB (skb).eff_cap = current->cap_effective;
    +	NETLINK_CB(skb).eff_cap = current->cap_effective;
     	return 0;
     }
    
    -static int cap_netlink_recv (struct sk_buff *skb)
    +static int cap_netlink_recv(struct sk_buff *skb)
     {
    -	if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN))
    +	if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN))
     		return -EPERM;
     	return 0;
     }
    
    -static int cap_ptrace (struct task_struct *parent, struct task_struct *child)
    +static int cap_ptrace(struct task_struct *parent, struct task_struct *child)
     {
     	/* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */
    -	if (!cap_issubset (child->cap_permitted, current->cap_permitted) &&
    -	    !capable (CAP_SYS_PTRACE))
    +	if (!cap_issubset(child->cap_permitted, current->cap_permitted) &&
    +	    !capable(CAP_SYS_PTRACE))
     		return -EPERM;
     	else
     		return 0;
     }
    
    -static int cap_capget (struct task_struct *target, kernel_cap_t * effective,
    -		       kernel_cap_t * inheritable, kernel_cap_t * permitted)
    +static int cap_capget(struct task_struct *target, kernel_cap_t * effective,
    +		      kernel_cap_t * inheritable, kernel_cap_t * permitted)
     {
     	/* Derived from kernel/capability.c:sys_capget. */
     	*effective = cap_t (target->cap_effective);
    @@ -129,67 +129,67 @@
     	return 0;
     }
    
    -static int cap_capset_check (struct task_struct *target,
    -			     kernel_cap_t * effective,
    -			     kernel_cap_t * inheritable,
    -			     kernel_cap_t * permitted)
    +static int cap_capset_check(struct task_struct *target,
    +			    kernel_cap_t * effective,
    +			    kernel_cap_t * inheritable,
    +			    kernel_cap_t * permitted)
     {
     	/* Derived from kernel/capability.c:sys_capset. */
     	/* verify restrictions on target's new Inheritable set */
    -	if (!cap_issubset (*inheritable,
    -			   cap_combine (target->cap_inheritable,
    -					current->cap_permitted))) {
    +	if (!cap_issubset(*inheritable,
    +			  cap_combine(target->cap_inheritable,
    +				      current->cap_permitted))) {
     		return -EPERM;
     	}
    
     	/* verify restrictions on target's new Permitted set */
    -	if (!cap_issubset (*permitted,
    -			   cap_combine (target->cap_permitted,
    -					current->cap_permitted))) {
    +	if (!cap_issubset(*permitted,
    +			  cap_combine(target->cap_permitted,
    +				      current->cap_permitted))) {
     		return -EPERM;
     	}
    
     	/* verify the _new_Effective_ is a subset of the _new_Permitted_ */
    -	if (!cap_issubset (*effective, *permitted)) {
    +	if (!cap_issubset(*effective, *permitted)) {
     		return -EPERM;
     	}
    
     	return 0;
     }
    
    -static void cap_capset_set (struct task_struct *target,
    -			    kernel_cap_t * effective,
    -			    kernel_cap_t * inheritable,
    -			    kernel_cap_t * permitted)
    +static void cap_capset_set(struct task_struct *target,
    +			   kernel_cap_t * effective,
    +			   kernel_cap_t * inheritable,
    +			   kernel_cap_t * permitted)
     {
     	target->cap_effective = *effective;
     	target->cap_inheritable = *inheritable;
     	target->cap_permitted = *permitted;
     }
    
    -static int cap_acct (struct file *file)
    +static int cap_acct(struct file *file)
     {
     	return 0;
     }
    
    -static int cap_sysctl (ctl_table * table, int op)
    +static int cap_sysctl(ctl_table * table, int op)
     {
     	return 0;
     }
    
    -static int cap_binprm_alloc_security (struct linux_binprm *bprm)
    +static int cap_binprm_alloc_security(struct linux_binprm *bprm)
     {
     	return 0;
     }
    
    -static int cap_binprm_set_security (struct linux_binprm *bprm)
    +static int cap_binprm_set_security(struct linux_binprm *bprm)
     {
     	/* Copied from fs/exec.c:prepare_binprm. */
    
     	/* We don't have VFS support for capabilities yet */
    -	cap_clear (bprm->cap_inheritable);
    -	cap_clear (bprm->cap_permitted);
    -	cap_clear (bprm->cap_effective);
    +	cap_clear(bprm->cap_inheritable);
    +	cap_clear(bprm->cap_permitted);
    +	cap_clear(bprm->cap_effective);
    
     	/*  To support inheritance of root-permissions and suid-root
     	 *  executables under compatibility mode, we raise all three
    @@ -199,52 +199,52 @@
     	 *  and permitted sets of the executable file.
     	 */
    
    -	if (!issecure (SECURE_NOROOT)) {
    +	if (!issecure(SECURE_NOROOT)) {
     		if (bprm->e_uid == 0 || current->uid == 0) {
    -			cap_set_full (bprm->cap_inheritable);
    -			cap_set_full (bprm->cap_permitted);
    +			cap_set_full(bprm->cap_inheritable);
    +			cap_set_full(bprm->cap_permitted);
     		}
     		if (bprm->e_uid == 0)
    -			cap_set_full (bprm->cap_effective);
    +			cap_set_full(bprm->cap_effective);
     	}
     	return 0;
     }
    
    -static void cap_binprm_free_security (struct linux_binprm *bprm)
    +static void cap_binprm_free_security(struct linux_binprm *bprm)
     {
     	return;
     }
    
     /* Copied from fs/exec.c */
    -static inline int must_not_trace_exec (struct task_struct *p)
    +static inline int must_not_trace_exec(struct task_struct *p)
     {
     	return (p->ptrace & PT_PTRACED)
    -	    && cap_capable (p->p_pptr, CAP_SYS_PTRACE);
    +	    && cap_capable(p->p_pptr, CAP_SYS_PTRACE);
     }
    
    -static void cap_binprm_compute_creds (struct linux_binprm *bprm)
    +static void cap_binprm_compute_creds(struct linux_binprm *bprm)
     {
     	/* Derived from fs/exec.c:compute_creds. */
     	kernel_cap_t new_permitted, working;
     	int do_unlock = 0;
    
    -	new_permitted = cap_intersect (bprm->cap_permitted, cap_bset);
    -	working = cap_intersect (bprm->cap_inheritable,
    -				 current->cap_inheritable);
    -	new_permitted = cap_combine (new_permitted, working);
    +	new_permitted = cap_intersect(bprm->cap_permitted, cap_bset);
    +	working = cap_intersect(bprm->cap_inheritable,
    +				current->cap_inheritable);
    +	new_permitted = cap_combine(new_permitted, working);
    
    -	if (!cap_issubset (new_permitted, current->cap_permitted)) {
    +	if (!cap_issubset(new_permitted, current->cap_permitted)) {
     		current->mm->dumpable = 0;
    
    -		lock_kernel ();
    -		if (must_not_trace_exec (current)
    -		    || atomic_read (&current->fs->count) > 1
    -		    || atomic_read (&current->files->count) > 1
    -		    || atomic_read (&current->sig->count) > 1) {
    -			if (!capable (CAP_SETPCAP)) {
    -				new_permitted = cap_intersect (new_permitted,
    -							       current->
    -							       cap_permitted);
    +		lock_kernel();
    +		if (must_not_trace_exec(current)
    +		    || atomic_read(&current->fs->count) > 1
    +		    || atomic_read(&current->files->count) > 1
    +		    || atomic_read(&current->sig->count) > 1) {
    +			if (!capable(CAP_SETPCAP)) {
    +				new_permitted = cap_intersect(new_permitted,
    +							      current->
    +							      cap_permitted);
     			}
     		}
     		do_unlock = 1;
    @@ -256,285 +256,284 @@
     	if (current->pid != 1) {
     		current->cap_permitted = new_permitted;
     		current->cap_effective =
    -		    cap_intersect (new_permitted, bprm->cap_effective);
    +		    cap_intersect(new_permitted, bprm->cap_effective);
     	}
    
     	/* AUD: Audit candidate if current->cap_effective is set */
    
     	if (do_unlock)
    -		unlock_kernel ();
    +		unlock_kernel();
    
     	current->keep_capabilities = 0;
     }
    
    -static int cap_sb_alloc_security (struct super_block *sb)
    +static int cap_sb_alloc_security(struct super_block *sb)
     {
     	return 0;
     }
    
    -static void cap_sb_free_security (struct super_block *sb)
    +static void cap_sb_free_security(struct super_block *sb)
     {
     	return;
     }
    
    -static int cap_sb_statfs (struct super_block *sb)
    +static int cap_sb_statfs(struct super_block *sb)
     {
     	return 0;
     }
    
    -static int cap_mount (char *dev_name, struct nameidata *nd, char *type,
    -		      unsigned long flags, void *data)
    +static int cap_mount(char *dev_name, struct nameidata *nd, char *type,
    +		     unsigned long flags, void *data)
     {
     	return 0;
     }
    
    -static int cap_umount (struct vfsmount *mnt, int flags)
    +static int cap_umount(struct vfsmount *mnt, int flags)
     {
     	return 0;
     }
    
    -static void cap_umount_close (struct vfsmount *mnt)
    +static void cap_umount_close(struct vfsmount *mnt)
     {
     	return;
     }
    
    -static void cap_umount_busy (struct vfsmount *mnt)
    +static void cap_umount_busy(struct vfsmount *mnt)
     {
     	return;
     }
    
    -static void cap_post_remount (struct vfsmount *mnt, unsigned long flags,
    -			      void *data)
    +static void cap_post_remount(struct vfsmount *mnt, unsigned long flags,
    +                             void *data)
     {
     	return;
     }
    
    -static void cap_post_mountroot (struct super_block *sb)
    +static void cap_post_mountroot(struct super_block *sb)
     {
     	return;
     }
    
    -static void cap_post_addmount (struct vfsmount *mnt, struct nameidata *nd)
    +static void cap_post_addmount(struct vfsmount *mnt, struct nameidata *nd)
     {
     	return;
     }
    
    -static int cap_inode_alloc_security (struct inode *inode)
    +static int cap_inode_alloc_security(struct inode *inode)
     {
     	return 0;
     }
    
    -static void cap_inode_free_security (struct inode *inode)
    +static void cap_inode_free_security(struct inode *inode)
     {
     	return;
     }
    
    -static int cap_inode_create (struct inode *inode, struct dentry *dentry,
    -			     int mask)
    +static int cap_inode_create(struct inode *inode, struct dentry *dentry,
    +			    int mask)
     {
     	return 0;
     }
    
    -static void cap_inode_post_create (struct inode *inode, struct dentry *dentry,
    -				   int mask)
    +static void cap_inode_post_create(struct inode *inode, struct dentry *dentry,
    +				  int mask)
     {
     	return;
     }
    
    -static int cap_inode_link (struct dentry *old_dentry, struct inode *inode,
    -			   struct dentry *new_dentry)
    +static int cap_inode_link(struct dentry *old_dentry, struct inode *inode,
    +			  struct dentry *new_dentry)
     {
     	return 0;
     }
    
    -static void cap_inode_post_link (struct dentry *old_dentry, struct inode *inode,
    -				 struct dentry *new_dentry)
    +static void cap_inode_post_link(struct dentry *old_dentry, struct inode *inode,
    +				struct dentry *new_dentry)
     {
     	return;
     }
    
    -static int cap_inode_unlink (struct inode *inode, struct dentry *dentry)
    +static int cap_inode_unlink(struct inode *inode, struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int cap_inode_symlink (struct inode *inode, struct dentry *dentry,
    -			      const char *name)
    +static int cap_inode_symlink(struct inode *inode, struct dentry *dentry,
    +			     const char *name)
     {
     	return 0;
     }
    
    -static void cap_inode_post_symlink (struct inode *inode, struct dentry *dentry,
    -				    const char *name)
    +static void cap_inode_post_symlink(struct inode *inode, struct dentry *dentry,
    +				   const char *name)
     {
     	return;
     }
    
    -static int cap_inode_mkdir (struct inode *inode, struct dentry *dentry,
    -			    int mask)
    +static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry, int mask)
     {
     	return 0;
     }
    
    -static void cap_inode_post_mkdir (struct inode *inode, struct dentry *dentry,
    -				  int mask)
    +static void cap_inode_post_mkdir(struct inode *inode, struct dentry *dentry,
    +				 int mask)
     {
     	return;
     }
    
    -static int cap_inode_rmdir (struct inode *inode, struct dentry *dentry)
    +static int cap_inode_rmdir(struct inode *inode, struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int cap_inode_mknod (struct inode *inode, struct dentry *dentry,
    -			    int major, dev_t minor)
    +static int cap_inode_mknod(struct inode *inode, struct dentry *dentry,
    +			   int major, dev_t minor)
     {
     	return 0;
     }
    
    -static void cap_inode_post_mknod (struct inode *inode, struct dentry *dentry,
    -				  int major, dev_t minor)
    +static void cap_inode_post_mknod(struct inode *inode, struct dentry *dentry,
    +				 int major, dev_t minor)
     {
     	return;
     }
    
    -static int cap_inode_rename (struct inode *old_inode, struct dentry *old_dentry,
    -			     struct inode *new_inode, struct dentry *new_dentry)
    +static int cap_inode_rename(struct inode *old_inode, struct dentry *old_dentry,
    +			    struct inode *new_inode, struct dentry *new_dentry)
     {
     	return 0;
     }
    
    -static void cap_inode_post_rename (struct inode *old_inode,
    -				   struct dentry *old_dentry,
    -				   struct inode *new_inode,
    -				   struct dentry *new_dentry)
    +static void cap_inode_post_rename(struct inode *old_inode,
    +				  struct dentry *old_dentry,
    +				  struct inode *new_inode,
    +				  struct dentry *new_dentry)
     {
     	return;
     }
    
    -static int cap_inode_readlink (struct dentry *dentry)
    +static int cap_inode_readlink(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int cap_inode_follow_link (struct dentry *dentry,
    -				  struct nameidata *nameidata)
    +static int cap_inode_follow_link(struct dentry *dentry,
    +				 struct nameidata *nameidata)
     {
     	return 0;
     }
    
    -static int cap_inode_permission (struct inode *inode, int mask)
    +static int cap_inode_permission(struct inode *inode, int mask)
     {
     	return 0;
     }
    
    -static int cap_inode_revalidate (struct dentry *inode)
    +static int cap_inode_revalidate(struct dentry *inode)
     {
     	return 0;
     }
    
    -static int cap_inode_setattr (struct dentry *dentry, struct iattr *iattr)
    +static int cap_inode_setattr(struct dentry *dentry, struct iattr *iattr)
     {
     	return 0;
     }
    
    -static int cap_inode_stat (struct inode *inode)
    +static int cap_inode_stat(struct inode *inode)
     {
     	return 0;
     }
    
    -static void cap_post_lookup (struct inode *ino, struct dentry *d)
    +static void cap_post_lookup(struct inode *ino, struct dentry *d)
     {
     	return;
     }
    
    -static void cap_delete (struct inode *ino)
    +static void cap_delete(struct inode *ino)
     {
     	return;
     }
    
    -static int cap_file_permission (struct file *file, int mask)
    +static int cap_file_permission(struct file *file, int mask)
     {
     	return 0;
     }
    
    -static int cap_file_alloc_security (struct file *file)
    +static int cap_file_alloc_security(struct file *file)
     {
     	return 0;
     }
    
    -static void cap_file_free_security (struct file *file)
    +static void cap_file_free_security(struct file *file)
     {
     	return;
     }
    
    -static int cap_file_llseek (struct file *file)
    +static int cap_file_llseek(struct file *file)
     {
     	return 0;
     }
    
    -static int cap_file_ioctl (struct file *file, unsigned int command,
    -			   unsigned long arg)
    +static int cap_file_ioctl(struct file *file, unsigned int command,
    +			  unsigned long arg)
     {
     	return 0;
     }
    
    -static int cap_file_mmap (struct file *file, unsigned long prot,
    -			  unsigned long flags)
    +static int cap_file_mmap(struct file *file, unsigned long prot,
    +			 unsigned long flags)
     {
     	return 0;
     }
    
    -static int cap_file_mprotect (struct vm_area_struct *vma, unsigned long prot)
    +static int cap_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
     {
     	return 0;
     }
    
    -static int cap_file_lock (struct file *file, unsigned int cmd)
    +static int cap_file_lock(struct file *file, unsigned int cmd)
     {
     	return 0;
     }
    
    -static int cap_file_fcntl (struct file *file, unsigned int cmd,
    -			   unsigned long arg)
    +static int cap_file_fcntl(struct file *file, unsigned int cmd,
    +			  unsigned long arg)
     {
     	return 0;
     }
    
    -static int cap_file_set_fowner (struct file *file)
    +static int cap_file_set_fowner(struct file *file)
     {
     	return 0;
     }
    
    -static int cap_file_send_sigiotask (struct task_struct *tsk,
    -				    struct fown_struct *fown, int fd,
    -				    int reason)
    +static int cap_file_send_sigiotask(struct task_struct *tsk,
    +				   struct fown_struct *fown, int fd,
    +				   int reason)
     {
     	return 0;
     }
    
    -static int cap_file_receive (struct file *file)
    +static int cap_file_receive(struct file *file)
     {
     	return 0;
     }
    
    -static int cap_task_create (unsigned long clone_flags)
    +static int cap_task_create(unsigned long clone_flags)
     {
     	return 0;
     }
    
    -static int cap_task_alloc_security (struct task_struct *p)
    +static int cap_task_alloc_security(struct task_struct *p)
     {
     	return 0;
     }
    
    -static void cap_task_free_security (struct task_struct *p)
    +static void cap_task_free_security(struct task_struct *p)
     {
     	return;
     }
    
    -static int cap_task_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
    +static int cap_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags)
     {
     	return 0;
     }
    @@ -569,33 +568,32 @@
      * files..
      * Thanks to Olaf Kirch and Peter Benie for spotting this.
      */
    -static inline void cap_emulate_setxuid (int old_ruid, int old_euid,
    -					int old_suid)
    +static inline void cap_emulate_setxuid(int old_ruid, int old_euid, int old_suid)
     {
     	if ((old_ruid == 0 || old_euid == 0 || old_suid == 0) &&
     	    (current->uid != 0 && current->euid != 0 && current->suid != 0) &&
     	    !current->keep_capabilities) {
    -		cap_clear (current->cap_permitted);
    -		cap_clear (current->cap_effective);
    +		cap_clear(current->cap_permitted);
    +		cap_clear(current->cap_effective);
     	}
     	if (old_euid == 0 && current->euid != 0) {
    -		cap_clear (current->cap_effective);
    +		cap_clear(current->cap_effective);
     	}
     	if (old_euid != 0 && current->euid == 0) {
     		current->cap_effective = current->cap_permitted;
     	}
     }
    
    -static int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid,
    -				 int flags)
    +static int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid,
    +				int flags)
     {
     	switch (flags) {
     	case LSM_SETID_RE:
     	case LSM_SETID_ID:
     	case LSM_SETID_RES:
     		/* Copied from kernel/sys.c:setreuid/setuid/setresuid. */
    -		if (!issecure (SECURE_NO_SETUID_FIXUP)) {
    -			cap_emulate_setxuid (old_ruid, old_euid, old_suid);
    +		if (!issecure(SECURE_NO_SETUID_FIXUP)) {
    +			cap_emulate_setxuid(old_ruid, old_euid, old_suid);
     		}
     		break;
     	case LSM_SETID_FS:
    @@ -609,7 +607,7 @@
     			 *          if not, we might be a bit too harsh here.
     			 */
    
    -			if (!issecure (SECURE_NO_SETUID_FIXUP)) {
    +			if (!issecure(SECURE_NO_SETUID_FIXUP)) {
     				if (old_fsuid == 0 && current->fsuid != 0) {
     					cap_t (current->cap_effective) &=
     					    ~CAP_FS_MASK;
    @@ -629,438 +627,438 @@
     	return 0;
     }
    
    -static int cap_task_setgid (gid_t id0, gid_t id1, gid_t id2, int flags)
    +static int cap_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags)
     {
     	return 0;
     }
    
    -static int cap_task_setpgid (struct task_struct *p, pid_t pgid)
    +static int cap_task_setpgid(struct task_struct *p, pid_t pgid)
     {
     	return 0;
     }
    
    -static int cap_task_getpgid (struct task_struct *p)
    +static int cap_task_getpgid(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int cap_task_getsid (struct task_struct *p)
    +static int cap_task_getsid(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int cap_task_setgroups (int gidsetsize, gid_t * grouplist)
    +static int cap_task_setgroups(int gidsetsize, gid_t * grouplist)
     {
     	return 0;
     }
    
    -static int cap_task_setnice (struct task_struct *p, int nice)
    +static int cap_task_setnice(struct task_struct *p, int nice)
     {
     	return 0;
     }
    
    -static int cap_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
    +static int cap_task_setrlimit(unsigned int resource, struct rlimit *new_rlim)
     {
     	return 0;
     }
    
    -static int cap_task_setscheduler (struct task_struct *p, int policy,
    -				  struct sched_param *lp)
    +static int cap_task_setscheduler(struct task_struct *p, int policy,
    +				 struct sched_param *lp)
     {
     	return 0;
     }
    
    -static int cap_task_getscheduler (struct task_struct *p)
    +static int cap_task_getscheduler(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int cap_task_wait (struct task_struct *p)
    +static int cap_task_wait(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int cap_task_kill (struct task_struct *p, struct siginfo *info, int sig)
    +static int cap_task_kill(struct task_struct *p, struct siginfo *info, int sig)
     {
     	return 0;
     }
    
    -static int cap_task_prctl (int option, unsigned long arg2, unsigned long arg3,
    -			   unsigned long arg4, unsigned long arg5)
    +static int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
    +			  unsigned long arg4, unsigned long arg5)
     {
     	return 0;
     }
    
    -static void cap_task_kmod_set_label (void)
    +static void cap_task_kmod_set_label(void)
     {
    -	cap_set_full (current->cap_effective);
    +	cap_set_full(current->cap_effective);
     	return;
     }
    
    -static unsigned int cap_ip_preroute_first (unsigned int hooknum,
    -					   struct sk_buff **pskb,
    -					   const struct net_device *in,
    -					   const struct net_device *out,
    -					   int (*okfn) (struct sk_buff *))
    -{
    -	return NF_ACCEPT;
    -}
    -
    -static unsigned int cap_ip_preroute_last (unsigned int hooknum,
    +static unsigned int cap_ip_preroute_first(unsigned int hooknum,
     					  struct sk_buff **pskb,
     					  const struct net_device *in,
     					  const struct net_device *out,
    -					  int (*okfn) (struct sk_buff *))
    +					  int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_input_first (unsigned int hooknum,
    -					struct sk_buff **pskb,
    -					const struct net_device *in,
    -					const struct net_device *out,
    -					int (*okfn) (struct sk_buff *))
    +static unsigned int cap_ip_preroute_last(unsigned int hooknum,
    +					 struct sk_buff **pskb,
    +					 const struct net_device *in,
    +					 const struct net_device *out,
    +					 int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_input_last (unsigned int hooknum,
    +static unsigned int cap_ip_input_first(unsigned int hooknum,
     				       struct sk_buff **pskb,
     				       const struct net_device *in,
     				       const struct net_device *out,
    -				       int (*okfn) (struct sk_buff *))
    +				       int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_forward_first (unsigned int hooknum,
    -					  struct sk_buff **pskb,
    -					  const struct net_device *in,
    -					  const struct net_device *out,
    -					  int (*okfn) (struct sk_buff *))
    +static unsigned int cap_ip_input_last(unsigned int hooknum,
    +				      struct sk_buff **pskb,
    +				      const struct net_device *in,
    +				      const struct net_device *out,
    +				      int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_forward_last (unsigned int hooknum,
    +static unsigned int cap_ip_forward_first(unsigned int hooknum,
     					 struct sk_buff **pskb,
     					 const struct net_device *in,
     					 const struct net_device *out,
    -					 int (*okfn) (struct sk_buff *))
    +					 int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_output_first (unsigned int hooknum,
    -					 struct sk_buff **pskb,
    -					 const struct net_device *in,
    -					 const struct net_device *out,
    -					 int (*okfn) (struct sk_buff *))
    +static unsigned int cap_ip_forward_last(unsigned int hooknum,
    +					struct sk_buff **pskb,
    +					const struct net_device *in,
    +					const struct net_device *out,
    +					int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_output_last (unsigned int hooknum,
    +static unsigned int cap_ip_output_first(unsigned int hooknum,
     					struct sk_buff **pskb,
     					const struct net_device *in,
     					const struct net_device *out,
    -					int (*okfn) (struct sk_buff *))
    +					int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_postroute_first (unsigned int hooknum,
    -					    struct sk_buff **pskb,
    -					    const struct net_device *in,
    -					    const struct net_device *out,
    -					    int (*okfn) (struct sk_buff *))
    +static unsigned int cap_ip_output_last(unsigned int hooknum,
    +				       struct sk_buff **pskb,
    +				       const struct net_device *in,
    +				       const struct net_device *out,
    +				       int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int cap_ip_postroute_last (unsigned int hooknum,
    +static unsigned int cap_ip_postroute_first(unsigned int hooknum,
     					   struct sk_buff **pskb,
     					   const struct net_device *in,
     					   const struct net_device *out,
    -					   int (*okfn) (struct sk_buff *))
    +					   int (*okfn)(struct sk_buff *))
    +{
    +	return NF_ACCEPT;
    +}
    +
    +static unsigned int cap_ip_postroute_last(unsigned int hooknum,
    +					  struct sk_buff **pskb,
    +					  const struct net_device *in,
    +					  const struct net_device *out,
    +					  int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static void cap_ip_fragment (struct sk_buff *newskb,
    -			     const struct sk_buff *oldskb)
    +static void cap_ip_fragment(struct sk_buff *newskb,
    +                            const struct sk_buff *oldskb)
     {
     	return;
     }
    
    -static int cap_ip_defragment (struct sk_buff *skb)
    +static int cap_ip_defragment(struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static void cap_ip_encapsulate (struct sk_buff *skb)
    +static void cap_ip_encapsulate(struct sk_buff *skb)
     {
     	return;
     }
    
    -static void cap_ip_decapsulate (struct sk_buff *skb)
    +static void cap_ip_decapsulate(struct sk_buff *skb)
     {
     	return;
     }
    
    -static int cap_ip_decode_options (struct sk_buff *skb, const char *optptr,
    -				  unsigned char **pp_ptr)
    +static int cap_ip_decode_options(struct sk_buff *skb, const char *optptr,
    +				 unsigned char **pp_ptr)
     {
    -	if (!skb && !capable (CAP_NET_RAW)) {
    +	if (!skb && !capable(CAP_NET_RAW)) {
     		(const unsigned char *) *pp_ptr = optptr;
     		return -EPERM;
     	}
     	return 0;
     }
    
    -static void cap_netdev_unregister (struct net_device *dev)
    +static void cap_netdev_unregister(struct net_device *dev)
     {
     	return;
     }
    
    -static int cap_socket_create (int family, int type, int protocol)
    +static int cap_socket_create(int family, int type, int protocol)
     {
     	return 0;
     }
    
    -static void cap_socket_post_create (struct socket *sock, int family, int type,
    -				    int protocol)
    +static void cap_socket_post_create(struct socket *sock, int family, int type,
    +				   int protocol)
     {
     	return;
     }
    
    -static int cap_socket_bind (struct socket *sock, struct sockaddr *address,
    -			    int addrlen)
    +static int cap_socket_bind(struct socket *sock, struct sockaddr *address,
    +			   int addrlen)
     {
     	return 0;
     }
    
    -static int cap_socket_connect (struct socket *sock, struct sockaddr *address,
    -			       int addrlen)
    +static int cap_socket_connect(struct socket *sock, struct sockaddr *address,
    +			      int addrlen)
     {
     	return 0;
     }
    
    -static int cap_socket_listen (struct socket *sock, int backlog)
    +static int cap_socket_listen(struct socket *sock, int backlog)
     {
     	return 0;
     }
    
    -static int cap_socket_accept (struct socket *sock, struct socket *newsock)
    +static int cap_socket_accept(struct socket *sock, struct socket *newsock)
     {
     	return 0;
     }
    
    -static int cap_socket_sendmsg (struct socket *sock, struct msghdr *msg,
    -			       int size)
    +static int cap_socket_sendmsg(struct socket *sock, struct msghdr *msg,
    +			      int size)
     {
     	return 0;
     }
    
    -static int cap_socket_recvmsg (struct socket *sock, struct msghdr *msg,
    -			       int size, int flags)
    +static int cap_socket_recvmsg(struct socket *sock, struct msghdr *msg,
    +			      int size, int flags)
     {
     	return 0;
     }
    
    -static int cap_socket_getsockname (struct socket *sock)
    +static int cap_socket_getsockname(struct socket *sock)
     {
     	return 0;
     }
    
    -static int cap_socket_getpeername (struct socket *sock)
    +static int cap_socket_getpeername(struct socket *sock)
     {
     	return 0;
     }
    
    -static int cap_socket_setsockopt (struct socket *sock, int level, int optname)
    +static int cap_socket_setsockopt(struct socket *sock, int level, int optname)
     {
     	return 0;
     }
    
    -static int cap_socket_getsockopt (struct socket *sock, int level, int optname)
    +static int cap_socket_getsockopt(struct socket *sock, int level, int optname)
     {
     	return 0;
     }
    
    -static int cap_socket_shutdown (struct socket *sock, int how)
    +static int cap_socket_shutdown(struct socket *sock, int how)
     {
     	return 0;
     }
    
    -static int cap_sock_rcv_skb (struct sock *sk, struct sk_buff *skb)
    +static int cap_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static int cap_socket_unix_stream_connect (struct socket *sock,
    -					   struct socket *other)
    +static int cap_socket_unix_stream_connect(struct socket *sock,
    +					  struct socket *other)
     {
     	return 0;
     }
    
    -static int cap_socket_unix_may_send (struct socket *sock, struct socket *other)
    +static int cap_socket_unix_may_send(struct socket *sock, struct socket *other)
     {
     	return 0;
     }
    
    -static int cap_module_create_module (const char *name_user, size_t size)
    +static int cap_module_create_module(const char *name_user, size_t size)
     {
     	return 0;
     }
    
    -static int cap_module_init_module (struct module *mod_user)
    +static int cap_module_init_module(struct module *mod_user)
     {
     	return 0;
     }
    
    -static int cap_module_delete_module (const struct module *mod)
    +static int cap_module_delete_module(const struct module *mod)
     {
     	return 0;
     }
    
    -static int cap_ipc_permission (struct kern_ipc_perm *ipcp, short flag)
    +static int cap_ipc_permission(struct kern_ipc_perm *ipcp, short flag)
     {
     	return 0;
     }
    
    -static int cap_ipc_getinfo (int id, int cmd)
    +static int cap_ipc_getinfo(int id, int cmd)
     {
     	return 0;
     }
    
    -static int cap_msg_msg_alloc_security (struct msg_msg *msg)
    +static int cap_msg_msg_alloc_security(struct msg_msg *msg)
     {
     	return 0;
     }
    
    -static void cap_msg_msg_free_security (struct msg_msg *msg)
    +static void cap_msg_msg_free_security(struct msg_msg *msg)
     {
     	return;
     }
    
    -static int cap_msg_queue_alloc_security (struct msg_queue *msq)
    +static int cap_msg_queue_alloc_security(struct msg_queue *msq)
     {
     	return 0;
     }
    
    -static void cap_msg_queue_free_security (struct msg_queue *msq)
    +static void cap_msg_queue_free_security(struct msg_queue *msq)
     {
     	return;
     }
    
    -static int cap_msg_queue_associate (struct msg_queue *msq, int msgid,
    -				    int msgflg)
    +static int cap_msg_queue_associate(struct msg_queue *msq, int msgid,
    +				   int msgflg)
     {
     	return 0;
     }
    
    -static int cap_msg_queue_msgctl (struct msg_queue *msq, int msgid, int cmd)
    +static int cap_msg_queue_msgctl(struct msg_queue *msq, int msgid, int cmd)
     {
     	return 0;
     }
    
    -static int cap_msg_queue_msgsnd (struct msg_queue *msq, struct msg_msg *msg,
    -				 int msgid, int msgflg)
    +static int cap_msg_queue_msgsnd(struct msg_queue *msq, struct msg_msg *msg,
    +				int msgid, int msgflg)
     {
     	return 0;
     }
    
    -static int cap_msg_queue_msgrcv (struct msg_queue *msq, struct msg_msg *msg,
    -				 struct task_struct *target, long type,
    -				 int mode)
    +static int cap_msg_queue_msgrcv(struct msg_queue *msq, struct msg_msg *msg,
    +				struct task_struct *target, long type,
    +				int mode)
     {
     	return 0;
     }
    
    -static int cap_shm_alloc_security (struct shmid_kernel *shp)
    +static int cap_shm_alloc_security(struct shmid_kernel *shp)
     {
     	return 0;
     }
    
    -static void cap_shm_free_security (struct shmid_kernel *shp)
    +static void cap_shm_free_security(struct shmid_kernel *shp)
     {
     	return;
     }
    
    -static int cap_shm_associate (struct shmid_kernel *shp, int shmid, int shmflg)
    +static int cap_shm_associate(struct shmid_kernel *shp, int shmid, int shmflg)
     {
     	return 0;
     }
    
    -static int cap_shm_shmctl (struct shmid_kernel *shp, int shmid, int cmd)
    +static int cap_shm_shmctl(struct shmid_kernel *shp, int shmid, int cmd)
     {
     	return 0;
     }
    
    -static int cap_shm_shmat (struct shmid_kernel *shp, int shmid, char *shmaddr,
    -			  int shmflg)
    +static int cap_shm_shmat(struct shmid_kernel *shp, int shmid, char *shmaddr,
    +			 int shmflg)
     {
     	return 0;
     }
    
    -static int cap_sem_alloc_security (struct sem_array *sma)
    +static int cap_sem_alloc_security(struct sem_array *sma)
     {
     	return 0;
     }
    
    -static void cap_sem_free_security (struct sem_array *sma)
    +static void cap_sem_free_security(struct sem_array *sma)
     {
     	return;
     }
    
    -static int cap_sem_associate (struct sem_array *sma, int semid, int semflg)
    +static int cap_sem_associate(struct sem_array *sma, int semid, int semflg)
     {
     	return 0;
     }
    
    -static int cap_sem_semctl (struct sem_array *sma, int semid, int cmd)
    +static int cap_sem_semctl(struct sem_array *sma, int semid, int cmd)
     {
     	return 0;
     }
    
    -static int cap_sem_semop (struct sem_array *sma, int semid, struct sembuf *sops,
    -			  unsigned nsops, int alter)
    +static int cap_sem_semop(struct sem_array *sma, int semid, struct sembuf *sops,
    +			 unsigned nsops, int alter)
     {
     	return 0;
     }
    
    -static int cap_skb_alloc_security (struct sk_buff *skb)
    +static int cap_skb_alloc_security(struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static int cap_skb_clone (struct sk_buff *newskb, const struct sk_buff *oldskb)
    +static int cap_skb_clone(struct sk_buff *newskb, const struct sk_buff *oldskb)
     {
     	return 0;
     }
    
    -static void cap_skb_copy (struct sk_buff *newskb, const struct sk_buff *oldskb)
    +static void cap_skb_copy(struct sk_buff *newskb, const struct sk_buff *oldskb)
     {
     	return;
     }
    
    -static void cap_skb_set_owner_w (struct sk_buff *skb, struct sock *sk)
    +static void cap_skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
     {
     	return;
     }
    
    -static void cap_skb_free_security (struct sk_buff *skb)
    +static void cap_skb_free_security(struct sk_buff *skb)
     {
     	return;
     }
    
    -static int cap_register (const char *name, struct security_operations *ops)
    +static int cap_register(const char *name, struct security_operations *ops)
     {
     	return -EINVAL;
     }
    
    -static int cap_unregister (const char *name, struct security_operations *ops)
    +static int cap_unregister(const char *name, struct security_operations *ops)
     {
     	return -EINVAL;
     }
    @@ -1291,44 +1289,44 @@
     #define MY_NAME THIS_MODULE->name
     #endif
    
    -static int __init capability_plug_init (void)
    +static int __init capability_plug_init(void)
     {
     	/* register ourselves with the security framework */
    -	if (register_security (&capability_ops)) {
    -		printk (KERN_INFO
    -			"Failure registering capabilities with the kernel\n");
    +	if (register_security(&capability_ops)) {
    +		printk(KERN_INFO
    +		       "Failure registering capabilities with the kernel\n");
     		/* try registering with primary module */
    -		if (mod_reg_security (MY_NAME, &capability_ops)) {
    -			printk (KERN_INFO "Failure registering capabilities "
    -				"with primary security module.\n");
    +		if (mod_reg_security(MY_NAME, &capability_ops)) {
    +			printk(KERN_INFO "Failure registering capabilities "
    +			       "with primary security module.\n");
     			return -EINVAL;
     		}
     		secondary = 1;
     	}
    -	printk (KERN_INFO "Capability Plug initialized\n");
    +	printk(KERN_INFO "Capability Plug initialized\n");
     	return 0;
     }
    
    -static void __exit capability_plug_exit (void)
    +static void __exit capability_plug_exit(void)
     {
     	/* remove ourselves from the security framework */
     	if (secondary) {
    -		if (mod_unreg_security (MY_NAME, &capability_ops))
    -			printk (KERN_INFO "Failure unregistering capabilities "
    -				"with primary module.\n");
    +		if (mod_unreg_security(MY_NAME, &capability_ops))
    +			printk(KERN_INFO "Failure unregistering capabilities "
    +			       "with primary module.\n");
     		return;
     	}
    
    -	if (unregister_security (&capability_ops)) {
    -		printk (KERN_INFO
    -			"Failure unregistering capabilities with the kernel\n");
    +	if (unregister_security(&capability_ops)) {
    +		printk(KERN_INFO
    +		       "Failure unregistering capabilities with the kernel\n");
     	}
     }
    
    -module_init (capability_plug_init);
    -module_exit (capability_plug_exit);
    +module_init(capability_plug_init);
    +module_exit(capability_plug_exit);
    
    -EXPORT_SYMBOL (capability_ops);
    +EXPORT_SYMBOL(capability_ops);
    
     MODULE_DESCRIPTION("Standard Linux Capabilities Security Module");
     MODULE_LICENSE("GPL");
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/security/dummy.c lsm-w1/security/dummy.c
    --- lsm/security/dummy.c	Wed Oct 10 23:22:57 2001
    +++ lsm-w1/security/dummy.c	Thu Oct 11 19:30:23 2001
    @@ -19,66 +19,66 @@
     #include <linux/netfilter.h>
     #include <linux/netlink.h>
    
    -static int dummy_sethostname (char *hostname)
    +static int dummy_sethostname(char *hostname)
     {
     	return 0;
     }
    
    -static int dummy_setdomainname (char *domainname)
    +static int dummy_setdomainname(char *domainname)
     {
     	return 0;
     }
    
    -static int dummy_reboot (unsigned int cmd)
    +static int dummy_reboot(unsigned int cmd)
     {
     	return 0;
     }
    
    -static int dummy_ioperm (unsigned long from, unsigned long num, int turn_on)
    +static int dummy_ioperm(unsigned long from, unsigned long num, int turn_on)
     {
     	return 0;
     }
    
    -static int dummy_iopl (unsigned int old, unsigned int level)
    +static int dummy_iopl(unsigned int old, unsigned int level)
     {
     	return 0;
     }
    
    -static int dummy_ptrace (struct task_struct *parent, struct task_struct *child)
    +static int dummy_ptrace(struct task_struct *parent, struct task_struct *child)
     {
     	return 0;
     }
    
    -static int dummy_capget (struct task_struct *target, kernel_cap_t * effective,
    -			 kernel_cap_t * inheritable, kernel_cap_t * permitted)
    +static int dummy_capget(struct task_struct *target, kernel_cap_t * effective,
    +			kernel_cap_t * inheritable, kernel_cap_t * permitted)
     {
     	return 0;
     }
    
    -static int dummy_capset_check (struct task_struct *target,
    -			       kernel_cap_t * effective,
    -			       kernel_cap_t * inheritable,
    -			       kernel_cap_t * permitted)
    +static int dummy_capset_check(struct task_struct *target,
    +			      kernel_cap_t * effective,
    +			      kernel_cap_t * inheritable,
    +			      kernel_cap_t * permitted)
     {
     	return 0;
     }
    
    -static void dummy_capset_set (struct task_struct *target,
    -			      kernel_cap_t * effective,
    -			      kernel_cap_t * inheritable,
    -			      kernel_cap_t * permitted)
    +static void dummy_capset_set(struct task_struct *target,
    +			     kernel_cap_t * effective,
    +			     kernel_cap_t * inheritable,
    +			     kernel_cap_t * permitted)
     {
     	return;
     }
    
    -static int dummy_acct (struct file *file)
    +static int dummy_acct(struct file *file)
     {
     	return 0;
     }
    
    -static int dummy_capable (struct task_struct *tsk, int cap)
    +static int dummy_capable(struct task_struct *tsk, int cap)
     {
    -	if (cap_is_fs_cap (cap) ? tsk->fsuid == 0 : tsk->euid == 0)
    +	if (cap_is_fs_cap(cap) ? tsk->fsuid == 0 : tsk->euid == 0)
     		/* capability granted */
     		return 0;
    
    @@ -86,804 +86,801 @@
     	return -EPERM;
     }
    
    -static int dummy_sysctl (ctl_table * table, int op)
    +static int dummy_sysctl(ctl_table * table, int op)
     {
     	return 0;
     }
    
    -static int dummy_sys_security (unsigned int id, unsigned int call,
    -			       unsigned long *args)
    +static int dummy_sys_security(unsigned int id, unsigned int call,
    +			      unsigned long *args)
     {
     	return -ENOSYS;
     }
    
    -static int dummy_swapon (struct dentry *dentry)
    +static int dummy_swapon(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int dummy_swapoff (struct dentry *dentry)
    +static int dummy_swapoff(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int dummy_nfsservctl (int cmd, struct nfsctl_arg *arg)
    +static int dummy_nfsservctl(int cmd, struct nfsctl_arg *arg)
     {
     	return 0;
     }
    
    -static int dummy_quotactl (int cmds, int type, int id, struct super_block *sb)
    +static int dummy_quotactl(int cmds, int type, int id, struct super_block *sb)
     {
     	return 0;
     }
    
    -static int dummy_quota_on (struct file *f)
    +static int dummy_quota_on(struct file *f)
     {
     	return 0;
     }
    
    -static int dummy_bdflush (int func, long data)
    +static int dummy_bdflush(int func, long data)
     {
     	return 0;
     }
    
    -static int dummy_syslog (int type)
    +static int dummy_syslog(int type)
     {
     	return 0;
     }
    
    -static int dummy_netlink_send (struct sk_buff *skb)
    +static int dummy_netlink_send(struct sk_buff *skb)
     {
     	if (current->euid == 0)
    -		cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN);
    +		cap_raise(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN);
     	else
    -		NETLINK_CB (skb).eff_cap = 0;
    +		NETLINK_CB(skb).eff_cap = 0;
     	return 0;
     }
    
    -static int dummy_netlink_recv (struct sk_buff *skb)
    +static int dummy_netlink_recv(struct sk_buff *skb)
     {
    -	if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN))
    +	if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN))
     		return -EPERM;
     	return 0;
     }
    
    -static int dummy_binprm_alloc_security (struct linux_binprm *bprm)
    +static int dummy_binprm_alloc_security(struct linux_binprm *bprm)
     {
     	return 0;
     }
    
    -static void dummy_binprm_free_security (struct linux_binprm *bprm)
    +static void dummy_binprm_free_security(struct linux_binprm *bprm)
     {
     	return;
     }
    
    -static void dummy_binprm_compute_creds (struct linux_binprm *bprm)
    +static void dummy_binprm_compute_creds(struct linux_binprm *bprm)
     {
     	return;
     }
    
    -static int dummy_binprm_set_security (struct linux_binprm *bprm)
    +static int dummy_binprm_set_security(struct linux_binprm *bprm)
     {
     	return 0;
     }
    
    -static int dummy_sb_alloc_security (struct super_block *sb)
    +static int dummy_sb_alloc_security(struct super_block *sb)
     {
     	return 0;
     }
    
    -static void dummy_sb_free_security (struct super_block *sb)
    +static void dummy_sb_free_security(struct super_block *sb)
     {
     	return;
     }
    
    -static int dummy_sb_statfs (struct super_block *sb)
    +static int dummy_sb_statfs(struct super_block *sb)
     {
     	return 0;
     }
    
    -static int dummy_mount (char *dev_name, struct nameidata *nd, char *type,
    -			unsigned long flags, void *data)
    +static int dummy_mount(char *dev_name, struct nameidata *nd, char *type,
    +		       unsigned long flags, void *data)
     {
     	return 0;
     }
    
    -static int dummy_umount (struct vfsmount *mnt, int flags)
    +static int dummy_umount(struct vfsmount *mnt, int flags)
     {
     	return 0;
     }
    
    -static void dummy_umount_close (struct vfsmount *mnt)
    +static void dummy_umount_close(struct vfsmount *mnt)
     {
     	return;
     }
    
    -static void dummy_umount_busy (struct vfsmount *mnt)
    +static void dummy_umount_busy(struct vfsmount *mnt)
     {
     	return;
     }
    
    -static void dummy_post_remount (struct vfsmount *mnt, unsigned long flags,
    -				void *data)
    +static void dummy_post_remount(struct vfsmount *mnt, unsigned long flags,
    +			       void *data)
     {
     	return;
     }
    
    
    -static void dummy_post_mountroot (struct super_block *sb)
    +static void dummy_post_mountroot(struct super_block *sb)
     {
     	return;
     }
    
    -static void dummy_post_addmount (struct vfsmount *mnt, struct nameidata *nd)
    +static void dummy_post_addmount(struct vfsmount *mnt, struct nameidata *nd)
     {
     	return;
     }
    
    -static int dummy_inode_alloc_security (struct inode *inode)
    +static int dummy_inode_alloc_security(struct inode *inode)
     {
     	return 0;
     }
    
    -static void dummy_inode_free_security (struct inode *inode)
    +static void dummy_inode_free_security(struct inode *inode)
     {
     	return;
     }
    
    -static int dummy_inode_create (struct inode *inode, struct dentry *dentry,
    -			       int mask)
    +static int dummy_inode_create(struct inode *inode, struct dentry *dentry,
    +			      int mask)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_create (struct inode *inode, struct dentry *dentry,
    -				     int mask)
    +static void dummy_inode_post_create(struct inode *inode, struct dentry *dentry,
    +				    int mask)
     {
     	return;
     }
    
    -static int dummy_inode_link (struct dentry *old_dentry, struct inode *inode,
    -			     struct dentry *new_dentry)
    +static int dummy_inode_link(struct dentry *old_dentry, struct inode *inode,
    +			    struct dentry *new_dentry)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_link (struct dentry *old_dentry,
    -				   struct inode *inode,
    -				   struct dentry *new_dentry)
    +static void dummy_inode_post_link(struct dentry *old_dentry,
    +				  struct inode *inode,
    +				  struct dentry *new_dentry)
     {
     	return;
     }
    
    -static int dummy_inode_unlink (struct inode *inode, struct dentry *dentry)
    +static int dummy_inode_unlink(struct inode *inode, struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int dummy_inode_symlink (struct inode *inode, struct dentry *dentry,
    -				const char *name)
    +static int dummy_inode_symlink(struct inode *inode, struct dentry *dentry,
    +			       const char *name)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_symlink (struct inode *inode,
    -				      struct dentry *dentry, const char *name)
    +static void dummy_inode_post_symlink(struct inode *inode,
    +				     struct dentry *dentry, const char *name)
     {
     	return;
     }
    
    -static int dummy_inode_mkdir (struct inode *inode, struct dentry *dentry,
    -			      int mask)
    +static int dummy_inode_mkdir(struct inode *inode, struct dentry *dentry,
    +			     int mask)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_mkdir (struct inode *inode, struct dentry *dentry,
    -				    int mask)
    +static void dummy_inode_post_mkdir(struct inode *inode, struct dentry *dentry,
    +				   int mask)
     {
     	return;
     }
    
    -static int dummy_inode_rmdir (struct inode *inode, struct dentry *dentry)
    +static int dummy_inode_rmdir(struct inode *inode, struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int dummy_inode_mknod (struct inode *inode, struct dentry *dentry,
    -			      int major, dev_t minor)
    +static int dummy_inode_mknod(struct inode *inode, struct dentry *dentry,
    +			     int major, dev_t minor)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_mknod (struct inode *inode, struct dentry *dentry,
    -				    int major, dev_t minor)
    +static void dummy_inode_post_mknod(struct inode *inode, struct dentry *dentry,
    +				   int major, dev_t minor)
     {
     	return;
     }
    
    -static int dummy_inode_rename (struct inode *old_inode,
    -			       struct dentry *old_dentry,
    -			       struct inode *new_inode,
    -			       struct dentry *new_dentry)
    +static int dummy_inode_rename(struct inode *old_inode,
    +			      struct dentry *old_dentry,
    +			      struct inode *new_inode,
    +			      struct dentry *new_dentry)
     {
     	return 0;
     }
    
    -static void dummy_inode_post_rename (struct inode *old_inode,
    -				     struct dentry *old_dentry,
    -				     struct inode *new_inode,
    -				     struct dentry *new_dentry)
    +static void dummy_inode_post_rename(struct inode *old_inode,
    +				    struct dentry *old_dentry,
    +				    struct inode *new_inode,
    +				    struct dentry *new_dentry)
     {
     	return;
     }
    
    -static int dummy_inode_readlink (struct dentry *dentry)
    +static int dummy_inode_readlink(struct dentry *dentry)
     {
     	return 0;
     }
    
    -static int dummy_inode_follow_link (struct dentry *dentry,
    -				    struct nameidata *nameidata)
    +static int dummy_inode_follow_link(struct dentry *dentry,
    +				   struct nameidata *nameidata)
     {
     	return 0;
     }
    
    -static int dummy_inode_permission (struct inode *inode, int mask)
    +static int dummy_inode_permission(struct inode *inode, int mask)
     {
     	return 0;
     }
    
    -static int dummy_inode_revalidate (struct dentry *inode)
    +static int dummy_inode_revalidate(struct dentry *inode)
     {
     	return 0;
     }
    
    -static int dummy_inode_setattr (struct dentry *dentry, struct iattr *iattr)
    +static int dummy_inode_setattr(struct dentry *dentry, struct iattr *iattr)
     {
     	return 0;
     }
    
    -static int dummy_inode_stat (struct inode *inode)
    +static int dummy_inode_stat(struct inode *inode)
     {
     	return 0;
     }
    
    -static void dummy_post_lookup (struct inode *ino, struct dentry *d)
    +static void dummy_post_lookup(struct inode *ino, struct dentry *d)
     {
     	return;
     }
    
    -static void dummy_delete (struct inode *ino)
    +static void dummy_delete(struct inode *ino)
     {
     	return;
     }
    
    -static int dummy_file_permission (struct file *file, int mask)
    +static int dummy_file_permission(struct file *file, int mask)
     {
     	return 0;
     }
    
    -static int dummy_file_alloc_security (struct file *file)
    +static int dummy_file_alloc_security(struct file *file)
     {
     	return 0;
     }
    
    -static void dummy_file_free_security (struct file *file)
    +static void dummy_file_free_security(struct file *file)
     {
     	return;
     }
    
    -static int dummy_file_llseek (struct file *file)
    +static int dummy_file_llseek(struct file *file)
     {
     	return 0;
     }
    
    -static int dummy_file_ioctl (struct file *file, unsigned int command,
    -			     unsigned long arg)
    +static int dummy_file_ioctl(struct file *file, unsigned int command,
    +			    unsigned long arg)
     {
     	return 0;
     }
    
    -static int dummy_file_mmap (struct file *file, unsigned long prot,
    -			    unsigned long flags)
    +static int dummy_file_mmap(struct file *file, unsigned long prot,
    +			   unsigned long flags)
     {
     	return 0;
     }
    
    -static int dummy_file_mprotect (struct vm_area_struct *vma, unsigned long prot)
    +static int dummy_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
     {
     	return 0;
     }
    
    -static int dummy_file_lock (struct file *file, unsigned int cmd)
    +static int dummy_file_lock(struct file *file, unsigned int cmd)
     {
     	return 0;
     }
    
    -static int dummy_file_fcntl (struct file *file, unsigned int cmd,
    -			     unsigned long arg)
    +static int dummy_file_fcntl(struct file *file, unsigned int cmd,
    +			    unsigned long arg)
     {
     	return 0;
     }
    
    -static int dummy_file_set_fowner (struct file *file)
    +static int dummy_file_set_fowner(struct file *file)
     {
     	return 0;
     }
    
    -static int dummy_file_send_sigiotask (struct task_struct *tsk,
    -				      struct fown_struct *fown, int fd,
    -				      int reason)
    +static int dummy_file_send_sigiotask(struct task_struct *tsk,
    +				     struct fown_struct *fown, int fd,
    +				     int reason)
     {
     	return 0;
     }
    
    -static int dummy_file_receive (struct file *file)
    +static int dummy_file_receive(struct file *file)
     {
     	return 0;
     }
    
    -static int dummy_task_create (unsigned long clone_flags)
    +static int dummy_task_create(unsigned long clone_flags)
     {
     	return 0;
     }
    
    -static int dummy_task_alloc_security (struct task_struct *p)
    +static int dummy_task_alloc_security(struct task_struct *p)
     {
     	return 0;
     }
    
    -static void dummy_task_free_security (struct task_struct *p)
    +static void dummy_task_free_security(struct task_struct *p)
     {
     	return;
     }
    
    -static int dummy_task_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
    +static int dummy_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags)
     {
     	return 0;
     }
    
    -static int dummy_task_post_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
    +static int dummy_task_post_setuid(uid_t id0, uid_t id1, uid_t id2, int flags)
     {
     	return 0;
     }
    
    -static int dummy_task_setgid (gid_t id0, gid_t id1, gid_t id2, int flags)
    +static int dummy_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags)
     {
     	return 0;
     }
    
    -static int dummy_task_setpgid (struct task_struct *p, pid_t pgid)
    +static int dummy_task_setpgid(struct task_struct *p, pid_t pgid)
     {
     	return 0;
     }
    
    -static int dummy_task_getpgid (struct task_struct *p)
    +static int dummy_task_getpgid(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int dummy_task_getsid (struct task_struct *p)
    +static int dummy_task_getsid(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int dummy_task_setgroups (int gidsetsize, gid_t * grouplist)
    +static int dummy_task_setgroups(int gidsetsize, gid_t * grouplist)
     {
     	return 0;
     }
    
    -static int dummy_task_setnice (struct task_struct *p, int nice)
    +static int dummy_task_setnice(struct task_struct *p, int nice)
     {
     	return 0;
     }
    
    -static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
    +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,
    -				    struct sched_param *lp)
    +static int dummy_task_setscheduler(struct task_struct *p, int policy,
    +				   struct sched_param *lp)
     {
     	return 0;
     }
    
    -static int dummy_task_getscheduler (struct task_struct *p)
    +static int dummy_task_getscheduler(struct task_struct *p)
     {
     	return 0;
     }
    
    -static int dummy_task_wait (struct task_struct *p)
    +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)
    +static int dummy_task_kill(struct task_struct *p, struct siginfo *info, int sig)
     {
     	return 0;
     }
    
    -static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3,
    -			     unsigned long arg4, unsigned long arg5)
    +static int dummy_task_prctl(int option, unsigned long arg2, unsigned long arg3,
    +			    unsigned long arg4, unsigned long arg5)
     {
     	return 0;
     }
    
    -static void dummy_task_kmod_set_label (void)
    +static void dummy_task_kmod_set_label(void)
     {
     	return;
     }
    
    -static unsigned int dummy_ip_preroute_first (unsigned int hooknum,
    -					     struct sk_buff **pskb,
    -					     const struct net_device *in,
    -					     const struct net_device *out,
    -					     int (*okfn) (struct sk_buff *))
    -{
    -	return NF_ACCEPT;
    -}
    -
    -static unsigned int dummy_ip_preroute_last (unsigned int hooknum,
    +static unsigned int dummy_ip_preroute_first(unsigned int hooknum,
     					    struct sk_buff **pskb,
     					    const struct net_device *in,
     					    const struct net_device *out,
    -					    int (*okfn) (struct sk_buff *))
    +					    int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_input_first (unsigned int hooknum,
    -					  struct sk_buff **pskb,
    -					  const struct net_device *in,
    -					  const struct net_device *out,
    -					  int (*okfn) (struct sk_buff *))
    +static unsigned int dummy_ip_preroute_last(unsigned int hooknum,
    +					   struct sk_buff **pskb,
    +					   const struct net_device *in,
    +					   const struct net_device *out,
    +					   int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_input_last (unsigned int hooknum,
    +static unsigned int dummy_ip_input_first(unsigned int hooknum,
     					 struct sk_buff **pskb,
     					 const struct net_device *in,
     					 const struct net_device *out,
    -					 int (*okfn) (struct sk_buff *))
    +					 int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_forward_first (unsigned int hooknum,
    -					    struct sk_buff **pskb,
    -					    const struct net_device *in,
    -					    const struct net_device *out,
    -					    int (*okfn) (struct sk_buff *))
    +static unsigned int dummy_ip_input_last(unsigned int hooknum,
    +					struct sk_buff **pskb,
    +					const struct net_device *in,
    +					const struct net_device *out,
    +					int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_forward_last (unsigned int hooknum,
    +static unsigned int dummy_ip_forward_first(unsigned int hooknum,
     					   struct sk_buff **pskb,
     					   const struct net_device *in,
     					   const struct net_device *out,
    -					   int (*okfn) (struct sk_buff *))
    +					   int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_output_first (unsigned int hooknum,
    -					   struct sk_buff **pskb,
    -					   const struct net_device *in,
    -					   const struct net_device *out,
    -					   int (*okfn) (struct sk_buff *))
    +static unsigned int dummy_ip_forward_last(unsigned int hooknum,
    +					  struct sk_buff **pskb,
    +					  const struct net_device *in,
    +					  const struct net_device *out,
    +					  int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_output_last (unsigned int hooknum,
    +static unsigned int dummy_ip_output_first(unsigned int hooknum,
     					  struct sk_buff **pskb,
     					  const struct net_device *in,
     					  const struct net_device *out,
    -					  int (*okfn) (struct sk_buff *))
    +					  int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_postroute_first (unsigned int hooknum,
    -					      struct sk_buff **pskb,
    -					      const struct net_device *in,
    -					      const struct net_device *out,
    -					      int (*okfn) (struct sk_buff *))
    +static unsigned int dummy_ip_output_last(unsigned int hooknum,
    +					 struct sk_buff **pskb,
    +					 const struct net_device *in,
    +					 const struct net_device *out,
    +					 int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static unsigned int dummy_ip_postroute_last (unsigned int hooknum,
    +static unsigned int dummy_ip_postroute_first(unsigned int hooknum,
     					     struct sk_buff **pskb,
     					     const struct net_device *in,
     					     const struct net_device *out,
    -					     int (*okfn) (struct sk_buff *))
    +					     int (*okfn)(struct sk_buff *))
    +{
    +	return NF_ACCEPT;
    +}
    +
    +static unsigned int dummy_ip_postroute_last(unsigned int hooknum,
    +					    struct sk_buff **pskb,
    +					    const struct net_device *in,
    +					    const struct net_device *out,
    +					    int (*okfn)(struct sk_buff *))
     {
     	return NF_ACCEPT;
     }
    
    -static void dummy_ip_fragment (struct sk_buff *newskb,
    -			       const struct sk_buff *oldskb)
    +static void dummy_ip_fragment(struct sk_buff *newskb,
    +			      const struct sk_buff *oldskb)
     {
     	return;
     }
    
    -static int dummy_ip_defragment (struct sk_buff *skb)
    +static int dummy_ip_defragment(struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static void dummy_ip_decapsulate (struct sk_buff *skb)
    +static void dummy_ip_decapsulate(struct sk_buff *skb)
     {
     	return;
     }
    
    -static void dummy_ip_encapsulate (struct sk_buff *skb)
    +static void dummy_ip_encapsulate(struct sk_buff *skb)
     {
     	return;
     }
    
    -static int dummy_ip_decode_options (struct sk_buff *skb, const char *optptr,
    -				    unsigned char **pp_ptr)
    +static int dummy_ip_decode_options(struct sk_buff *skb, const char *optptr,
    +				   unsigned char **pp_ptr)
     {
    -	if (!skb && !capable (CAP_NET_RAW)) {
    +	if (!skb && !capable(CAP_NET_RAW)) {
     		(const unsigned char *) *pp_ptr = optptr;
     		return -EPERM;
     	}
     	return 0;
     }
    
    -static void dummy_netdev_unregister (struct net_device *dev)
    +static void dummy_netdev_unregister(struct net_device *dev)
     {
     	return;
     }
    
    -static int dummy_socket_create (int family, int type, int protocol)
    +static int dummy_socket_create(int family, int type, int protocol)
     {
     	return 0;
     }
    
    -static void dummy_socket_post_create (struct socket *sock, int family, int type,
    -				      int protocol)
    +static void dummy_socket_post_create(struct socket *sock, int family, int type,
    +				     int protocol)
     {
     	return;
     }
    
    -static int dummy_socket_bind (struct socket *sock, struct sockaddr *address,
    -			      int addrlen)
    +static int dummy_socket_bind(struct socket *sock, struct sockaddr *address,
    +			     int addrlen)
     {
     	return 0;
     }
    
    -static int dummy_socket_connect (struct socket *sock, struct sockaddr *address,
    -				 int addrlen)
    +static int dummy_socket_connect(struct socket *sock, struct sockaddr *address,
    +				int addrlen)
     {
     	return 0;
     }
    
    -static int dummy_socket_listen (struct socket *sock, int backlog)
    +static int dummy_socket_listen(struct socket *sock, int backlog)
     {
     	return 0;
     }
    
    -static int dummy_socket_accept (struct socket *sock, struct socket *newsock)
    +static int dummy_socket_accept(struct socket *sock, struct socket *newsock)
     {
     	return 0;
     }
    
    -static int dummy_socket_sendmsg (struct socket *sock, struct msghdr *msg,
    -				 int size)
    +static int dummy_socket_sendmsg(struct socket *sock, struct msghdr *msg,
    +				int size)
     {
     	return 0;
     }
    
    -static int dummy_socket_recvmsg (struct socket *sock, struct msghdr *msg,
    -				 int size, int flags)
    +static int dummy_socket_recvmsg(struct socket *sock, struct msghdr *msg,
    +				int size, int flags)
     {
     	return 0;
     }
    
    -static int dummy_socket_getsockname (struct socket *sock)
    +static int dummy_socket_getsockname(struct socket *sock)
     {
     	return 0;
     }
    
    -static int dummy_socket_getpeername (struct socket *sock)
    +static int dummy_socket_getpeername(struct socket *sock)
     {
     	return 0;
     }
    
    -static int dummy_socket_setsockopt (struct socket *sock, int level, int optname)
    +static int dummy_socket_setsockopt(struct socket *sock, int level, int optname)
     {
     	return 0;
     }
    
    -static int dummy_socket_getsockopt (struct socket *sock, int level, int optname)
    +static int dummy_socket_getsockopt(struct socket *sock, int level, int optname)
     {
     	return 0;
     }
    
    -static int dummy_socket_shutdown (struct socket *sock, int how)
    +static int dummy_socket_shutdown(struct socket *sock, int how)
     {
     	return 0;
     }
    
    -static int dummy_sock_rcv_skb (struct sock *sk, struct sk_buff *skb)
    +static int dummy_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static int dummy_socket_unix_stream_connect (struct socket *sock,
    -					     struct socket *other)
    +static int dummy_socket_unix_stream_connect(struct socket *sock,
    +					    struct socket *other)
     {
     	return 0;
     }
    
    -static int dummy_socket_unix_may_send (struct socket *sock,
    -				       struct socket *other)
    +static int dummy_socket_unix_may_send(struct socket *sock,
    +				      struct socket *other)
     {
     	return 0;
     }
    
    -static int dummy_module_create_module (const char *name_user, size_t size)
    +static int dummy_module_create_module(const char *name_user, size_t size)
     {
     	return 0;
     }
    
    -static int dummy_module_init_module (struct module *mod_user)
    +static int dummy_module_init_module(struct module *mod_user)
     {
     	return 0;
     }
    
    -static int dummy_module_delete_module (const struct module *mod)
    +static int dummy_module_delete_module(const struct module *mod)
     {
     	return 0;
     }
    
    -static int dummy_ipc_permission (struct kern_ipc_perm *ipcp, short flag)
    +static int dummy_ipc_permission(struct kern_ipc_perm *ipcp, short flag)
     {
     	return 0;
     }
    
    -static int dummy_ipc_getinfo (int id, int cmd)
    +static int dummy_ipc_getinfo(int id, int cmd)
     {
     	return 0;
     }
    
    -static int dummy_msg_msg_alloc_security (struct msg_msg *msg)
    +static int dummy_msg_msg_alloc_security(struct msg_msg *msg)
     {
     	return 0;
     }
    
    -static void dummy_msg_msg_free_security (struct msg_msg *msg)
    +static void dummy_msg_msg_free_security(struct msg_msg *msg)
     {
     	return;
     }
    
    -static int dummy_msg_queue_alloc_security (struct msg_queue *msq)
    +static int dummy_msg_queue_alloc_security(struct msg_queue *msq)
     {
     	return 0;
     }
    
    -static void dummy_msg_queue_free_security (struct msg_queue *msq)
    +static void dummy_msg_queue_free_security(struct msg_queue *msq)
     {
     	return;
     }
    
    -static int dummy_msg_queue_associate (struct msg_queue *msq, int msqid,
    -				      int msqflg)
    +static int dummy_msg_queue_associate(struct msg_queue *msq, int msqid,
    +				     int msqflg)
     {
     	return 0;
     }
    
    -static int dummy_msg_queue_msgctl (struct msg_queue *msq, int msqid, int cmd)
    +static int dummy_msg_queue_msgctl(struct msg_queue *msq, int msqid, int cmd)
     {
     	return 0;
     }
    
    -static int dummy_msg_queue_msgsnd (struct msg_queue *msq, struct msg_msg *msg,
    -				   int msqid, int msgflg)
    +static int dummy_msg_queue_msgsnd(struct msg_queue *msq, struct msg_msg *msg,
    +				  int msqid, int msgflg)
     {
     	return 0;
     }
    
    -static int dummy_msg_queue_msgrcv (struct msg_queue *msq, struct msg_msg *msg,
    -				   struct task_struct *target, long type,
    -				   int mode)
    +static int dummy_msg_queue_msgrcv(struct msg_queue *msq, struct msg_msg *msg,
    +				  struct task_struct *target, long type,
    +				  int mode)
     {
     	return 0;
     }
    
    -static int dummy_shm_alloc_security (struct shmid_kernel *shp)
    +static int dummy_shm_alloc_security(struct shmid_kernel *shp)
     {
     	return 0;
     }
    
    -static void dummy_shm_free_security (struct shmid_kernel *shp)
    +static void dummy_shm_free_security(struct shmid_kernel *shp)
     {
     	return;
     }
    
    -static int dummy_shm_associate (struct shmid_kernel *shp, int shmid, int shmflg)
    +static int dummy_shm_associate(struct shmid_kernel *shp, int shmid, int shmflg)
     {
     	return 0;
     }
    
    -static int dummy_shm_shmctl (struct shmid_kernel *shp, int shmid, int cmd)
    +static int dummy_shm_shmctl(struct shmid_kernel *shp, int shmid, int cmd)
     {
     	return 0;
     }
    
    -static int dummy_shm_shmat (struct shmid_kernel *shp, int shmid, char *shmaddr,
    -			    int shmflg)
    +static int dummy_shm_shmat(struct shmid_kernel *shp, int shmid, char *shmaddr,
    +			   int shmflg)
     {
     	return 0;
     }
    
    -static int dummy_sem_alloc_security (struct sem_array *sma)
    +static int dummy_sem_alloc_security(struct sem_array *sma)
     {
     	return 0;
     }
    
    -static void dummy_sem_free_security (struct sem_array *sma)
    +static void dummy_sem_free_security(struct sem_array *sma)
     {
     	return;
     }
    
    -static int dummy_sem_associate (struct sem_array *sma, int semid, int semflg)
    +static int dummy_sem_associate(struct sem_array *sma, int semid, int semflg)
     {
     	return 0;
     }
    
    -static int dummy_sem_semctl (struct sem_array *sma, int semid, int cmd)
    +static int dummy_sem_semctl(struct sem_array *sma, int semid, int cmd)
     {
     	return 0;
     }
    
    -static int dummy_sem_semop (struct sem_array *sma, int semid,
    -			    struct sembuf *sops, unsigned nsops, int alter)
    +static int dummy_sem_semop(struct sem_array *sma, int semid,
    +			   struct sembuf *sops, unsigned nsops, int alter)
     {
     	return 0;
     }
    
    -static int dummy_skb_alloc_security (struct sk_buff *skb)
    +static int dummy_skb_alloc_security(struct sk_buff *skb)
     {
     	return 0;
     }
    
    -static int dummy_skb_clone (struct sk_buff *newskb,
    -			     const struct sk_buff *oldskb)
    +static int dummy_skb_clone(struct sk_buff *newskb, const struct sk_buff *oldskb)
     {
     	return 0;
     }
    
    -static void dummy_skb_copy (struct sk_buff *newskb,
    -			    const struct sk_buff *oldskb)
    +static void dummy_skb_copy(struct sk_buff *newskb, const struct sk_buff *oldskb)
     {
     	return;
     }
    
    -static void dummy_skb_set_owner_w (struct sk_buff *skb, struct sock *sk)
    +static void dummy_skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
     {
     	return;
     }
    
    -static void dummy_skb_free_security (struct sk_buff *skb)
    +static void dummy_skb_free_security(struct sk_buff *skb)
     {
     	return;
     }
    
    -static int dummy_register (const char *name, struct security_operations *ops)
    +static int dummy_register(const char *name, struct security_operations *ops)
     {
     	return -EINVAL;
     }
    
    -static int dummy_unregister (const char *name, struct security_operations *ops)
    +static int dummy_unregister(const char *name, struct security_operations *ops)
     {
     	return -EINVAL;
     }
    diff -urN --exclude SCCS --exclude BitKeeper --exclude ChangeSet lsm/security/security.c lsm-w1/security/security.c
    --- lsm/security/security.c	Wed Sep 12 14:40:10 2001
    +++ lsm-w1/security/security.c	Thu Oct 11 19:30:23 2001
    @@ -22,19 +22,19 @@
    
     struct security_operations *security_ops;	/* Initialized to NULL */
    
    -static int inline verify (struct security_operations *ops)
    +static int inline verify(struct security_operations *ops)
     {
     	/* verify the security_operations structure exists */
     	if (!ops) {
    -		printk (KERN_INFO "Passed a NULL security_operations "
    -			"pointer, " __FUNCTION__ " failed.\n");
    +		printk(KERN_INFO "Passed a NULL security_operations "
    +		       "pointer, " __FUNCTION__ " failed.\n");
     		return -EINVAL;
     	}
    
     	/* verify the version of the structure */
     	if (ops->version != SECURITY_INTERFACE_VERSION) {
    -		printk (KERN_INFO "Mismatched version of security_operation "
    -			"structure used, " __FUNCTION__ " failed.\n");
    +		printk(KERN_INFO "Mismatched version of security_operation "
    +		       "structure used, " __FUNCTION__ " failed.\n");
     		return -EINVAL;
     	}
    
    @@ -78,9 +78,9 @@
     	    !ops->sem_ops ||
     	    !ops->register_security ||
     	    !ops->unregister_security) {
    -		printk (KERN_INFO "Not enough functions specified in the "
    -			"security_operation structure, " __FUNCTION__
    -			" failed.\n");
    +		printk(KERN_INFO "Not enough functions specified in the "
    +		       "security_operation structure, " __FUNCTION__
    +		       " failed.\n");
     		return -EINVAL;
     	}
     	return 0;
    @@ -91,10 +91,10 @@
      *
      * This should be called early in the kernel initialization sequence.
      */
    -int security_scaffolding_startup (void)
    +int security_scaffolding_startup(void)
     {
    -	printk (KERN_INFO "Security Scaffold v" SECURITY_SCAFFOLD_VERSION
    -		" initialized\n");
    +	printk(KERN_INFO "Security Scaffold v" SECURITY_SCAFFOLD_VERSION
    +	       " initialized\n");
    
     	security_ops = &dummy_security_ops;
    
    @@ -115,17 +115,17 @@
      * with the kernel, an error will be returned.  Otherwise 0 is returned on
      * success.
      */
    -int register_security (struct security_operations *ops)
    +int register_security(struct security_operations *ops)
     {
    
    -	if (verify (ops)) {
    -		printk (KERN_INFO __FUNCTION__ " could not verify "
    -			"security_operations structure.\n");
    +	if (verify(ops)) {
    +		printk(KERN_INFO __FUNCTION__ " could not verify "
    +		       "security_operations structure.\n");
     		return -EINVAL;
     	}
     	if (security_ops != &dummy_security_ops) {
    -		printk (KERN_INFO "There is already a security "
    -			"framework initialized, " __FUNCTION__ " failed.\n");
    +		printk(KERN_INFO "There is already a security "
    +		       "framework initialized, " __FUNCTION__ " failed.\n");
     		return -EINVAL;
     	}
    
    @@ -145,12 +145,12 @@
      * an error is returned.  Otherwise the default security options is set to the
      * the dummy_security_ops structure, and 0 is returned.
      */
    -int unregister_security (struct security_operations *ops)
    +int unregister_security(struct security_operations *ops)
     {
     	if (ops != security_ops) {
    -		printk (KERN_INFO __FUNCTION__ ": trying to unregister "
    -			"a security_opts structure that is not "
    -			"registered, failing.\n");
    +		printk(KERN_INFO __FUNCTION__ ": trying to unregister "
    +		       "a security_opts structure that is not "
    +		       "registered, failing.\n");
     		return -EINVAL;
     	}
    
    @@ -171,21 +171,21 @@
      * The return value depends on the currently loaded security module, with 0 as
      * success.
      */
    -int mod_reg_security (const char *name, struct security_operations *ops)
    +int mod_reg_security(const char *name, struct security_operations *ops)
     {
    -	if (verify (ops)) {
    -		printk (KERN_INFO __FUNCTION__ " could not verify "
    -			"security operations.\n");
    +	if (verify(ops)) {
    +		printk(KERN_INFO __FUNCTION__ " could not verify "
    +		       "security operations.\n");
     		return -EINVAL;
     	}
    
     	if (ops == security_ops) {
    -		printk (KERN_INFO __FUNCTION__ " security operations "
    -			"already registered.\n");
    +		printk(KERN_INFO __FUNCTION__ " security operations "
    +		       "already registered.\n");
     		return -EINVAL;
     	}
    
    -	return security_ops->register_security (name, ops);
    +	return security_ops->register_security(name, ops);
     }
    
     /**
    @@ -201,15 +201,15 @@
      * The return value depends on the currently loaded security module, with 0 as
      * success.
      */
    -int mod_unreg_security (const char *name, struct security_operations *ops)
    +int mod_unreg_security(const char *name, struct security_operations *ops)
     {
     	if (ops == security_ops) {
    -		printk (KERN_INFO __FUNCTION__ " invalid attempt to unregister "
    -			" primary security ops.\n");
    +		printk(KERN_INFO __FUNCTION__ " invalid attempt to unregister "
    +		       " primary security ops.\n");
     		return -EINVAL;
     	}
    
    -	return security_ops->unregister_security (name, ops);
    +	return security_ops->unregister_security(name, ops);
     }
    
     /**
    @@ -222,9 +222,9 @@
      * This allows the security module to implement the capable function call
      * however it chooses to.
      */
    -int capable (int cap)
    +int capable(int cap)
     {
    -	if (security_ops->capable (current, cap)) {
    +	if (security_ops->capable(current, cap)) {
     		/* capability denied */
     		return 0;
     	}
    @@ -244,15 +244,15 @@
      * app is talking to.
      *
      */
    -asmlinkage long sys_security (unsigned int id, unsigned int call,
    +asmlinkage long sys_security(unsigned int id, unsigned int call,
     			      unsigned long *args)
     {
    -	return security_ops->sys_security (id, call, args);
    +	return security_ops->sys_security(id, call, args);
     }
    
    -EXPORT_SYMBOL (register_security);
    -EXPORT_SYMBOL (unregister_security);
    -EXPORT_SYMBOL (mod_reg_security);
    -EXPORT_SYMBOL (mod_unreg_security);
    -EXPORT_SYMBOL (capable);
    -EXPORT_SYMBOL (security_ops);
    +EXPORT_SYMBOL(register_security);
    +EXPORT_SYMBOL(unregister_security);
    +EXPORT_SYMBOL(mod_reg_security);
    +EXPORT_SYMBOL(mod_unreg_security);
    +EXPORT_SYMBOL(capable);
    +EXPORT_SYMBOL(security_ops);
    
    
    _______________________________________________
    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 : Thu Oct 11 2001 - 03:07:06 PDT