auto-import changelog data from libselinux-1.6-3.src.rpm
Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - fix location of file_contexts file. Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Fix matchpathcon to use BUFSIZ Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> - rebuilt Mon Feb 23 2004 Dan Walsh <dwalsh@redhat.com> 1.4-11 - add matchpathcon Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
This commit is contained in:
parent
9f53563498
commit
e9e2eaa1a2
@ -1 +1 @@
|
|||||||
libselinux-1.4.tgz
|
libselinux-1.6.tgz
|
||||||
|
@ -1,118 +1,11 @@
|
|||||||
--- libselinux-1.4/utils/getcon.c.rhat 2003-10-24 16:39:11.000000000 -0400
|
--- libselinux-1.6/src/policy.h.rhat 2004-03-15 08:40:08.000000000 -0500
|
||||||
+++ libselinux-1.4/utils/getcon.c 2003-12-18 14:50:39.000000000 -0500
|
+++ libselinux-1.6/src/policy.h 2004-03-17 00:24:16.396863312 -0500
|
||||||
@@ -2,19 +2,103 @@
|
@@ -12,7 +12,7 @@
|
||||||
#include <stdio.h>
|
/* selinuxfs mount point */
|
||||||
#include <stdlib.h>
|
extern char *selinux_mnt;
|
||||||
#include <selinux/selinux.h>
|
|
||||||
+#include <selinux/context.h>
|
|
||||||
+#include <getopt.h>
|
|
||||||
+
|
|
||||||
+/* The name the program was run with. */
|
|
||||||
+static char *program_name;
|
|
||||||
+static struct option const long_options[] =
|
|
||||||
+{
|
|
||||||
+ {"user", no_argument, 0, 'u'},
|
|
||||||
+ {"role", no_argument, 0, 'r'},
|
|
||||||
+ {"type", no_argument, 0, 't'},
|
|
||||||
+ {"help", no_argument, 0, 'h'},
|
|
||||||
+ {0, 0, 0, 0}
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+usage (int status)
|
|
||||||
+{
|
|
||||||
+ if (status != 0)
|
|
||||||
+ fprintf (stderr, "Try `%s --help' for more information.\n",
|
|
||||||
+ program_name);
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ printf ("\
|
|
||||||
+Usage: %s [ [-u USER] | [-r ROLE] | [-t TYPE] ] \n\
|
|
||||||
+",
|
|
||||||
+ program_name);
|
|
||||||
+ printf ("\
|
|
||||||
+Get the current security context for this process.\n\
|
|
||||||
+\n\
|
|
||||||
+ -u, --user=USER set user USER in the target security context\n\
|
|
||||||
+ -r, --role=ROLE set role ROLE in the target security context\n\
|
|
||||||
+ -t, --type=TYPE set type TYPE in the target security context\n\
|
|
||||||
+ --help display this help and exit\n\
|
|
||||||
+ --version output version information and exit\n\
|
|
||||||
+");
|
|
||||||
+ }
|
|
||||||
+ exit (status);
|
|
||||||
+}
|
|
||||||
|
|
||||||
int main(int argc __attribute__ ((unused)), char **argv)
|
-#define FILECONTEXTS "/etc/security/selinux/src/policy/file_contexts/file_contexts"
|
||||||
{
|
+#define FILECONTEXTS "/etc/security/selinux/file_contexts"
|
||||||
char *buf;
|
|
||||||
int rc;
|
|
||||||
+ int user=0,type=0,role=0,show_help=0;
|
|
||||||
+ char optc;
|
|
||||||
+ program_name = argv[0];
|
|
||||||
+ while ((optc = getopt_long (argc, argv, "hurt", long_options, NULL)) != -1)
|
|
||||||
+ {
|
|
||||||
+ switch (optc)
|
|
||||||
+ {
|
|
||||||
+ case 0:
|
|
||||||
+ break;
|
|
||||||
+ case 'u':
|
|
||||||
+ if (type || role)
|
|
||||||
+ usage(1);
|
|
||||||
+ user = 1;
|
|
||||||
+ break;
|
|
||||||
+ case 'r':
|
|
||||||
+ if (user || type)
|
|
||||||
+ usage(1);
|
|
||||||
+ role = 1;
|
|
||||||
+ break;
|
|
||||||
+ case 't':
|
|
||||||
+ if (user || role)
|
|
||||||
+ usage(1);
|
|
||||||
+ type=1;
|
|
||||||
+ break;
|
|
||||||
+ case 'h':
|
|
||||||
+ show_help=1;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ usage (1);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
rc = getcon(&buf);
|
#endif
|
||||||
if (rc < 0) {
|
|
||||||
fprintf(stderr, "%s: getcon() failed\n", argv[0]);
|
|
||||||
exit(2);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- printf("%s\n", buf);
|
|
||||||
+ if (show_help)
|
|
||||||
+ usage (0);
|
|
||||||
+ if (role || user || type) {
|
|
||||||
+ context_t context=context_new(buf);
|
|
||||||
+ if (user) {
|
|
||||||
+ printf("%s",context_user_get(context));
|
|
||||||
+ }
|
|
||||||
+ if (role) {
|
|
||||||
+ printf("%s",context_role_get(context));
|
|
||||||
+ }
|
|
||||||
+ if (type) {
|
|
||||||
+ printf("%s",context_type_get(context));
|
|
||||||
+ }
|
|
||||||
+ context_free(context);
|
|
||||||
+ } else {
|
|
||||||
+ printf("%s\n", buf);
|
|
||||||
+ }
|
|
||||||
freecon(buf);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
--- libselinux-1.4/utils/Makefile.rhat 2003-12-19 15:37:51.815619330 -0500
|
|
||||||
+++ libselinux-1.4/utils/Makefile 2003-12-19 15:37:32.014789494 -0500
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
# Installation directories.
|
|
||||||
-PREFIX ?= $(DESTDIR)/usr
|
|
||||||
-BINDIR ?= $(PREFIX)/bin
|
|
||||||
+BINDIR ?= $(DESTDIR)/bin
|
|
||||||
|
|
||||||
CFLAGS = -Wall
|
|
||||||
override CFLAGS += -I../include
|
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 1.4
|
Version: 1.6
|
||||||
Release: 9
|
Release: 3
|
||||||
License: Public domain (uncopyrighted)
|
License: Public domain (uncopyrighted)
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://www.nsa.gov/selinux/archives/libselinux-1.4.tgz
|
Source: http://www.nsa.gov/selinux/archives/libselinux-1.6.tgz
|
||||||
Prefix: %{_prefix}
|
Prefix: %{_prefix}
|
||||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||||
Provides: libselinux.so
|
Provides: libselinux.so
|
||||||
Patch: libselinux-rhat.patch
|
Patch0: libselinux-matchpathcon.patch
|
||||||
Patch1: libselinux-mntpoint.patch
|
Patch1: libselinux-rhat.patch
|
||||||
Patch2: libselinux-getpeercon.patch
|
|
||||||
Patch3: libselinux-getpwnam.patch
|
|
||||||
Patch4: libselinux-rootok.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Security-enhanced Linux is a patch of the Linux® kernel and a number
|
Security-enhanced Linux is a patch of the Linux® kernel and a number
|
||||||
@ -40,11 +37,8 @@ needed for developing SELinux applications.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -p1 -b .rhat
|
%patch -p1 -b .matchpathcon
|
||||||
%patch1 -p1 -b .mntpoint
|
%patch1 -p1 -b .rhat
|
||||||
%patch2 -p1 -b .getpeercon
|
|
||||||
%patch3 -p1 -b .getpeernam
|
|
||||||
%patch4 -p1 -b .rootok
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make
|
make
|
||||||
@ -54,7 +48,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
mkdir -p ${RPM_BUILD_ROOT}/%{_lib}
|
mkdir -p ${RPM_BUILD_ROOT}/%{_lib}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}
|
mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
|
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/bin
|
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
|
||||||
make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" SHLIBDIR="${RPM_BUILD_ROOT}/%{_lib}" install
|
make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" SHLIBDIR="${RPM_BUILD_ROOT}/%{_lib}" install
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
@ -73,9 +67,23 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/%{_lib}/libselinux.so.1
|
/%{_lib}/libselinux.so.1
|
||||||
/bin/*
|
%{_bindir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3
|
||||||
|
- fix location of file_contexts file.
|
||||||
|
|
||||||
|
* Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2
|
||||||
|
- Fix matchpathcon to use BUFSIZ
|
||||||
|
|
||||||
|
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Mon Feb 23 2004 Dan Walsh <dwalsh@redhat.com> 1.4-11
|
||||||
|
- add matchpathcon
|
||||||
|
|
||||||
|
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
* Fri Jan 23 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9
|
* Fri Jan 23 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9
|
||||||
- Add rootok patch
|
- Add rootok patch
|
||||||
|
Loading…
Reference in New Issue
Block a user