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: 12-Jan-2008 00:05:34
Branch: HEAD Handle: 2008011123053202
Modified files:
rpm CHANGES macros.in
rpm/lib rpmgi.c
rpm/rpmio rpmio.c
Log:
- permit opt-in network access using %_rpmgio macro.
- fix: deny rpmioSlurp network access (like all other Fopen call's).
Summary:
Revision Changes Path
1.2060 +2 -0 rpm/CHANGES
2.48 +3 -3 rpm/lib/rpmgi.c
1.228 +5 -1 rpm/macros.in
1.118 +1 -1 rpm/rpmio/rpmio.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2059 -r1.2060 CHANGES
--- rpm/CHANGES 11 Jan 2008 12:57:49 -0000 1.2059
+++ rpm/CHANGES 11 Jan 2008 23:05:32 -0000 1.2060
@@ -1,4 +1,6 @@
5.0.0 -> 5.1a1:
+ - jbj: permit opt-in network access using %_rpmgio macro.
+ - jbj: fix: deny rpmioSlurp network access (like all other Fopen call's).
- rse: add RPM Lua function rpm.slurp() for slurping in the whole
content of a file or an URL
- rse: add OSSP uuid support to RPM Lua via functions uuid.generate()
and uuid.describe()
- rpm.org: Assorted int -> size_t corrections for string lengths.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmgi.c
============================================================================
$ cvs diff -u -r2.47 -r2.48 rpmgi.c
--- rpm/lib/rpmgi.c 1 Dec 2007 17:54:30 -0000 2.47
+++ rpm/lib/rpmgi.c 11 Jan 2008 23:05:33 -0000 2.48
@@ -115,7 +115,7 @@
/[EMAIL PROTECTED] rpmGlobalMacroContext, h_errno, internalState @*/
/[EMAIL PROTECTED] gi, rpmGlobalMacroContext, h_errno, internalState @*/
{
- FD_t fd = rpmgiOpen(path, "r.fdio");
+ FD_t fd = rpmgiOpen(path, "r%{?_rpmgio}");
rpmRC rpmrc = RPMRC_FAIL;
if (fd != NULL) {
@@ -136,7 +136,7 @@
/[EMAIL PROTECTED] rpmGlobalMacroContext, h_errno, internalState @*/
/[EMAIL PROTECTED] gi, rpmGlobalMacroContext, h_errno, internalState @*/
{
- FD_t fd = rpmgiOpen(path, "r.fdio");
+ FD_t fd = rpmgiOpen(path, "r%{?_rpmgio}");
Header h = NULL;
if (fd != NULL) {
@@ -665,7 +665,7 @@
path = _free(path);
path = rpmExpand(_query_hdlist_path, NULL);
}
- gi->fd = rpmgiOpen(path, "rm.fdio");
+ gi->fd = rpmgiOpen(path, "rm%{?_rpmgio}");
gi->active = 1;
path = _free(path);
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/macros.in
============================================================================
$ cvs diff -u -r1.227 -r1.228 macros.in
--- rpm/macros.in 4 Jan 2008 22:20:47 -0000 1.227
+++ rpm/macros.in 11 Jan 2008 23:05:32 -0000 1.228
@@ -1,7 +1,7 @@
#/*! \page config_macros Default configuration: @USRLIBRPM@/macros
# \verbatim
#
-# $Id: macros.in,v 1.227 2008/01/04 22:20:47 rse Exp $
+# $Id: macros.in,v 1.228 2008/01/11 23:05:32 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
@@ -975,6 +975,10 @@
# Path for rpm -qH (default is /usr/share/comps/%{_arch}/hdlist)
%_query_hdlist_path %{_datadir}/comps/%{_arch}/hdlist
+#
+# Permit network access? (".fdio" prohibits network access)
+%_rpmgio .fdio
+
#==============================================================================
# ---- Run-time probe dependency macros.
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmio.c
============================================================================
$ cvs diff -u -r1.117 -r1.118 rpmio.c
--- rpm/rpmio/rpmio.c 16 Dec 2007 22:54:40 -0000 1.117
+++ rpm/rpmio/rpmio.c 11 Jan 2008 23:05:34 -0000 1.118
@@ -3836,7 +3836,7 @@
FD_t fd;
int rc = 0;
- fd = Fopen(fn, "r");
+ fd = Fopen(fn, "r%{?_rpmgio}");
if (fd == NULL || Ferror(fd)) {
rc = 2;
goto exit;
@@ .
______________________________________________________________________
RPM Package Manager http://rpm5.org
CVS Sources Repository [email protected]