RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   04-Sep-2014 15:50:22
  Branch: rpm-5_4                          Handle: 2014090413502200

  Modified files:           (Branch: rpm-5_4)
    rpm/rpmio               rpmsx.c

  Log:
    - selinux: ensure absolute path to contexts.

  Summary:
    Revision    Changes     Path
    2.4.4.2     +5  -1      rpm/rpmio/rpmsx.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmsx.c
  ============================================================================
  $ cvs diff -u -r2.4.4.1 -r2.4.4.2 rpmsx.c
  --- rpm/rpmio/rpmsx.c 15 Apr 2012 21:20:53 -0000      2.4.4.1
  +++ rpm/rpmio/rpmsx.c 4 Sep 2014 13:50:22 -0000       2.4.4.2
  @@ -104,11 +104,15 @@
   #if defined(WITH_SELINUX)
       if (fn == NULL)
        fn = selinux_file_context_path();
  +
       if (sx->flags)
        set_matchpathcon_flags(sx->flags);
       {        int rc;
        sx->fn = rpmGetPath(fn, NULL);
  -     rc = matchpathcon_init(sx->fn);
  +     if (sx->fn && sx->fn[0] == '/')
  +         rc = matchpathcon_init(sx->fn);
  +     else
  +         rc = -1;
        /* If matchpathcon_init fails, turn off SELinux functionality. */
        if (rc < 0)
            sx->fn = _free(sx->fn);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to