[PATCH] remove ioctl call from netdev_ops

From: James Morris (jmorrisat_private)
Date: Sat Aug 11 2001 - 02:15:58 PDT

  • Next message: David Wagner: "Re: Possible system call interface for LSM"

    As discussed, this patch removes the ioctl() call from netdev_ops.
    
    - James
    -- 
    James Morris
    <jmorrisat_private>
    
    diff -urN lsm-w1.orig/include/linux/security.h lsm-w1/include/linux/security.h
    --- lsm-w1.orig/include/linux/security.h	Sat Aug 11 02:15:14 2001
    +++ lsm-w1/include/linux/security.h	Sat Aug 11 19:00:00 2001
    @@ -179,7 +179,6 @@
     };
    
     struct netdev_security_ops {
    -	int (*ioctl)			(struct net_device *dev, int cmd, void *arg);
     	void (*unregister)		(struct net_device *dev);
     };
    
    diff -urN lsm-w1.orig/net/ipv4/devinet.c lsm-w1/net/ipv4/devinet.c
    --- lsm-w1.orig/net/ipv4/devinet.c	Thu Jul 26 15:48:14 2001
    +++ lsm-w1/net/ipv4/devinet.c	Sat Aug 11 19:03:23 2001
    @@ -526,10 +526,6 @@
     		goto done;
     	}
    
    -	ret = security_ops->netdev_ops->ioctl(dev, cmd, &ifr);
    -	if (ret)
    -		goto done;
    -
     	if (colon)
     		*colon = ':';
    
    diff -urN lsm-w1.orig/security/capability_plug.c lsm-w1/security/capability_plug.c
    --- lsm-w1.orig/security/capability_plug.c	Sat Aug 11 18:32:34 2001
    +++ lsm-w1/security/capability_plug.c	Sat Aug 11 19:01:14 2001
    @@ -341,7 +341,6 @@
     	return 0;
     }
    
    -static int cap_netdev_ioctl		(struct net_device *dev, int cmd, void *arg) {return 0;}
     static void cap_netdev_unregister	(struct net_device *dev) {return;}
    
     static int cap_socket_create	(int family, int type, int protocol) {return 0;}
    @@ -513,7 +512,6 @@
     };
    
     static struct netdev_security_ops cap_netdev_ops = {
    -	ioctl:		cap_netdev_ioctl,
     	unregister:	cap_netdev_unregister,
     };
    
    diff -urN lsm-w1.orig/security/security.c lsm-w1/security/security.c
    --- lsm-w1.orig/security/security.c	Sat Aug 11 18:32:34 2001
    +++ lsm-w1/security/security.c	Sat Aug 11 19:00:47 2001
    @@ -177,7 +177,6 @@
     	return 0;
     }
    
    -static int dummy_netdev_ioctl		(struct net_device *dev, int cmd, void *arg) {return 0;}
     static void dummy_netdev_unregister	(struct net_device *dev) {return;}
    
     static int dummy_socket_create		(int family, int type, int protocol) {return 0;}
    @@ -347,7 +346,6 @@
     };
    
     static struct netdev_security_ops dummy_netdev_ops = {
    -	ioctl:		dummy_netdev_ioctl,
     	unregister:	dummy_netdev_unregister,
     };
    
    
    
    _______________________________________________
    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 : Sat Aug 11 2001 - 02:17:39 PDT