From owner-trustedbsd-cvs@FreeBSD.ORG Thu Sep 7 14:13:04 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB60216A4DF for ; Thu, 7 Sep 2006 14:13:04 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 693DB43D79 for ; Thu, 7 Sep 2006 14:13:00 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id 4696046C59 for ; Thu, 7 Sep 2006 10:12:59 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id BCB76550DA; Thu, 7 Sep 2006 13:55:58 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 357F116A4FA; Thu, 7 Sep 2006 13:55:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8D0B16A4F5 for ; Thu, 7 Sep 2006 13:55:43 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2898143D78 for ; Thu, 7 Sep 2006 13:55:43 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k87DthX9017167 for ; Thu, 7 Sep 2006 13:55:43 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k87DtgZh017164 for perforce@freebsd.org; Thu, 7 Sep 2006 13:55:42 GMT (envelope-from millert@freebsd.org) Date: Thu, 7 Sep 2006 13:55:42 GMT Message-Id: <200609071355.k87DtgZh017164@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 105787 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2006 14:13:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=105787 Change 105787 by millert@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)