Accepting request 116438 from Base:System
- Add two patch from upstream + Avoid crash for exported environment for processes init spawns - Fix typo as the script for powerd (bnc#758920) OBS-URL: https://build.opensuse.org/request/show/116438 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysvinit?expand=0&rev=140
This commit is contained in:
commit
77311f5cd0
@ -1,8 +1,6 @@
|
|||||||
Index: src/init.c
|
--- src/init.c
|
||||||
===================================================================
|
+++ src/init.c 2012-05-04 13:56:17.470065199 +0200
|
||||||
--- src/init.c (revision 113)
|
@@ -252,7 +252,7 @@ void *imalloc(size_t size)
|
||||||
+++ src/init.c (working copy)
|
|
||||||
@@ -248,7 +248,7 @@ void *imalloc(size_t size)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -11,7 +9,7 @@ Index: src/init.c
|
|||||||
{
|
{
|
||||||
char *m;
|
char *m;
|
||||||
int l;
|
int l;
|
||||||
@@ -880,6 +880,27 @@ void initlog(int loglevel, char *s, ...)
|
@@ -884,6 +884,27 @@ void initlog(int loglevel, char *s, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +37,7 @@ Index: src/init.c
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Build a new environment for execve().
|
* Build a new environment for execve().
|
||||||
@@ -888,7 +909,7 @@ char **init_buildenv(int child)
|
@@ -892,35 +913,40 @@ char **init_buildenv(int child)
|
||||||
{
|
{
|
||||||
char i_lvl[] = "RUNLEVEL=x";
|
char i_lvl[] = "RUNLEVEL=x";
|
||||||
char i_prev[] = "PREVLEVEL=x";
|
char i_prev[] = "PREVLEVEL=x";
|
||||||
@ -48,17 +46,20 @@ Index: src/init.c
|
|||||||
char i_shell[] = "SHELL=" SHELL;
|
char i_shell[] = "SHELL=" SHELL;
|
||||||
char **e;
|
char **e;
|
||||||
int n, i;
|
int n, i;
|
||||||
@@ -898,25 +919,30 @@ char **init_buildenv(int child)
|
|
||||||
n += NR_EXTRA_ENV;
|
for (n = 0; environ[n]; n++)
|
||||||
|
;
|
||||||
|
- n += NR_EXTRA_ENV;
|
||||||
|
+ n += NR_EXTRA_ENV + 1; /* Also room for last NULL */
|
||||||
if (child)
|
if (child)
|
||||||
n += 8;
|
n += 8;
|
||||||
- e = calloc(n, sizeof(char *));
|
- e = calloc(n, sizeof(char *));
|
||||||
|
+
|
||||||
+ while ((e = (char**)calloc(n, sizeof(char *))) == NULL) {
|
+ while ((e = (char**)calloc(n, sizeof(char *))) == NULL) {
|
||||||
+ initlog(L_VB, "out of memory");
|
+ initlog(L_VB, "out of memory");
|
||||||
+ do_sleep(5);
|
+ do_sleep(5);
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
for (n = 0; environ[n]; n++)
|
for (n = 0; environ[n]; n++)
|
||||||
e[n] = istrdup(environ[n]);
|
e[n] = istrdup(environ[n]);
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ Index: src/init.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
e[n++] = NULL;
|
e[n++] = NULL;
|
||||||
@@ -2133,41 +2159,46 @@ void fifo_new_level(int level)
|
@@ -2146,41 +2172,46 @@ void fifo_new_level(int level)
|
||||||
static
|
static
|
||||||
void initcmd_setenv(char *data, int size)
|
void initcmd_setenv(char *data, int size)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 4 12:47:47 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
- Add two patch from upstream
|
||||||
|
+ Avoid crash for exported environment for processes init spawns
|
||||||
|
- Fix typo as the script for powerd (bnc#758920)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 16 08:18:25 UTC 2012 - mvyskocil@suse.cz
|
Mon Apr 16 08:18:25 UTC 2012 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ Patch21: powerd-%{PDVER}-getaddrinfo.patch
|
|||||||
Patch30: killproc-%{KPVER}.dif
|
Patch30: killproc-%{KPVER}.dif
|
||||||
Patch40: showconsole-%{SCVER}.dif
|
Patch40: showconsole-%{SCVER}.dif
|
||||||
Patch50: startpar-%{START}.dif
|
Patch50: startpar-%{START}.dif
|
||||||
Requires: sysvinit-tools
|
|
||||||
Requires: mingetty
|
Requires: mingetty
|
||||||
|
Requires: sysvinit-tools
|
||||||
|
|
||||||
%description
|
%description
|
||||||
System V style init programs by Miquel van Smoorenburg that control the
|
System V style init programs by Miquel van Smoorenburg that control the
|
||||||
@ -227,7 +227,7 @@ popd
|
|||||||
chmod 444 ${RPM_BUILD_ROOT}%{_mandir}/man?/*
|
chmod 444 ${RPM_BUILD_ROOT}%{_mandir}/man?/*
|
||||||
|
|
||||||
%preun tools
|
%preun tools
|
||||||
%stop_on_removal powered
|
%stop_on_removal powerd
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build -a -x /sbin/init; then
|
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build -a -x /sbin/init; then
|
||||||
@ -244,7 +244,7 @@ if test -x /sbin/mkinitrd_setup; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%postun tools
|
%postun tools
|
||||||
%restart_on_update powered
|
%restart_on_update powerd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
if test -x /sbin/mkinitrd_setup; then
|
if test -x /sbin/mkinitrd_setup; then
|
||||||
mkinitrd_setup
|
mkinitrd_setup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user