rpms/mgetty/FC-4 mgetty-1.1.33-sprintf_chk.patch, NONE, 1.1 mgetty-1.1.31-162174_tcflush.patch, 1.1, 1.2 mgetty.spec, 1.28, 1.29
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Jul 27 15:50:34 UTC 2005
- Previous message (by thread): rpms/mgetty/devel mgetty-1.1.33-sprintf_chk.patch, NONE, 1.1 mgetty-1.1.31-162174_tcflush.patch, 1.1, 1.2 mgetty.spec, 1.29, 1.30
- Next message (by thread): rpms/mgetty/FC-3 mgetty-1.1.31-162174_tcflush.patch, 1.1, 1.2 mgetty.spec, 1.24, 1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jvdias
Update of /cvs/dist/rpms/mgetty/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv24809
Modified Files:
mgetty-1.1.31-162174_tcflush.patch mgetty.spec
Added Files:
mgetty-1.1.33-sprintf_chk.patch
Log Message:
further fix for 162174: disable alarm before sleep; tcflush(1,TCOFLUSH) before exit() in sig_goodbye(); block signals before entering syslog(); workaround build system buffer overflow checks bug;
mgetty-1.1.33-sprintf_chk.patch:
record.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE mgetty-1.1.33-sprintf_chk.patch ---
--- mgetty-1.1.33/voice/libvoice/record.c.sprintf_chk 1999-07-24 17:26:49.000000000 -0400
+++ mgetty-1.1.33/voice/libvoice/record.c 2005-07-27 11:34:44.091956000 -0400
@@ -50,7 +50,7 @@
if (!cvd.raw_data.d.i)
{
memset(&header, 0x00, sizeof(rmd_header));
- sprintf(header.magic, "%s", "RMD1");
+ memcpy(&(header.magic[0]), "RMD1", 4);
sprintf(header.voice_modem_type, "%s", voice_modem_rmd_name);
header.compression = htons(cvd.rec_compression.d.i);
header.speed = htons(cvd.rec_speed.d.i);
mgetty-1.1.31-162174_tcflush.patch:
logfile.c | 33 +++++++++++++++++++++++++++++++++
logname.c | 4 +++-
mgetty.c | 1 +
3 files changed, 37 insertions(+), 1 deletion(-)
Index: mgetty-1.1.31-162174_tcflush.patch
===================================================================
RCS file: /cvs/dist/rpms/mgetty/FC-4/mgetty-1.1.31-162174_tcflush.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mgetty-1.1.31-162174_tcflush.patch 23 Jul 2005 00:29:44 -0000 1.1
+++ mgetty-1.1.31-162174_tcflush.patch 27 Jul 2005 15:50:30 -0000 1.2
@@ -1,11 +1,12 @@
---- mgetty-1.1.31/logname.c.162174_tcflush 2005-07-22 17:11:17.650852000 -0400
-+++ mgetty-1.1.31/logname.c 2005-07-22 17:13:13.114273000 -0400
-@@ -368,10 +368,11 @@
+--- mgetty-1.1.31/logname.c.161174_tcflush 2005-07-27 10:41:10.076619000 -0400
++++ mgetty-1.1.31/logname.c 2005-07-27 10:44:39.675810000 -0400
+@@ -368,10 +368,12 @@
{
printf( "\r\n\07\r\nYour login time (%d minutes) ran out. Goodbye.\r\n",
(max_login_time / 60)+1 );
-
-+ alarm(0); /* turn off alarm */
++ signal(SIGALRM,SIG_DFL);/* turn off alarm */
++ alarm(0);
sleep(3); /* give message time to xmit */
lprintf( L_AUDIT, "failed dev=%s, pid=%d, login time out",
Device, getpid() );
@@ -13,3 +14,78 @@
exit(0); /* bye bye... */
}
ch = CKILL; /* timeout #1 -> clear input */
+--- mgetty-1.1.31/mgetty.c.161174_tcflush 2003-11-17 14:09:41.000000000 -0500
++++ mgetty-1.1.31/mgetty.c 2005-07-27 10:41:43.155507000 -0400
+@@ -94,6 +94,7 @@
+ lprintf( L_AUDIT, "failed dev=%s, pid=%d, got signal %d, exiting",
+ Device, getpid(), signo );
+ rmlocks();
++ tcflush(1,TCOFLUSH);
+ exit(10);
+ }
+
+--- mgetty-1.1.31/logfile.c.161174_tcflush 2003-01-14 16:30:20.000000000 -0500
++++ mgetty-1.1.31/logfile.c 2005-07-27 10:43:49.279257000 -0400
+@@ -22,6 +22,7 @@
+ #endif
+
+ #ifdef SYSLOG
++#include <signal.h>
+ #include <syslog.h>
+
+ #if !defined(linux) && !defined(BSD) && !defined(_SCO_DS) && \
+@@ -212,6 +213,7 @@
+ int errnr;
+ char * p;
+ static int first_open = TRUE;
++sigset_t ss, oss;
+
+ if ( level > log_level ) /* log level high enough? */
+ {
+@@ -315,7 +317,24 @@
+ tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec, ws );
+ #ifdef SYSLOG
++ /* block all handled signals before syslog(), else an lprintf in
++ * a signal handler could deadlock
++ */
++ sigemptyset(&ss);
++ sigaddset(&ss, SIGALRM);
++ sigaddset(&ss, SIGCHLD);
++ sigaddset(&ss, SIGHUP);
++ sigaddset(&ss, SIGINT);
++ sigaddset(&ss, SIGPIPE);
++ sigaddset(&ss, SIGQUIT);
++ sigaddset(&ss, SIGTERM);
++ sigaddset(&ss, SIGUSR1);
++ sigaddset(&ss, SIGUSR2);
++ sigprocmask(SIG_BLOCK, &ss, &oss);
++
+ syslog( LOG_NOTICE, "%s", ws );
++
++ sigprocmask(SIG_SETMASK, &oss, 0L);
+ #endif
+ }
+ else if ( level != L_ERROR && level != L_FATAL )
+@@ -334,7 +353,21 @@
+ ( errnr <= sys_nerr ) ? sys_errlist[errnr]:
+ "<error not in list>" );
+ #ifdef SYSLOG
++ sigemptyset(&ss);
++ sigaddset(&ss, SIGALRM);
++ sigaddset(&ss, SIGCHLD);
++ sigaddset(&ss, SIGHUP);
++ sigaddset(&ss, SIGINT);
++ sigaddset(&ss, SIGPIPE);
++ sigaddset(&ss, SIGQUIT);
++ sigaddset(&ss, SIGTERM);
++ sigaddset(&ss, SIGUSR1);
++ sigaddset(&ss, SIGUSR2);
++ sigprocmask(SIG_BLOCK, &ss, &oss);
++
+ syslog( level == L_FATAL? LOG_ALERT: LOG_ERR, "%s: %m", ws );
++
++ sigprocmask(SIG_SETMASK, &oss, 0L);
+ #endif
+
+ #ifndef SYSLOG
Index: mgetty.spec
===================================================================
RCS file: /cvs/dist/rpms/mgetty/FC-4/mgetty.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mgetty.spec 23 Jul 2005 01:08:59 -0000 1.28
+++ mgetty.spec 27 Jul 2005 15:50:30 -0000 1.29
@@ -5,7 +5,7 @@
Summary: A getty replacement for use with data and fax modems.
Name: mgetty
Version: 1.1.33
-Release: 2_FC4
+Release: 3_FC4
Source: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Apr10.tar.gz
Source1: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Apr10.tar.gz.asc
Source2: logrotate.mgetty
@@ -29,6 +29,7 @@
Patch14: mgetty-1.1.31-sendmail_path.patch
Patch15: mgetty-1.1.31-lfs.patch
Patch16: mgetty-1.1.31-162174_tcflush.patch
+Patch17: mgetty-1.1.33-sprintf_chk.patch
License: GPL
Group: Applications/Communications
Prereq: /sbin/install-info
@@ -116,6 +117,7 @@
%patch14 -p1 -b .sendmail_path
%patch15 -p1 -b .lfs
%patch16 -p1 -b .162174_tcflush
+%patch17 -p1 -b .sprintf_chk
%build
PATH=$PATH:/usr/X11R6/bin
@@ -335,6 +337,10 @@
* Fri Jul 22 2005 Jason Vas Dias <jvdias at redhat.com> 1.1.31-10
- fix bug 162174: prevent uninterruptable hang on exit() when
direct line disconnected (kernel bug 164002)
+ do tcflush(1,TCOFLUSH) before exit() in sig_goodbye()
+ block signals before entering syslog()
+ workaround build system 'buffer overflow checks' bug:
+ use memcpy instead of sprintf in record.c, line 53
* Mon Apr 25 2005 Jason Vas Dias <jvdias at redhat.com> 1.1.33-1
- Upgrade to new upstream version 1.1.33
- Previous message (by thread): rpms/mgetty/devel mgetty-1.1.33-sprintf_chk.patch, NONE, 1.1 mgetty-1.1.31-162174_tcflush.patch, 1.1, 1.2 mgetty.spec, 1.29, 1.30
- Next message (by thread): rpms/mgetty/FC-3 mgetty-1.1.31-162174_tcflush.patch, 1.1, 1.2 mgetty.spec, 1.24, 1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list