98 lines
2.7 KiB
Diff
98 lines
2.7 KiB
Diff
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
|