Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Fedora Release Engineering
1c579e7315 dist-git conversion 2010-07-29 04:18:44 +00:00
Bill Nottingham
cfad50a83c Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:22:23 +00:00
Peter Vrabec
4404138068 upgrade (#439833) 2008-10-29 10:02:21 +00:00
Jesse Keating
0b203d979d Initialize branch F-9 for netlabel_tools 2008-04-21 06:19:18 +00:00
9 changed files with 18 additions and 349 deletions

View file

@ -1 +0,0 @@
netlabel_tools-0.17.tar.gz

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
netlabel_tools-0.18.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: netlabel_tools
# $Id$
NAME := netlabel_tools
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1,65 +0,0 @@
diff -rup netlabel_tools-0.16-orig/include/linux/netlabel.h netlabel_tools-0.16/include/linux/netlabel.h
--- netlabel_tools-0.16-orig/include/linux/netlabel.h 2006-07-31 17:20:41.000000000 -0400
+++ netlabel_tools-0.16/include/linux/netlabel.h 2006-08-29 14:07:44.000000000 -0400
@@ -39,7 +39,9 @@
/* FIXME: perhaps some or all this lives in a system header file? */
-#define NLMSG_HDRLEN NLMSG_ALIGN(sizeof(struct nlmsghdr))
+#ifndef NLMSG_HDRLEN /* newer netlink.h has these... */
+
+# define NLMSG_HDRLEN NLMSG_ALIGN(sizeof(struct nlmsghdr))
struct nlattr
{
@@ -47,6 +49,13 @@ struct nlattr
unsigned short nla_type;
};
+# define NLA_HDRLEN NLMSG_ALIGN(sizeof(struct nlattr))
+
+# define NETLINK_GENERIC 16
+
+
+#endif
+
enum {
NLA_UNSPEC,
NLA_U8,
@@ -61,10 +70,6 @@ enum {
};
#define NLA_TYPE_MAX (__NLA_TYPE_MAX - 1)
-#define NLA_HDRLEN NLMSG_ALIGN(sizeof(struct nlattr))
-
-#define NETLINK_GENERIC 16
-
struct genlmsghdr {
unsigned char cmd;
unsigned char version;
--- netlabel_tools-0.16-orig/Makefile 2006-06-27 13:06:28.000000000 -0400
+++ netlabel_tools-0.16/Makefile 2006-08-29 16:42:09.000000000 -0400
@@ -43,8 +43,9 @@ INSTALL_SBIN_DIR = $(INSTALL_PREFIX)/sbi
INSTALL_BIN_DIR = $(INSTALL_PREFIX)/bin
INSTALL_MAN_DIR = $(INSTALL_PREFIX)/share/man
-OWNER = root
-GROUP = root
+# Mock doesn't allow this.
+#OWNER = root
+#GROUP = root
#
# targets
@@ -77,9 +78,9 @@ install: $(SUBDIRS)
@echo "INFO: installing files in $(INSTALL_PREFIX)"
@mkdir -p $(INSTALL_SBIN_DIR)
@mkdir -p $(INSTALL_MAN_DIR)/man8
- @install -o $(OWNER) -g $(GROUP) -m 755 netlabelctl/netlabelctl \
+ @install -m 755 netlabelctl/netlabelctl \
$(INSTALL_SBIN_DIR)/netlabelctl
- @install -o $(OWNER) -g $(GROUP) -m 644 docs/man/netlabelctl.8 \
+ @install -m 644 docs/man/netlabelctl.8 \
$(INSTALL_MAN_DIR)/man8
clean:

View file

@ -1,5 +1,6 @@
--- netlabel_tools-0.16-orig/Makefile 2006-06-27 13:06:28.000000000 -0400 diff -up netlabel_tools-0.17/Makefile.orig netlabel_tools-0.17/Makefile
+++ netlabel_tools-0.16/Makefile 2006-08-29 16:42:09.000000000 -0400 --- netlabel_tools-0.17/Makefile.orig 2006-09-28 18:18:05.000000000 -0400
+++ netlabel_tools-0.17/Makefile 2008-08-11 14:57:31.000000000 -0400
@@ -43,8 +43,9 @@ INSTALL_SBIN_DIR = $(INSTALL_PREFIX)/sbi @@ -43,8 +43,9 @@ INSTALL_SBIN_DIR = $(INSTALL_PREFIX)/sbi
INSTALL_BIN_DIR = $(INSTALL_PREFIX)/bin INSTALL_BIN_DIR = $(INSTALL_PREFIX)/bin
INSTALL_MAN_DIR = $(INSTALL_PREFIX)/share/man INSTALL_MAN_DIR = $(INSTALL_PREFIX)/share/man
@ -7,12 +8,12 @@
-OWNER = root -OWNER = root
-GROUP = root -GROUP = root
+# Mock doesn't allow this. +# Mock doesn't allow this.
+#OWNER = root +# OWNER = root
+#GROUP = root +# GROUP = root
# #
# targets # targets
@@ -77,9 +78,9 @@ install: $(SUBDIRS) @@ -72,9 +73,9 @@ install: $(SUBDIRS)
@echo "INFO: installing files in $(INSTALL_PREFIX)" @echo "INFO: installing files in $(INSTALL_PREFIX)"
@mkdir -p $(INSTALL_SBIN_DIR) @mkdir -p $(INSTALL_SBIN_DIR)
@mkdir -p $(INSTALL_MAN_DIR)/man8 @mkdir -p $(INSTALL_MAN_DIR)/man8
@ -23,4 +24,4 @@
+ @install -m 644 docs/man/netlabelctl.8 \ + @install -m 644 docs/man/netlabelctl.8 \
$(INSTALL_MAN_DIR)/man8 $(INSTALL_MAN_DIR)/man8
clean: $(VERSION_HDR): version_info

View file

@ -1,218 +0,0 @@
diff -up netlabel_tools-0.17/libnetlabel/netlabel_internal.h.libnl netlabel_tools-0.17/libnetlabel/netlabel_internal.h
--- netlabel_tools-0.17/libnetlabel/netlabel_internal.h.libnl 2006-09-28 17:18:05.000000000 -0500
+++ netlabel_tools-0.17/libnetlabel/netlabel_internal.h 2008-02-11 09:24:06.000000000 -0600
@@ -8,19 +8,17 @@
/*
* (c) Copyright Hewlett-Packard Development Company, L.P., 2006
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -37,11 +35,13 @@ struct nlbl_handle_s {
/* Specify which version of libnl we are using */
/* 1.0-pre5 => 1005 */
/* 1.0-pre6 => 1006 */
-#define LIBNL_VERSION 1005
+/* 1.0-pre8 => 1008 */
+/* 1.1 => 1100 */
+#define LIBNL_VERSION 1100
/* XXX - this whole block will most likely go away once libnl supports Generic
* Netlink */
-#if 1 /* Generic Netlink types */
+#if LIBNL_VERSION <= 1006 /* Generic Netlink types */
/* Generic Netlink message header */
struct genlmsghdr {
diff -up netlabel_tools-0.17/libnetlabel/netlabel_msg.c.libnl netlabel_tools-0.17/libnetlabel/netlabel_msg.c
--- netlabel_tools-0.17/libnetlabel/netlabel_msg.c.libnl 2006-09-28 17:18:05.000000000 -0500
+++ netlabel_tools-0.17/libnetlabel/netlabel_msg.c 2008-02-11 09:22:13.000000000 -0600
@@ -8,19 +8,17 @@
/*
* (c) Copyright Hewlett-Packard Development Company, L.P., 2006
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -52,7 +50,11 @@ nlbl_msg *nlbl_msg_new(void)
struct genlmsghdr genl_hdr;
/* create the message with a simple netlink header */
+#if LIBNL_VERSION >= 1008
+ msg = nlmsg_alloc();
+#else
msg = nlmsg_build_no_hdr();
+#endif
if (msg == NULL)
goto msg_new_failure;
diff -up netlabel_tools-0.17/libnetlabel/netlabel_comm.c.libnl netlabel_tools-0.17/libnetlabel/netlabel_comm.c
--- netlabel_tools-0.17/libnetlabel/netlabel_comm.c.libnl 2006-09-28 17:18:05.000000000 -0500
+++ netlabel_tools-0.17/libnetlabel/netlabel_comm.c 2008-02-11 09:24:06.000000000 -0600
@@ -8,28 +8,33 @@
/*
* (c) Copyright Hewlett-Packard Development Company, L.P., 2006
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
+#include <linux/types.h>
#include <sys/types.h>
+
+#ifndef __USE_GNU
+#define __USE_GNU
#include <sys/socket.h>
-#include <linux/types.h>
+#undef __USE_GNU
+#else
+#include <sys/socket.h>
+#endif
#include <libnetlabel.h>
@@ -100,7 +105,10 @@ nlbl_handle *nlbl_comm_open(void)
goto open_failure;
/* set the netlink handle properties */
-#if LIBNL_VERSION >= 1006
+#if LIBNL_VERSION >= 1008
+ nl_socket_set_peer_port(hndl->nl_hndl, 0);
+ nl_set_passcred(hndl->nl_hndl, 1);
+#elif LIBNL_VERSION == 1006
nl_handle_set_peer_pid(hndl->nl_hndl, 0);
nl_set_passcred(hndl->nl_hndl, 1);
#endif
@@ -177,7 +185,11 @@ int nlbl_comm_recv_raw(nlbl_handle *hndl
* is waiting to be read from the handle */
timeout.tv_sec = nlcomm_read_timeout;
timeout.tv_usec = 0;
+#if LIBNL_VERSION >= 1008
+ nl_fd = nl_socket_get_fd(hndl->nl_hndl);
+#else
nl_fd = nl_handle_get_fd(hndl->nl_hndl);
+#endif
FD_ZERO(&read_fds);
FD_SET(nl_fd, &read_fds);
ret_val = select(nl_fd + 1, &read_fds, NULL, NULL, &timeout);
@@ -188,14 +200,12 @@ int nlbl_comm_recv_raw(nlbl_handle *hndl
/* perform the read operation */
*data = NULL;
-#if LIBNL_VERSION == 1005
- ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data);
+#if LIBNL_VERSION >= 1006
+ ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data, &creds);
if (ret_val < 0)
return ret_val;
- /* XXX - avoid a compiler warning about unused variables */
- creds = NULL;
-#elif LIBNL_VERSION >= 1006
- ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data, &creds);
+#else
+ ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data);
if (ret_val < 0)
return ret_val;
#endif
@@ -250,7 +260,11 @@ int nlbl_comm_recv(nlbl_handle *hndl, nl
* is waiting to be read from the handle */
timeout.tv_sec = nlcomm_read_timeout;
timeout.tv_usec = 0;
+#if LIBNL_VERSION >= 1008
+ nl_fd = nl_socket_get_fd(hndl->nl_hndl);
+#else
nl_fd = nl_handle_get_fd(hndl->nl_hndl);
+#endif
FD_ZERO(&read_fds);
FD_SET(nl_fd, &read_fds);
ret_val = select(nl_fd + 1, &read_fds, NULL, NULL, &timeout);
@@ -260,12 +274,16 @@ int nlbl_comm_recv(nlbl_handle *hndl, nl
return -EAGAIN;
/* perform the read operation */
-#if LIBNL_VERSION == 1005
- ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, &data);
+#if LIBNL_VERSION >= 1100
+ ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, &data, &creds);
if (ret_val < 0)
return ret_val;
#elif LIBNL_VERSION >= 1006
- ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, &data, &creds);
+ ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data, &creds);
+ if (ret_val < 0)
+ return ret_val;
+#else
+ ret_val = nl_recv(hndl->nl_hndl, &peer_nladdr, data);
if (ret_val < 0)
return ret_val;
#endif
@@ -349,6 +367,6 @@ int nlbl_comm_send(nlbl_handle *hndl, nl
#if LIBNL_VERSION == 1005
return nl_send_auto_complete(hndl->nl_hndl, nlbl_msg_nlhdr(msg));
#elif LIBNL_VERSION >= 1006
- return = nl_send_auto_complete(hndl->nl_hndl, msg);
+ return nl_send_auto_complete(hndl->nl_hndl, msg);
#endif
}

View file

@ -1,29 +0,0 @@
Index: netlabelctl/cipsov4.c
===================================================================
--- netlabelctl/cipsov4.c (revision 27)
+++ netlabelctl/cipsov4.c (revision 28)
@@ -236,7 +236,7 @@
printf("STANDARD");
break;
case CIPSO_V4_MAP_PASS:
- printf("PASS_THROUGH\n");
+ printf("PASS_THROUGH");
break;
default:
printf("UNKNOWN(%u)", mtype_list[iter]);
Index: netlabelctl/map.c
===================================================================
--- netlabelctl/map.c (revision 27)
+++ netlabelctl/map.c (revision 28)
@@ -224,8 +224,10 @@
printf("UNKNOWN(%u)", domain_p[iter].proto_type);
break;
}
- printf(" ");
+ if (iter + 1 < count)
+ printf(" ");
}
+ printf("\n");
}
list_return:

View file

@ -1,16 +1,14 @@
Summary: Tools to manage the Linux NetLabel subsystem Summary: Tools to manage the Linux NetLabel subsystem
Name: netlabel_tools Name: netlabel_tools
Version: 0.17 Version: 0.18
Release: 7%{?dist} Release: 1%{?dist}
License: GPL License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://netlabel.sf.net/ URL: http://netlabel.sf.net/
Source0: http://downloads.sourceforge.net/netlabel/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/netlabel/%{name}-%{version}.tar.gz
Source1: netlabel Source1: netlabel
Source2: netlabel.rules Source2: netlabel.rules
Patch1: netlabel_tools-0.17-new-hdrs.patch Patch1: netlabel_tools-0.17-new-hdrs.patch
Patch2: netlabel_tools-27_28.patch
Patch3: netlabel_tools-0.17-newlibnl.patch
BuildRoot: %{_tmppath}/%{name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}
BuildRequires: kernel-headers >= 2.6.18 BuildRequires: kernel-headers >= 2.6.18
BuildRequires: libnl-devel BuildRequires: libnl-devel
@ -27,9 +25,6 @@ configure the kernel subsystem.
# Build fixes. # Build fixes.
%patch1 -p1 %patch1 -p1
# Upstream patch.
%patch2 -p0
%patch3 -p1 -b .libnl
%build %build
# Don't use _smp_mflags, it's small and a hand crafted Makefile # Don't use _smp_mflags, it's small and a hand crafted Makefile
@ -56,6 +51,12 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_mandir}/man8/* %attr(0644,root,root) %{_mandir}/man8/*
%changelog %changelog
* Mon Oct 27 2008 Peter Vrabec <pvrabec@redhat.com> - 0.18-1
- upgrade (#439833)
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.17-8
- fix license tag
* Mon Feb 11 2008 Steve Conklin <sconklin@redhat.com> - 0.17-7 * Mon Feb 11 2008 Steve Conklin <sconklin@redhat.com> - 0.17-7
- New patch for bz#431766 to resolve conflicts - New patch for bz#431766 to resolve conflicts

View file

@ -1 +1 @@
905ffd48714f48aaa34ecdc3c51d3dcb netlabel_tools-0.17.tar.gz 963fad62ad186080bce32075f25e58d3 netlabel_tools-0.18.tar.gz