Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bd4cca264 | ||
|
|
68b26a2347 | ||
|
|
2afb25899e | ||
|
|
879d14360f |
9 changed files with 451 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
seedit-2.2.0.tar.gz
|
||||
seedit-2.1.0.tar.gz
|
||||
seedit-2.1.1.tar.gz
|
||||
|
|
|
|||
72
2.1.0-4.patch
Normal file
72
2.1.0-4.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
Index: Changelog
|
||||
===================================================================
|
||||
--- Changelog (リビジョン 644)
|
||||
+++ Changelog (作業コピー)
|
||||
@@ -1,3 +1,7 @@
|
||||
+*2007/02/14
|
||||
+ - Fixed bug
|
||||
+ -- seedit-converter did not work when "//" is included in path
|
||||
+
|
||||
*2007/02/05
|
||||
- Fixed installhelper-include.sh for asianux 2
|
||||
- Add seedit-load.conf to customize obj_type filed of audit
|
||||
Index: core/converter/action.c
|
||||
===================================================================
|
||||
--- core/converter/action.c (リビジョン 644)
|
||||
+++ core/converter/action.c (作業コピー)
|
||||
@@ -516,12 +516,42 @@
|
||||
|
||||
}
|
||||
|
||||
+/*replace '//' with '/' */
|
||||
+char *remove_slash(char *path) {
|
||||
+ char *buf;
|
||||
+ char *result;
|
||||
+ int len;
|
||||
+ int i;
|
||||
+ int j;
|
||||
+ result = strdup(path);
|
||||
+ len = strlen(path);
|
||||
+ buf = (char *)my_malloc(sizeof(char) * (len + 1));
|
||||
+ memset(buf, 0, sizeof(char) * (len + 1));
|
||||
+
|
||||
+ j = 0;
|
||||
+ for (i=0; i < len; i++) {
|
||||
+ if(path[i] == '/') {
|
||||
+ if (i > 0 && path[i-1] == '/'){
|
||||
+ /*do nothing*/
|
||||
+ } else {
|
||||
+ buf[j] = path[i];
|
||||
+ j++;
|
||||
+ }
|
||||
+ } else {
|
||||
+ buf[j] = path[i];
|
||||
+ j++;
|
||||
+ }
|
||||
+ }
|
||||
+ memcpy(result,buf,len+1);
|
||||
+ free(buf);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
int register_file_rule(char *path){
|
||||
char **dir_list;
|
||||
- char *filename;
|
||||
-
|
||||
+ char *filename;
|
||||
int state;
|
||||
-
|
||||
+ path = remove_slash(path);
|
||||
state = get_file_state(path);
|
||||
filename = get_filename(path, state);
|
||||
add_file_user_list(filename);
|
||||
@@ -540,7 +570,8 @@
|
||||
/* when allow <dir>* is described, add dummy permission to dummy domain. */
|
||||
label_child_dir(filename);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ free(path);
|
||||
return 0;
|
||||
|
||||
}
|
||||
98
2.1.0-5.patch
Normal file
98
2.1.0-5.patch
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
Index: Changelog
|
||||
===================================================================
|
||||
--- Changelog (リビジョン 644)
|
||||
+++ Changelog (作業コピー)
|
||||
@@ -1,3 +1,7 @@
|
||||
+*2007/02/14
|
||||
+ - Fixed bug
|
||||
+ -- seedit-converter did not work when "//" is included in path
|
||||
+
|
||||
*2007/02/05
|
||||
- Fixed installhelper-include.sh for asianux 2
|
||||
- Add seedit-load.conf to customize obj_type filed of audit
|
||||
Index: core/converter/action.c
|
||||
===================================================================
|
||||
--- core/converter/action.c (リビジョン 644)
|
||||
+++ core/converter/action.c (作業コピー)
|
||||
@@ -516,12 +516,42 @@
|
||||
|
||||
}
|
||||
|
||||
+/*replace '//' with '/' */
|
||||
+char *remove_slash(char *path) {
|
||||
+ char *buf;
|
||||
+ char *result;
|
||||
+ int len;
|
||||
+ int i;
|
||||
+ int j;
|
||||
+ result = strdup(path);
|
||||
+ len = strlen(path);
|
||||
+ buf = (char *)my_malloc(sizeof(char) * (len + 1));
|
||||
+ memset(buf, 0, sizeof(char) * (len + 1));
|
||||
+
|
||||
+ j = 0;
|
||||
+ for (i=0; i < len; i++) {
|
||||
+ if(path[i] == '/') {
|
||||
+ if (i > 0 && path[i-1] == '/'){
|
||||
+ /*do nothing*/
|
||||
+ } else {
|
||||
+ buf[j] = path[i];
|
||||
+ j++;
|
||||
+ }
|
||||
+ } else {
|
||||
+ buf[j] = path[i];
|
||||
+ j++;
|
||||
+ }
|
||||
+ }
|
||||
+ memcpy(result,buf,len+1);
|
||||
+ free(buf);
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
int register_file_rule(char *path){
|
||||
char **dir_list;
|
||||
- char *filename;
|
||||
-
|
||||
+ char *filename;
|
||||
int state;
|
||||
-
|
||||
+ path = remove_slash(path);
|
||||
state = get_file_state(path);
|
||||
filename = get_filename(path, state);
|
||||
add_file_user_list(filename);
|
||||
@@ -540,7 +570,8 @@
|
||||
/* when allow <dir>* is described, add dummy permission to dummy domain. */
|
||||
label_child_dir(filename);
|
||||
}
|
||||
-
|
||||
+
|
||||
+ free(path);
|
||||
return 0;
|
||||
|
||||
}
|
||||
Index: core/utils/seedit-load.py
|
||||
===================================================================
|
||||
--- core/utils/seedit-load.py (リビジョン 644)
|
||||
+++ core/utils/seedit-load.py (作業コピー)
|
||||
@@ -24,7 +24,7 @@
|
||||
import string
|
||||
import gettext
|
||||
|
||||
-gSeeditLoadConf="/etc/seedit/seedit-load.conf"
|
||||
+gSeeditLoadConf="/usr/share/seedit/seedit-load.conf"
|
||||
gMakeFlags="CONFDIR=/etc/seedit/policy OUTDIR=/usr/share/seedit/sepolicy BASEPOLICYDIR=/usr/share/seedit/base_policy MACRODIR=/usr/share/seedit/macros"
|
||||
gAuditCtl="/sbin/auditctl"
|
||||
|
||||
Index: core/config/Makefile
|
||||
===================================================================
|
||||
--- core/config/Makefile (リビジョン 644)
|
||||
+++ core/config/Makefile (作業コピー)
|
||||
@@ -63,7 +63,7 @@
|
||||
mkdir -p $(BUILD_ROOT_DIR)/sepolicy
|
||||
mkdir -p $(SEEDITCONFROOT)
|
||||
mkdir -p $(sysconfdir)/seedit
|
||||
- install -p -m 0644 seedit-load.conf $(sysconfdir)/seedit
|
||||
+ install -p -m 0644 seedit-load.conf $(SEEDITCONFROOT)
|
||||
cp -p -r base_policy $(SEEDITCONFROOT)
|
||||
cp -p -r macros $(SEEDITCONFROOT)
|
||||
mv $(SEEDITCONFROOT)/base_policy/spdl_spec.xml.expand $(SEEDITCONFROOT)/base_policy/spdl_spec.xml
|
||||
10
2.1.1-2.patch
Normal file
10
2.1.1-2.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Index: core/config/base_policy/types.te
|
||||
===================================================================
|
||||
--- core/config/base_policy/types.te (revision 660)
|
||||
+++ core/config/base_policy/types.te (working copy)
|
||||
@@ -1,4 +1,4 @@
|
||||
-h # SELinux Policy Editor, a simple editor for SELinux policies
|
||||
+# SELinux Policy Editor, a simple editor for SELinux policies
|
||||
# Copyright (C) 2006 Yuichi Nakamura
|
||||
|
||||
## minimum types used in converter
|
||||
|
|
@ -1 +0,0 @@
|
|||
This package was retired on 2011-07-25 due to it being unable to build this package for multiple releases (FTBFS).
|
||||
13
seedit-gui.desktop
Normal file
13
seedit-gui.desktop
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Name=SELinux Policy Editor
|
||||
GenericName=SELinux Policy Editor
|
||||
Comment=A tool to make SELinux easy
|
||||
Comment[ja]=SELinuxを簡単に使うためのツールです
|
||||
Icon=seedit-gui.png
|
||||
Exec=/usr/bin/seedit-gui
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Categories=System;Security
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
StartupNotify=true
|
||||
BIN
seedit-gui.png
Normal file
BIN
seedit-gui.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
255
seedit.spec
Normal file
255
seedit.spec
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
%define buildnum 2
|
||||
%define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')
|
||||
%define selinuxenabled /usr/sbin/selinuxenabled
|
||||
|
||||
%define selinuxconf %{_sysconfdir}/selinux/config
|
||||
%define auditrules %{_sysconfdir}/audit/audit.rules
|
||||
#Whether SELinux supports customizable_types, after FC5 "y"
|
||||
%define customizable_types y
|
||||
#Whether SELinux supports modular policy, after FC5 "y"
|
||||
%define modular y
|
||||
#Whether pam supports include syntax, after FC5 "y"
|
||||
%define pam_include_support y
|
||||
#Whether audit support obj_type field, after FC6 "y"
|
||||
%define audit_obj_type_support y
|
||||
#Version of sample policy file
|
||||
%define sample_policy_type fc6
|
||||
|
||||
Name: seedit
|
||||
Version: 2.1.1
|
||||
Release: %{buildnum}%{?dist}.2
|
||||
Summary: SELinux Policy Editor:Core component
|
||||
Group: System Environment/Base
|
||||
License: GPL
|
||||
URL: http://seedit.sourceforge.net/
|
||||
Source0: http://osdn.dl.sourceforge.jp/selpe/23577/%{name}-%{version}.tar.gz
|
||||
Source1: seedit-gui.desktop
|
||||
Source2: seedit-gui.png
|
||||
Patch: 2.1.1-2.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{betatag}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libselinux-devel >= 1.19, libsepol-devel >= 1.1.1, byacc, flex
|
||||
Requires: checkpolicy, m4, audit, libselinux >= 1.19, libsepol >= 1.1.1
|
||||
Provides: seedit-converter = %{version}-%{release}
|
||||
|
||||
%description
|
||||
SELinux Policy Editor(SEEdit) is a tool to make SELinux easy.
|
||||
SEEdit is composed of Simplified Policy, command line utils and GUI.
|
||||
The main feature is Simplified Policy.
|
||||
Simplified Policy is written in Simplified Policy Description Language(SPDL).
|
||||
SPDL hides detail of SELinux.
|
||||
For detail, visit http://seedit.sourceforge.net/.
|
||||
Command line utils is included in seedit package.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p0
|
||||
|
||||
%build
|
||||
pushd core
|
||||
make clean
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags}" CUSTOMIZABLE_TYPES=%{customizable_types} MODULAR=%{modular}
|
||||
popd
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
pushd core
|
||||
make install DESTDIR=%{buildroot} PYTHON_SITELIB=%{buildroot}/%{python_sitelib} CUSTOMIZABLE_TYPES=%{customizable_types} MODULAR=%{modular} AUDIT_OBJ_TYPE_SUPPORT=%{audit_obj_type_support}
|
||||
popd
|
||||
|
||||
pushd policy
|
||||
make install DESTDIR=%{buildroot} DISTRO=%{sample_policy_type} SELINUXTYPE=seedit MODULAR=%{modular} AUDITRULES=%{auditrules}
|
||||
popd
|
||||
|
||||
pushd gui
|
||||
make install DESTDIR=%{buildroot} PYTHON_SITELIB=%{buildroot}/%{python_sitelib} PAM_INCLUDE_SUPPORT=%{pam_include_support}
|
||||
|
||||
#For Asianux2
|
||||
#AX2 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/applications
|
||||
#AX2 install -p -m 0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications
|
||||
desktop-file-install --vendor "" --dir ${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
|
||||
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||
install -p -m 0644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/seedit-gui.png
|
||||
popd
|
||||
|
||||
#touch ghost files
|
||||
touch ${RPM_BUILD_ROOT}%{_datadir}/%{name}/sepolicy/need-rbac-init
|
||||
touch ${RPM_BUILD_ROOT}%{_datadir}/%{name}/sepolicy/need-init
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc README Changelog COPYING AUTHORS NEWS TODO
|
||||
%{_bindir}/seedit-converter
|
||||
%{_bindir}/audit2spdl
|
||||
%{_sbindir}/seedit-rbac
|
||||
%{_sbindir}/seedit-load
|
||||
%{_sbindir}/seedit-restorecon
|
||||
%{_bindir}/seedit-unconfined
|
||||
%{_bindir}/seedit-template
|
||||
%dir %{python_sitelib}/%{name}
|
||||
%{python_sitelib}/%{name}/*.*
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/Makefile
|
||||
%{_datadir}/%{name}/macros
|
||||
%{_datadir}/%{name}/base_policy
|
||||
%dir %{_datadir}/%{name}/sepolicy
|
||||
%{_datadir}/%{name}/seedit-load.conf
|
||||
|
||||
%package policy
|
||||
Summary: SELinux Policy Editor: Sample simplified policy
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description policy
|
||||
Sample simplified policy for SEEdit.
|
||||
|
||||
%post policy
|
||||
if [ $1 = 1 ]; then
|
||||
#Mark to initialize SELinux Policy Editor, when new install
|
||||
touch %{_datadir}/%{name}/sepolicy/need-init
|
||||
fi
|
||||
|
||||
if [ $1 = 2 ]; then
|
||||
#Mark to initialize RBAC config when upgrade
|
||||
touch %{_datadir}/%{name}/sepolicy/need-rbac-init
|
||||
fi
|
||||
|
||||
%postun policy
|
||||
if [ $1 = 0 ]; then
|
||||
sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=targeted/g' %{_sysconfdir}/selinux/config
|
||||
if [ %{selinuxenabled} ]; then
|
||||
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' %{_sysconfdir}/selinux/config
|
||||
fi
|
||||
touch /.autorelabel
|
||||
fi
|
||||
|
||||
%files policy
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/policy
|
||||
%config(noreplace) %{_sysconfdir}/selinux/%{name}
|
||||
%{_datadir}/%{name}/initialize/
|
||||
%{_sbindir}/seedit-init
|
||||
%ghost %{_datadir}/%{name}/sepolicy/need-init
|
||||
%ghost %{_datadir}/%{name}/sepolicy/need-rbac-init
|
||||
|
||||
%package gui
|
||||
Summary: GUI for SELinux Policy Editor
|
||||
Group: System Environment/Base
|
||||
Requires: usermode
|
||||
Requires: pygtk2
|
||||
Requires: pam >= 0.80-9
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gettext
|
||||
Requires: %{name} = %{version}-%{release}, %{name}-policy = %{version}-%{release}
|
||||
|
||||
%description gui
|
||||
X based GUI for SELinux Policy Editor
|
||||
|
||||
%files gui -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/seedit-gui
|
||||
%{_sbindir}/seedit-gui
|
||||
%{_sbindir}/seedit-gui-status
|
||||
%{_sbindir}/seedit-gui-domain-manager
|
||||
%{_sbindir}/seedit-gui-role-manager
|
||||
%{_sbindir}/seedit-gui-generate-policy
|
||||
%{_sbindir}/seedit-gui-edit
|
||||
%{_sbindir}/seedit-gui-load
|
||||
%{python_sitelib}/%{name}/ui
|
||||
%{_datadir}/icons/%{name}
|
||||
%{_datadir}/applications/seedit-gui.desktop
|
||||
%config(noreplace) %{_sysconfdir}/security/console.apps/seedit-gui
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/seedit-gui
|
||||
%{_datadir}/pixmaps/seedit-gui.png
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Apr 18 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.1-2
|
||||
- Fixed install bug
|
||||
* Thu Apr 12 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.1-1
|
||||
- Merged bug fix until 2.1.0-5
|
||||
- Other bug fixes
|
||||
* Fri Feb 16 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-5
|
||||
- SELINUX= is set permissive when uninstall,
|
||||
because relabel fails in enforcing mode.
|
||||
- Modified path to seedit-load.conf
|
||||
|
||||
* Thu Feb 15 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-4
|
||||
- Fixed bug, seedit-converter did not work when "//" is included in path
|
||||
|
||||
* Fri Feb 9 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-3
|
||||
- Fixed build failure
|
||||
|
||||
* Fri Feb 9 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-2
|
||||
- Fixed build failure
|
||||
|
||||
* Tue Feb 6 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-1
|
||||
- Fixed bug in RBAC
|
||||
- Fixed installer for Asianux
|
||||
|
||||
* Wed Jan 31 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.16.beta7
|
||||
- Fixed for CentOS4, package build failed.
|
||||
|
||||
* Sat Jan 27 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.15.beta6.7
|
||||
- Fixed Requires
|
||||
- Fixed makefiles to preserve timestamps.
|
||||
|
||||
* Fri Jan 26 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.14.beta6.6
|
||||
- Fixed spec file, to more fit Fedora Extras.
|
||||
- Fixed makefiles to preserve timestamps.
|
||||
|
||||
* Thu Jan 25 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.13.beta6.5
|
||||
- Prepared rbac-on flag.
|
||||
|
||||
* Thu Jan 25 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.12.beta6.4
|
||||
- Fixed bug in upgrade.
|
||||
|
||||
* Wed Jan 24 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.11.beta6.3
|
||||
- Fixed bug that seedit-gui does not start.
|
||||
|
||||
* Tue Jan 23 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.10.beta6.2
|
||||
- Fixed spec file, to more fit Fedora Extras.
|
||||
|
||||
* Thu Jan 18 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.9.beta6.2
|
||||
- Fixed spec file, Makefiles, to more fit Fedora Extras.
|
||||
|
||||
* Thu Jan 18 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.8.beta6.1
|
||||
- Cleaned spec file , to fit Fedora Extras.
|
||||
|
||||
* Fri Jan 12 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.7.beta6
|
||||
- Fixed spec file to use desktop-file-install
|
||||
- Modified paths to use macros
|
||||
|
||||
* Wed Jan 10 2007 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.6.beta6
|
||||
- Merged 3 spec files into 1 spec file(seedit.spec).
|
||||
|
||||
* Thu Dec 28 2006 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.1.beta5
|
||||
Added Generate more policy button.
|
||||
Fixed bug of audit2spdl module.
|
||||
|
||||
* Fri Nov 10 2006 Yuichi Nakamura<ynakam@hitachisoft.jp> 2.1.0-0.1.beta4
|
||||
Change of install path, clean ups to submit FE.
|
||||
Merged icons from Shane M. Coughlan.
|
||||
|
||||
* Tue Sep 26 2006 Yuichi Nakamura 2.0.2
|
||||
Merged changes(about lanugage changes) from Shane M. Coughlan.
|
||||
|
||||
* Tue Sep 19 2006 Yuichi Nakamura 2.0.1-1
|
||||
Fixed bug for RBAC(default_cotnexts)
|
||||
seedit-converter generates userhelper_contexts
|
||||
Fixed bug for Cent OS 4
|
||||
Merged clean up about copyright statement from Shane M. Coughlan.
|
||||
|
||||
* Fri Aug 25 2006 Yuichi Nakamura 2.0.0-2
|
||||
Fixed bug. rename was integrated into c permission, e is correct.
|
||||
|
||||
* Mon Jul 2 2006 Yuichi Nakamura<himainu-ynakam@miomio.jp> 2.0.0
|
||||
- Initial version
|
||||
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
a380b9e2cb67c5d89fd28bdca63b330a seedit-2.1.1.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue