PERFORCE change 105787 for review
Todd Miller
millert at FreeBSD.org
Thu Sep 7 14:13:04 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105787
Change 105787 by millert at millert_g5tower on 2006/09/07 13:54:49
Update to libsemanage_1_6_15 from sourceforge svn
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/ChangeLog#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/VERSION#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/src/policy_components.c#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/src/semanage_store.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/ChangeLog#3 (text+ko) ====
@@ -1,3 +1,9 @@
+1.6.15 2006-08-11
+ * Merged separate local file contexts patch from Chris PeBenito.
+
+1.6.14 2006-08-11
+ * Merged patch to make most copy errors non-fatal from Dan Walsh.
+
1.6.13 2006-08-03
* Merged netfilter contexts support from Chris PeBenito.
==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/VERSION#3 (text+ko) ====
@@ -1,1 +1,1 @@
-1.6.13
+1.6.15
==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/src/policy_components.c#3 (text+ko) ====
@@ -132,9 +132,6 @@
{semanage_bool_dbase_local(handle),
semanage_bool_dbase_policy(handle), MODE_SET},
- {semanage_fcontext_dbase_local(handle),
- semanage_fcontext_dbase_policy(handle), MODE_MODIFY},
-
{semanage_seuser_dbase_local(handle),
semanage_seuser_dbase_policy(handle), MODE_MODIFY},
==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsemanage/src/semanage_store.c#3 (text+ko) ====
@@ -1005,6 +1005,8 @@
const char *active_kernel =
semanage_path(SEMANAGE_ACTIVE, SEMANAGE_KERNEL);
const char *active_fc = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_FC);
+ const char *active_fc_loc =
+ semanage_path(SEMANAGE_ACTIVE, SEMANAGE_FC_LOCAL);
const char *active_hd =
semanage_path(SEMANAGE_ACTIVE, SEMANAGE_HOMEDIR_TMPL);
const char *active_seusers =
@@ -1012,6 +1014,7 @@
const char *active_nc = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_NC);
const char *running_fc = selinux_file_context_path();
+ const char *running_fc_loc = selinux_file_context_local_path();
const char *running_hd = selinux_homedir_context_path();
const char *running_policy = selinux_binary_policy_path();
const char *running_seusers = selinux_usersconf_path();
@@ -1022,6 +1025,7 @@
* building code in libselinux so that you can get paths for a given
* POLICYTYPE and should probably be done in the future. */
char store_fc[PATH_MAX];
+ char store_fc_loc[PATH_MAX];
char store_hd[PATH_MAX];
char store_pol[PATH_MAX];
char store_seusers[PATH_MAX];
@@ -1029,6 +1033,7 @@
len = strlen(really_active_store);
running_fc += len;
+ running_fc_loc += len;
running_hd += len;
running_policy += len;
running_seusers += len;
@@ -1051,14 +1056,23 @@
snprintf(store_hd, PATH_MAX, "%s%s", storepath, running_hd);
if (semanage_copy_file(active_hd, store_hd, sh->conf->file_mode) == -1) {
- ERR(sh, "Could not copy %s to %s.", active_hd, store_hd);
- goto cleanup;
+ INFO(sh, "Non-fatal error: Could not copy %s to %s.",
+ active_hd, store_hd);
+ /* Non-fatal; fall through */
}
snprintf(store_fc, PATH_MAX, "%s%s", storepath, running_fc);
if (semanage_copy_file(active_fc, store_fc, sh->conf->file_mode) == -1) {
- ERR(sh, "Could not copy %s to %s.", active_fc, store_fc);
- goto cleanup;
+ INFO(sh, "Non-fatal error: Could not copy %s to %s.",
+ active_fc, store_fc);
+ /* Non-fatal; fall through */
+ }
+
+ snprintf(store_fc_loc, PATH_MAX, "%s%s", storepath, running_fc_loc);
+ if (semanage_copy_file(active_fc_loc, store_fc_loc, sh->conf->file_mode) == -1) {
+ INFO(sh, "Non-fatal error: Could not copy %s to %s.",
+ active_fc_loc, store_fc_loc);
+ /* Non-fatal; fall through */
}
snprintf(store_seusers, PATH_MAX, "%s%s", storepath, running_seusers);
@@ -1071,8 +1085,8 @@
snprintf(store_nc, PATH_MAX, "%s%s", storepath, running_nc);
if (semanage_copy_file(active_nc, store_nc, sh->conf->file_mode) == -1) {
- ERR(sh, "Could not copy %s to %s.", active_nc, store_nc);
- goto cleanup;
+ INFO(sh, "Non-fatal error: Could not copy %s to %s.", active_nc, store_nc);
+ /* Non-fatal; fall through */
}
if (!sh->do_reload)
More information about the trustedbsd-cvs
mailing list