Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 2019 18:35:26 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r352765 - releng/12.1/sbin/ping6
Message-ID:  <201909261835.x8QIZQGB065762@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Sep 26 18:35:26 2019
New Revision: 352765
URL: https://svnweb.freebsd.org/changeset/base/352765

Log:
  MFS r352750:
  ping6: Use caph_rights_limit(3) for STDIN_FILENO
  
  Approved by:	re (gjb)

Modified:
  releng/12.1/sbin/ping6/ping6.c
Directory Properties:
  releng/12.1/   (props changed)

Modified: releng/12.1/sbin/ping6/ping6.c
==============================================================================
--- releng/12.1/sbin/ping6/ping6.c	Thu Sep 26 18:25:54 2019	(r352764)
+++ releng/12.1/sbin/ping6/ping6.c	Thu Sep 26 18:35:26 2019	(r352765)
@@ -1028,8 +1028,8 @@ main(int argc, char *argv[])
 		err(1, "caph_enter_casper");
 
 	cap_rights_init(&rights_stdin);
-	if (cap_rights_limit(STDIN_FILENO, &rights_stdin) < 0)
-		err(1, "cap_rights_limit stdin");
+	if (caph_rights_limit(STDIN_FILENO, &rights_stdin) < 0)
+		err(1, "caph_rights_limit stdin");
 	if (caph_limit_stdout() < 0)
 		err(1, "caph_limit_stdout");
 	if (caph_limit_stderr() < 0)
@@ -1037,10 +1037,10 @@ main(int argc, char *argv[])
 
 	cap_rights_init(&rights_srecv, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT);
 	if (caph_rights_limit(srecv, &rights_srecv) < 0)
-		err(1, "cap_rights_limit srecv");
+		err(1, "caph_rights_limit srecv");
 	cap_rights_init(&rights_ssend, CAP_SEND, CAP_SETSOCKOPT);
 	if (caph_rights_limit(ssend, &rights_ssend) < 0)
-		err(1, "cap_rights_limit ssend");
+		err(1, "caph_rights_limit ssend");
 
 #if defined(SO_SNDBUF) && defined(SO_RCVBUF)
 	if (sockbufsize) {
@@ -1092,10 +1092,10 @@ main(int argc, char *argv[])
 
 	cap_rights_clear(&rights_srecv, CAP_SETSOCKOPT);
 	if (caph_rights_limit(srecv, &rights_srecv) < 0)
-		err(1, "cap_rights_limit srecv setsockopt");
+		err(1, "caph_rights_limit srecv setsockopt");
 	cap_rights_clear(&rights_ssend, CAP_SETSOCKOPT);
 	if (caph_rights_limit(ssend, &rights_ssend) < 0)
-		err(1, "cap_rights_limit ssend setsockopt");
+		err(1, "caph_rights_limit ssend setsockopt");
 
 	printf("PING6(%lu=40+8+%lu bytes) ", (unsigned long)(40 + pingerlen()),
 	    (unsigned long)(pingerlen() - 8));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909261835.x8QIZQGB065762>