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

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   02-Apr-2008 23:10:53
  Branch: HEAD                             Handle: 2008040221105200

  Modified files:
    rpm                     CHANGES VENDOR
    rpm/lib                 poptALL.c
    rpm/rpmio               macro.c rpmlua.c

  Log:
    - jbj: merge "security-sanity-check-rpmpopt-and-rpmmacros" patch from
    OpenPKG.

  Summary:
    Revision    Changes     Path
    1.2283      +1  -0      rpm/CHANGES
    2.46        +0  -30     rpm/VENDOR
    2.89        +1  -3      rpm/lib/poptALL.c
    2.193       +0  -4      rpm/rpmio/macro.c
    2.51        +0  -2      rpm/rpmio/rpmlua.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2282 -r1.2283 CHANGES
  --- rpm/CHANGES       2 Apr 2008 21:06:31 -0000       1.2282
  +++ rpm/CHANGES       2 Apr 2008 21:10:52 -0000       1.2283
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.1a1:
  +    - jbj: merge "security-sanity-check-rpmpopt-and-rpmmacros" patch from 
OpenPKG.
       - jbj: merge "no-extra-terminating-newline-on-eval" patch from OpenPKG.
       - jbj: merge "explicit-source-fetch-cli-option" patch from OpenPKG.
       - jbj: merge "download-source-files-from-original-location" patch from 
OpenPKG.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/VENDOR
  ============================================================================
  $ cvs diff -u -r2.45 -r2.46 VENDOR
  --- rpm/VENDOR        2 Apr 2008 21:06:31 -0000       2.45
  +++ rpm/VENDOR        2 Apr 2008 21:10:52 -0000       2.46
  @@ -330,36 +330,6 @@
        Reason:         [see scripts/integrity.txt for detailed documentation]
        ________________________________________________________________________
   
  -     Change:         security-sanity-check-rpmpopt-and-rpmmacros
  -     Purpose:        Support secure loading of "rpmpopt" and "rpmmacros"
  -                     from relative paths.
  -     Reason:         In OpenPKG we want to use "local"
  -                     ".openpkg/{rpmpopt,rpmmacros} files in order
  -                     to support flexible and path-independent build
  -                     environments for package development. For this we
  -                     build RPM with --with-path-rpmpopt="$RPMPOPT" and
  -                     --with-path-macros="$RPMMACROS" and calculate the
  -                     paths as following:
  -                       RPMPOPT="%{l_prefix}/lib/openpkg/rpmpopt"
  -                       RPMPOPT="$RPMPOPT:%{l_prefix}/etc/openpkg/rpmpopt"
  -                       RPMPOPT="$RPMPOPT:%{l_prefix}/etc/openpkg/rpmpopt.d/*"
  -                       RPMPOPT="$RPMPOPT:~/.openpkg/rpmpopt"
  -                       RPMPOPT="$RPMPOPT:@../../.openpkg/rpmpopt"
  -                       RPMPOPT="$RPMPOPT:@../.openpkg/rpmpopt"
  -                       RPMPOPT="$RPMPOPT:@./.openpkg/rpmpopt"
  -                       RPMMACROS="%{l_prefix}/lib/openpkg/macros"
  -                       
RPMMACROS="$RPMMACROS:%{l_prefix}/etc/openpkg/rpmmacros"
  -                       
RPMMACROS="$RPMMACROS:%{l_prefix}/etc/openpkg/rpmmacros.d/*"
  -                       RPMMACROS="$RPMMACROS:~/.openpkg/rpmmacros"
  -                       RPMMACROS="$RPMMACROS:@../../.openpkg/rpmmacros"
  -                       RPMMACROS="$RPMMACROS:@../.openpkg/rpmmacros"
  -                       RPMMACROS="$RPMMACROS:@./.openpkg/rpmmacros"
  -                     This means that the files from relative paths
  -                     (which we do not control) should be only loaded if
  -                     they pass an explicitly requested (via prefix "@"
  -                     for "attention") security check.
  -     ________________________________________________________________________
  -
        Change:         support-rpmpopt-option
        Purpose:        Support the special CLI option --rpmpopt to
                        on-the-fly override hard-coded path of the Autoconf 
option
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.88 -r2.89 poptALL.c
  --- rpm/lib/poptALL.c 2 Apr 2008 21:06:31 -0000       2.88
  +++ rpm/lib/poptALL.c 2 Apr 2008 21:10:52 -0000       2.89
  @@ -555,7 +555,6 @@
           /* work-off each resulting file from the path element */
           for (i = 0; i < ac; i++) {
            const char *fn = av[i];
  -#if defined(RPM_VENDOR_OPENPKG) /* 
security-sanity-check-rpmpopt-and-rpmmacros */
            if (fn[0] == '@' /* attention */) {
                fn++;
                if (!rpmSecuritySaneFile(fn)) {
  @@ -563,8 +562,7 @@
                    continue;
                }
            }
  -#endif
  -         (void)poptReadConfigFile(optCon, fn);
  +         (void) poptReadConfigFile(optCon, fn);
               av[i] = _free(av[i]);
           }
           av = _free(av);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/macro.c
  ============================================================================
  $ cvs diff -u -r2.192 -r2.193 macro.c
  --- rpm/rpmio/macro.c 16 Mar 2008 09:27:10 -0000      2.192
  +++ rpm/rpmio/macro.c 2 Apr 2008 21:10:52 -0000       2.193
  @@ -1807,7 +1807,6 @@
       return rc;
   }
   
  -#if defined(RPM_VENDOR_OPENPKG) /* 
security-sanity-check-rpmpopt-and-rpmmacros */
   int rpmSecuritySaneFile(const char *filename)
   {
       struct stat sb;
  @@ -1824,7 +1823,6 @@
           return 0;
       return 1;
   }
  -#endif
   
   #if !defined(DEBUG_MACROS)
   /* =============================================================== */
  @@ -2324,7 +2322,6 @@
            size_t slen = strlen(av[i]);
            const char *fn = av[i];
   
  -#if defined(RPM_VENDOR_OPENPKG) /* 
security-sanity-check-rpmpopt-and-rpmmacros */
           if (fn[0] == '@' /* attention */) {
               fn++;
               if (!rpmSecuritySaneFile(fn)) {
  @@ -2332,7 +2329,6 @@
                   continue;
               }
           }
  -#endif
   
        /* Skip backup files and %config leftovers. */
   #define      _suffix(_s, _x) \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlua.c
  ============================================================================
  $ cvs diff -u -r2.50 -r2.51 rpmlua.c
  --- rpm/rpmio/rpmlua.c        15 Mar 2008 03:27:40 -0000      2.50
  +++ rpm/rpmio/rpmlua.c        2 Apr 2008 21:10:52 -0000       2.51
  @@ -149,7 +149,6 @@
           /* work-off each resulting file from the path element */
           for (i = 0; i < ac; i++) {
               const char *fn = av[i];
  -#if defined(RPM_VENDOR_OPENPKG) /* 
security-sanity-check-rpmpopt-and-rpmmacros */
               if (fn[0] == '@' /* attention */) {
                   fn++;
                   if (!rpmSecuritySaneFile(fn)) {
  @@ -157,7 +156,6 @@
                       continue;
                   }
               }
  -#endif
               if (Stat(fn, &st) != -1)
                   (void)rpmluaRunScriptFile(lua, fn);
               av[i] = _free(av[i]);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to