rpms/seedit/FC-6 2.1.0-5.patch,NONE,1.1 seedit.spec,1.6,1.7
Yuichi Nakamura (ynakam)
fedora-extras-commits at redhat.com
Fri Feb 16 03:40:27 UTC 2007
Author: ynakam
Update of /cvs/extras/rpms/seedit/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1491
Modified Files:
seedit.spec
Added Files:
2.1.0-5.patch
Log Message:
update for 2.1.0-5 FC6 build
2.1.0-5.patch:
--- NEW FILE 2.1.0-5.patch ---
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
Index: seedit.spec
===================================================================
RCS file: /cvs/extras/rpms/seedit/FC-6/seedit.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- seedit.spec 15 Feb 2007 02:32:38 -0000 1.6
+++ seedit.spec 16 Feb 2007 03:39:54 -0000 1.7
@@ -1,5 +1,6 @@
-%define buildnum 4
+%define buildnum 5
%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
@@ -24,11 +25,11 @@
Source0: http://osdn.dl.sourceforge.jp/selpe/23577/%{name}-%{version}.tar.gz
Source1: seedit-gui.desktop
Source2: seedit-gui.png
-Patch0: 2.1.0-4.patch
+Patch0: 2.1.0-5.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
+Provides: seedit-converter = %{version}-%{release}
%description
SELinux Policy Editor(SEEdit) is a tool to make SELinux easy.
@@ -99,8 +100,7 @@
%{_datadir}/%{name}/macros
%{_datadir}/%{name}/base_policy
%dir %{_datadir}/%{name}/sepolicy
-%dir %{_sysconfdir}/%{name}
-%{_sysconfdir}/%{name}/seedit-load.conf
+%{_datadir}/%{name}/seedit-load.conf
%package policy
Summary: SELinux Policy Editor: Sample simplified policy
@@ -124,6 +124,9 @@
%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
@@ -168,6 +171,11 @@
%changelog
+* Thu Feb 15 2007 Yuichi Nakamura<ynakam at 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 at hitachisoft.jp> 2.1.0-4
- Fixed bug, seedit-converter did not work when "//" is included in path
More information about the scm-commits
mailing list