PERFORCE change 79599 for review

Robert Watson rwatson at FreeBSD.org
Tue Jul 5 11:57:05 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=79599

Change 79599 by rwatson at rwatson_paprika on 2005/07/05 11:56:57

	Use CAP_NET_ADMIN to authorize renaming interfaces (new feature)
	instead of suser().

Affected files ...

.. //depot/projects/trustedbsd/sebsd/sys/net/if.c#13 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/sys/net/if.c#13 (text+ko) ====

@@ -1256,7 +1256,7 @@
 #endif
 
 	case SIOCSIFNAME:
-		error = suser(td);
+		error = cap_check(td, CAP_NET_ADMIN);
 		if (error != 0)
 			return (error);
 		error = copyinstr(ifr->ifr_data, new_name, IFNAMSIZ, NULL);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list