Quick and dirty patch attempting to eliminate another setproctitle() crash, bug #981799.

epel9
Eric Smith 12 years ago
parent 5b63ea83fd
commit df3c31c11c

@ -0,0 +1,40 @@
diff -up libbsd-0.5.2/src/setproctitle.c.nosetproctitle libbsd-0.5.2/src/setproctitle.c
--- libbsd-0.5.2/src/setproctitle.c.nosetproctitle 2013-07-07 21:26:04.407952595 -0600
+++ libbsd-0.5.2/src/setproctitle.c 2013-07-07 21:28:56.859945939 -0600
@@ -1,3 +1,4 @@
+#define NO_SETPROCTITLE
/*
* Copyright © 2010 William Ahern
* Copyright © 2012-2013 Guillem Jover <guillem@hadrons.org>
@@ -156,6 +157,7 @@ spt_copyargs(int argc, char *argv[])
static void
spt_init(int argc, char *argv[], char *envp[])
{
+#ifdef NO_SETPROCTITLE
char *base, *end, *nul, *tmp;
int i, envc, error;
@@ -213,6 +215,7 @@ spt_init(int argc, char *argv[], char *e
SPT.nul = nul;
SPT.base = base;
SPT.end = end;
+#endif // NO_SETPROCTITLE
}
/*
@@ -230,6 +233,7 @@ void (*spt_init_func)(int argc, char *ar
void
setproctitle_impl(const char *fmt, ...)
{
+#ifdef NO_SETPROCTITLE
/* Use buffer in case argv[0] is passed. */
char buf[SPT_MAXTITLE + 1];
va_list ap;
@@ -279,6 +283,7 @@ setproctitle_impl(const char *fmt, ...)
*SPT.nul = ' ';
*++nul = '\0';
}
+#endif // NO_SETPROCTITLE
}
__asm__(".symver setproctitle_impl,setproctitle@@LIBBSD_0.5");

@ -1,6 +1,6 @@
Name: libbsd
Version: 0.5.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Library providing BSD-compatible functions for portability
URL: http://libbsd.freedesktop.org/
License: BSD and ISC and Copyright only and Public Domain
@ -8,6 +8,7 @@ Group: System Environment/Libraries
# BuildRoot tag necessary for EL5 only:
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz
Patch0: libbsd-0.5.2-nosetproctitle.patch
%description
libbsd provides useful functions commonly found on BSD systems, and
@ -26,6 +27,7 @@ Development files for the libbsd library.
%prep
%setup -q
%patch0 -p1 -b .nosetproctitle
%configure
@ -67,6 +69,10 @@ rm %{buildroot}%{_libdir}/%{name}.la
%{_libdir}/pkgconfig/%{name}-overlay.pc
%changelog
* Sun Jul 07 2013 Eric Smith <brouhaha@fedoraproject.org> - 0.5.2-3
- Still having problems with setproctitle(), bug #981799, upstream
freedesktop.org bug #66679. Added patch to noop out setproctitle().
* Tue Jun 11 2013 Eric Smith <brouhaha@fedoraproject.org> - 0.5.2-2
- Added check section.
- Add BuildRoot for EL5.

Loading…
Cancel
Save