Minor update: capabilities patch

This commit is contained in:
Jan Synacek 2012-07-23 09:49:54 +02:00
parent 9b084be66d
commit 99b543e3ac
2 changed files with 6 additions and 3 deletions

View File

@ -89,12 +89,12 @@
- perror("ping: cap_set_proc"); - perror("ping: cap_set_proc");
+ /* check for cap_net_admin because it may be needed to set packet marks */ + /* check for cap_net_admin because it may be needed to set packet marks */
+ if ((cap = cap_get_proc()) == NULL) { + if ((cap = cap_get_proc()) == NULL) {
+ perror("ping: cap_get_proc"); + perror("ping6: cap_get_proc");
exit(-1); exit(-1);
} }
- cap_free(caps); - cap_free(caps);
+ if (cap_get_flag(cap, CAP_NET_ADMIN, CAP_EFFECTIVE, &net_admin_set) != 0) { + if (cap_get_flag(cap, CAP_NET_ADMIN, CAP_EFFECTIVE, &net_admin_set) != 0) {
+ perror("ping: cap_get_flag"); + perror("ping6: cap_get_flag");
+ exit(-1); + exit(-1);
+ } + }
+ cap_free(cap); + cap_free(cap);

View File

@ -1,7 +1,7 @@
Summary: Network monitoring tools including ping Summary: Network monitoring tools including ping
Name: iputils Name: iputils
Version: 20101006 Version: 20101006
Release: 16%{?dist} Release: 17%{?dist}
License: BSD License: BSD
URL: http://www.skbuff.net/iputils URL: http://www.skbuff.net/iputils
Group: System Environment/Daemons Group: System Environment/Daemons
@ -191,6 +191,9 @@ fi
%{_sysconfdir}/rc.d/init.d/rdisc %{_sysconfdir}/rc.d/init.d/rdisc
%changelog %changelog
* Mon Jul 23 2012 Jan Synáček <jsynacek@redhat.com> 20101006-17
- Minor update: capabilities patch
* Fri Jul 20 2012 Jan Synáček <jsynacek@redhat.com> 20101006-16 * Fri Jul 20 2012 Jan Synáček <jsynacek@redhat.com> 20101006-16
- Make fedora-review friendly - Make fedora-review friendly