rpms/seedit/FC-6 2.1.0-4.patch,NONE,1.1 seedit.spec,1.5,1.6
Yuichi Nakamura (ynakam)
fedora-extras-commits at redhat.com
Thu Feb 15 02:33:11 UTC 2007
Author: ynakam
Update of /cvs/extras/rpms/seedit/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15262/FC-6
Modified Files:
seedit.spec
Added Files:
2.1.0-4.patch
Log Message:
Update for bug fix, 2.1.0-4
2.1.0-4.patch:
--- NEW FILE 2.1.0-4.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: seedit.spec
===================================================================
RCS file: /cvs/extras/rpms/seedit/FC-6/seedit.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- seedit.spec 9 Feb 2007 05:55:11 -0000 1.5
+++ seedit.spec 15 Feb 2007 02:32:38 -0000 1.6
@@ -1,4 +1,4 @@
-%define buildnum 3
+%define buildnum 4
%define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')
%define selinuxconf %{_sysconfdir}/selinux/config
@@ -24,6 +24,7 @@
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
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
@@ -40,6 +41,7 @@
%prep
%setup -q
+%patch0 -p0
%build
pushd core
@@ -166,6 +168,9 @@
%changelog
+* 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
+
* Fri Feb 9 2007 Yuichi Nakamura<ynakam at hitachisoft.jp> 2.1.0-3
- Fixed build failure
More information about the scm-commits
mailing list