rpms/nss_db/F-8 fail-setfscreatecon.c, NONE, 1.1 .cvsignore, 1.7, 1.8 nss_db-2.2-selinux.patch, 1.3, 1.4 nss_db.spec, 1.36, 1.37 sources, 1.7, 1.8 nss_db-2.2-compat.patch, 1.2, NONE

Nalin Somabhai Dahyabhai (nalin) fedora-extras-commits at redhat.com
Mon Mar 3 22:57:25 UTC 2008


Author: nalin

Update of /cvs/pkgs/rpms/nss_db/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7326/F-8

Modified Files:
	.cvsignore nss_db-2.2-selinux.patch nss_db.spec sources 
Added Files:
	fail-setfscreatecon.c 
Removed Files:
	nss_db-2.2-compat.patch 
Log Message:
- pull back the raw hide version to fix file labeling



--- NEW FILE fail-setfscreatecon.c ---
int
setfscreatecon(void)
{
	return -1;
}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/nss_db/F-8/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore	13 Aug 2007 22:21:18 -0000	1.7
+++ .cvsignore	3 Mar 2008 22:56:37 -0000	1.8
@@ -1,6 +1,2 @@
-db-4.0.14.tar.gz
-nss_db-2.2.tar.gz
-db-4.3.27.tar.gz
-db-4.3.28.tar.gz
-db-4.5.20.tar.gz
 db-4.6.18.tar.gz
+nss_db-2.2.tar.gz

nss_db-2.2-selinux.patch:

Index: nss_db-2.2-selinux.patch
===================================================================
RCS file: /cvs/pkgs/rpms/nss_db/F-8/nss_db-2.2-selinux.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nss_db-2.2-selinux.patch	28 Feb 2005 18:25:36 -0000	1.3
+++ nss_db-2.2-selinux.patch	3 Mar 2008 22:56:37 -0000	1.4
@@ -102,7 +102,7 @@
    if (status)
      error (EXIT_FAILURE, 0, gettext ("cannot open output file `%s': %s"),
  	   output_name, db_strerror (status));
-@@ -388,3 +400,44 @@
+@@ -388,3 +400,55 @@
  
    return EXIT_SUCCESS;
  }
@@ -112,7 +112,7 @@
 +static void
 +set_file_creation_context (const char *outname, mode_t mode)
 +{
-+  static int enabled = -1;
++  static int enabled = -1, enforcing = -1;
 +  security_context_t ctx;
 +  /* Handle the "reset the context" case. */
 +  if (outname == NULL)
@@ -129,19 +129,30 @@
 +    {
 +      return;
 +    }
-+  /* Determine the context which the file should have. */
-+  ctx = NULL;
-+  if (matchpathcon (outname, S_IFREG | mode, &ctx) != 0)
++  /* Check if SELinux is enforcing, and remember. */
++  if (enforcing == -1)
 +    {
-+      error (EXIT_FAILURE, 0,
-+             gettext ("cannot determine file context for `%s'"), outname);
++      enforcing = security_getenforce();
 +    }
-+  if (ctx != NULL)
++  /* Determine the context which the file should have. */
++  ctx = NULL;
++  if ((matchpathcon (outname, S_IFREG | mode, &ctx) == 0) &&
++      (ctx != NULL))
 +    {
 +      if (setfscreatecon (ctx) != 0)
 +        {
-+          error (EXIT_FAILURE, 0,
-+                 gettext ("cannot set file creation context for `%s'"), outname);
++          if (enforcing)
++            {
++              error (EXIT_FAILURE, 0,
++                     gettext ("cannot set file creation context for `%s'"),
++                     outname);
++            }
++          else
++            {
++              error (0, 0,
++                     gettext ("cannot set file creation context for `%s'"),
++                     outname);
++            }
 +        }
 +      freecon (ctx);
 +    }


Index: nss_db.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nss_db/F-8/nss_db.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- nss_db.spec	14 Aug 2007 14:15:04 -0000	1.36
+++ nss_db.spec	3 Mar 2008 22:56:37 -0000	1.37
@@ -2,10 +2,11 @@
 Summary: An NSS library for the Berkeley DB
 Name: nss_db
 Version: 2.2
-Release: 38
+Release: 40%{?dist}
 Source: ftp://sources.redhat.com/pub/glibc/releases/nss_db-%{version}.tar.gz
 Source1: http://download.oracle.com/berkeley-db/db-%{db_version}.tar.gz
 Source2: db-getent-Makefile
+Source3: fail-setfscreatecon.c
 URL: http://sources.redhat.com/glibc/
 Patch0: nss_db-2.2-external.patch
 Patch1: nss_db-2.2-automake.patch
@@ -115,6 +116,17 @@
 %config(noreplace) /var/db/Makefile
 
 %changelog
+* Mon Mar  3 2008 Nalin Dahyabhai <nalin at redhat.com> - 2.2-40%{?dist}
+- add a dist tag to make pushing this same package as an update easier
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 2.2-40
+- Autorebuild for GCC 4.3
+
+* Tue Nov  6 2007 Nalin Dahyabhai <nalin at redhat.com> - 2.2-39
+- when setting file contexts for creation of new files, only fail outright
+  if we were in enforcing mode and the file needed to be given a specific
+  label (#368501)
+
 * Tue Aug 14 2007 Nalin Dahyabhai <nalin at redhat.com> - 2.2-38
 - adapt to open-is-a-macro cases
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/nss_db/F-8/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources	13 Aug 2007 22:21:18 -0000	1.7
+++ sources	3 Mar 2008 22:56:37 -0000	1.8
@@ -1,2 +1,2 @@
-c2565cbd4a941ba70e41391693c3252d  nss_db-2.2.tar.gz
 95768bd92fd48951a427fbab37b9088f  db-4.6.18.tar.gz
+c2565cbd4a941ba70e41391693c3252d  nss_db-2.2.tar.gz


--- nss_db-2.2-compat.patch DELETED ---




More information about the fedora-extras-commits mailing list