mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	ethtool: Make more commands available to unprivileged processes
'Get' commands should generally not require CAP_NET_ADMIN, with the exception of those that expose internal state. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									95603e2293
								
							
						
					
					
						commit
						2da45db2bd
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -1443,6 +1443,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | ||||||
| 	case ETHTOOL_GSET: | 	case ETHTOOL_GSET: | ||||||
| 	case ETHTOOL_GDRVINFO: | 	case ETHTOOL_GDRVINFO: | ||||||
| 	case ETHTOOL_GMSGLVL: | 	case ETHTOOL_GMSGLVL: | ||||||
|  | 	case ETHTOOL_GLINK: | ||||||
| 	case ETHTOOL_GCOALESCE: | 	case ETHTOOL_GCOALESCE: | ||||||
| 	case ETHTOOL_GRINGPARAM: | 	case ETHTOOL_GRINGPARAM: | ||||||
| 	case ETHTOOL_GPAUSEPARAM: | 	case ETHTOOL_GPAUSEPARAM: | ||||||
|  | @ -1451,6 +1452,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | ||||||
| 	case ETHTOOL_GSG: | 	case ETHTOOL_GSG: | ||||||
| 	case ETHTOOL_GSSET_INFO: | 	case ETHTOOL_GSSET_INFO: | ||||||
| 	case ETHTOOL_GSTRINGS: | 	case ETHTOOL_GSTRINGS: | ||||||
|  | 	case ETHTOOL_GSTATS: | ||||||
| 	case ETHTOOL_GTSO: | 	case ETHTOOL_GTSO: | ||||||
| 	case ETHTOOL_GPERMADDR: | 	case ETHTOOL_GPERMADDR: | ||||||
| 	case ETHTOOL_GUFO: | 	case ETHTOOL_GUFO: | ||||||
|  | @ -1463,8 +1465,11 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | ||||||
| 	case ETHTOOL_GRXCLSRLCNT: | 	case ETHTOOL_GRXCLSRLCNT: | ||||||
| 	case ETHTOOL_GRXCLSRULE: | 	case ETHTOOL_GRXCLSRULE: | ||||||
| 	case ETHTOOL_GRXCLSRLALL: | 	case ETHTOOL_GRXCLSRLALL: | ||||||
|  | 	case ETHTOOL_GRXFHINDIR: | ||||||
| 	case ETHTOOL_GFEATURES: | 	case ETHTOOL_GFEATURES: | ||||||
|  | 	case ETHTOOL_GCHANNELS: | ||||||
| 	case ETHTOOL_GET_TS_INFO: | 	case ETHTOOL_GET_TS_INFO: | ||||||
|  | 	case ETHTOOL_GEEE: | ||||||
| 		break; | 		break; | ||||||
| 	default: | 	default: | ||||||
| 		if (!capable(CAP_NET_ADMIN)) | 		if (!capable(CAP_NET_ADMIN)) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ben Hutchings
						Ben Hutchings