forked from pool/ipmitool
This commit is contained in:
parent
0ae21f1afc
commit
51141e233a
@ -1,22 +1,7 @@
|
|||||||
Fix security hole -> wrong file permission
|
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-ipmitool-1.8.12/lib/helper.c ./lib/helper.c
|
||||||
|
--- ../orig-ipmitool-1.8.12/lib/helper.c 2012-08-03 19:07:07.000000000 +0200
|
||||||
Reference:
|
+++ ./lib/helper.c 2013-02-28 13:46:20.139280500 +0100
|
||||||
https://bugzillafiles.novell.org/attachment.cgi?id=206754&t=hMTMCz2m9Q
|
@@ -593,7 +593,6 @@
|
||||||
|
|
||||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
||||||
Signed-off-by: Wilken Gottwalt <ajohansson@novell.com>
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/helper.c | 1 -
|
|
||||||
src/ipmievd.c | 3 +++
|
|
||||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: ipmitool-1.8.11/lib/helper.c
|
|
||||||
===================================================================
|
|
||||||
--- ipmitool-1.8.11.orig/lib/helper.c
|
|
||||||
+++ ipmitool-1.8.11/lib/helper.c
|
|
||||||
@@ -427,7 +427,6 @@ ipmi_start_daemon(struct ipmi_intf *intf
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chdir("/");
|
chdir("/");
|
||||||
@ -24,11 +9,10 @@ Index: ipmitool-1.8.11/lib/helper.c
|
|||||||
|
|
||||||
for (fd=0; fd<64; fd++) {
|
for (fd=0; fd<64; fd++) {
|
||||||
if (fd != intf->fd)
|
if (fd != intf->fd)
|
||||||
Index: ipmitool-1.8.11/src/ipmievd.c
|
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-ipmitool-1.8.12/src/ipmievd.c ./src/ipmievd.c
|
||||||
===================================================================
|
--- ../orig-ipmitool-1.8.12/src/ipmievd.c 2012-05-01 18:59:23.000000000 +0200
|
||||||
--- ipmitool-1.8.11.orig/src/ipmievd.c
|
+++ ./src/ipmievd.c 2013-02-28 13:47:23.777788780 +0100
|
||||||
+++ ipmitool-1.8.11/src/ipmievd.c
|
@@ -691,6 +691,7 @@
|
||||||
@@ -687,6 +687,7 @@ ipmievd_main(struct ipmi_event_intf * ei
|
|
||||||
int i, rc;
|
int i, rc;
|
||||||
int daemon = 1;
|
int daemon = 1;
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
@ -36,13 +20,14 @@ Index: ipmitool-1.8.11/src/ipmievd.c
|
|||||||
|
|
||||||
memset(pidfile, 0, 64);
|
memset(pidfile, 0, 64);
|
||||||
sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
|
sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
|
||||||
@@ -744,7 +745,9 @@ ipmievd_main(struct ipmi_event_intf * ei
|
@@ -752,8 +753,9 @@
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
ipmi_start_daemon(eintf->intf);
|
||||||
|
|
||||||
|
- umask(022);
|
||||||
+ oldumask = umask(022);
|
+ oldumask = umask(022);
|
||||||
fp = ipmi_open_file_write(pidfile);
|
fp = ipmi_open_file_write(pidfile);
|
||||||
+ umask(oldumask);
|
+ umask(oldumask);
|
||||||
if (fp != NULL) {
|
if (fp == NULL) {
|
||||||
fprintf(fp, "%d\n", (int)getpid());
|
/* Failed to get fp on PID file -> exit. */
|
||||||
fclose(fp);
|
log_halt();
|
||||||
|
Loading…
Reference in New Issue
Block a user