rpms/minicom/devel minicom-2.3-drop-privs.patch, NONE, 1.1 minicom-2.3-gotodir.patch, NONE, 1.1 minicom-2.3-ncurses.patch, NONE, 1.1 minicom-2.3-rh.patch, NONE, 1.1 minicom-2.3-wchar.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 minicom.spec, 1.29, 1.30 sources, 1.6, 1.7 minicom-2.2-capture.patch, 1.1, NONE minicom-2.2-drop-privs.patch, 1.1, NONE minicom-2.2-gotodir.patch, 1.1, NONE minicom-2.2-ncurses.patch, 1.1, NONE minicom-2.2-rh.patch, 1.1, NONE minicom-2.2-setlocale.patch, 1.1, NONE minicom-2.2-sigs.patch, 1.1, NONE minicom-2.2-ttyerror.patch, 1.1, NONE minicom-2.2-wchar.patch, 1.1, NONE
Lubomir Kundrak (lkundrak)
fedora-extras-commits at redhat.com
Sun Feb 24 20:35:12 UTC 2008
Author: lkundrak
Update of /cvs/pkgs/rpms/minicom/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6453/devel
Modified Files:
.cvsignore minicom.spec sources
Added Files:
minicom-2.3-drop-privs.patch minicom-2.3-gotodir.patch
minicom-2.3-ncurses.patch minicom-2.3-rh.patch
minicom-2.3-wchar.patch
Removed Files:
minicom-2.2-capture.patch minicom-2.2-drop-privs.patch
minicom-2.2-gotodir.patch minicom-2.2-ncurses.patch
minicom-2.2-rh.patch minicom-2.2-setlocale.patch
minicom-2.2-sigs.patch minicom-2.2-ttyerror.patch
minicom-2.2-wchar.patch
Log Message:
2.3
minicom-2.3-drop-privs.patch:
--- NEW FILE minicom-2.3-drop-privs.patch ---
diff -urp minicom-2.3.orig/src/minicom.c minicom-2.3/src/minicom.c
--- minicom-2.3.orig/src/minicom.c 2008-02-02 23:49:53.000000000 +0100
+++ minicom-2.3/src/minicom.c 2008-02-24 20:45:35.000000000 +0100
@@ -1132,6 +1132,8 @@ int main(int argc, char **argv)
use_status = 1;
break;
case 'C': /* Capturing */
+ setegid(real_gid);
+ seteuid(real_uid);
capfp = sfopen(optarg, "a");
if (capfp == NULL) {
werror(_("Cannot open capture file"));
@@ -1139,6 +1141,8 @@ int main(int argc, char **argv)
}
docap = 1;
vt_set(addlf, -1, docap, -1, -1, -1, -1);
+ seteuid(eff_uid);
+ setegid(eff_gid);
break;
case 'S': /* start Script */
strncpy(scr_name, optarg, 33);
Only in minicom-2.3/src: minicom.c.orig
Only in minicom-2.3/src: minicom.c.rej
minicom-2.3-gotodir.patch:
--- NEW FILE minicom-2.3-gotodir.patch ---
--- minicom-2.2/src/file.c.gotodir 2005-08-14 22:39:30.000000000 +0200
+++ minicom-2.2/src/file.c 2007-03-09 10:59:51.000000000 +0100
@@ -277,6 +277,8 @@
int initial_y = (76 - (WHAT_NR_OPTIONS * WHAT_WIDTH >= 76
? 74 : WHAT_NR_OPTIONS * WHAT_WIDTH)) / 2;
size_t i;
+ int rval;
+ char * new_prev_dir;
cur = 0;
ocur = 0;
@@ -290,11 +292,6 @@
dprev = -1;
tag_cnt = 0;
- /* got to do some error-checking here!!! Maybe use mcd(), too! */
- if (prev_dir != NULL)
- free(prev_dir);
- prev_dir = getcwd(NULL, BUFSIZ);
-
/*
* get last directory
*/
@@ -324,7 +321,30 @@
if (strlen(work_dir) > 1 && work_dir[strlen(work_dir) - 1] == '/')
work_dir[strlen(work_dir) - 1] = (char)0;
- chdir(work_dir);
+ /* get the current working directory, which will become the prev_dir, on success */
+ new_prev_dir = getcwd(NULL, BUFSIZ);
+ if (new_prev_dir == NULL) {
+ return -1;
+ }
+
+ rval = chdir(work_dir);
+ if (rval == 0) {
+ /* was able to change to new working directory */
+ free(prev_dir);
+ prev_dir = new_prev_dir;
+ }
+ else {
+ /* Could not change to the new working directory */
+ mc_wbell();
+ werror(
+ _("Could not change to directory %s (%s)"),
+ work_dir,
+ strerror(errno));
+
+ /* restore the previous working directory */
+ free(work_dir);
+ work_dir = set_work_dir(new_prev_dir, strlen(new_prev_dir));
+ }
/* All right, draw the file directory! */
@@ -429,7 +449,7 @@
wredraw(dsub, 1);
}
- return 0;
+ return rval;
}
minicom-2.3-ncurses.patch:
--- NEW FILE minicom-2.3-ncurses.patch ---
diff -urp minicom-2.3.orig/configure minicom-2.3/configure
--- minicom-2.3.orig/configure 2008-02-24 11:45:38.000000000 +0100
+++ minicom-2.3/configure 2008-02-24 20:38:16.000000000 +0100
@@ -6718,7 +6718,7 @@ done
LIBS="$LIBS $TERMLIBS"
-if test "x$termlib" = xncurses; then
+if test "x$termlib" = xncurses || test "x$termlib" = xtinfo; then
for ac_header in ncurses/termcap.h
do
diff -urp minicom-2.3.orig/src/window.c minicom-2.3/src/window.c
--- minicom-2.3.orig/src/window.c 2008-02-24 21:04:29.000000000 +0100
+++ minicom-2.3/src/window.c 2008-02-24 21:05:17.000000000 +0100
@@ -28,7 +28,11 @@ RCSID("$Id: window.c,v 1.21 2008-02-06 2
#include <limits.h>
#include <stdarg.h>
#include <wchar.h>
-#include <termcap.h>
+#ifdef HAVE_TERMCAP_H
+# include <termcap.h>
+#elif defined (HAVE_NCURSES_TERMCAP_H)
+# include <ncurses/termcap.h>
+#endif
#include "port.h"
#include "minicom.h"
minicom-2.3-rh.patch:
--- NEW FILE minicom-2.3-rh.patch ---
diff -urp minicom-2.3.orig/src/main.c minicom-2.3/src/main.c
--- minicom-2.3.orig/src/main.c 2008-02-02 23:49:53.000000000 +0100
+++ minicom-2.3/src/main.c 2008-02-24 21:26:20.000000000 +0100
@@ -87,7 +87,7 @@ void leave(const char *s)
}
set_privs();
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
if (P_CALLIN[0])
fastsystem(P_CALLIN, NULL, NULL, NULL);
if (real_uid)
@@ -161,10 +161,13 @@ void term_socket_close(void)
int open_term(int doinit, int show_win_on_error)
{
struct stat stt;
+#ifdef NOTNOW
char buf[128];
- int fd, n = 0;
+ int fd;
int pid;
int mask;
+#endif
+ int n = 0;
#ifdef HAVE_ERRNO_H
int s_errno;
#endif
@@ -172,6 +175,8 @@ int open_term(int doinit, int show_win_o
/* Upgrade our status. */
set_privs();
+#ifdef NOTNOW
+
/* First see if the lock file directory is present. */
if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) {
@@ -243,6 +248,30 @@ int open_term(int doinit, int show_win_o
close(fd);
}
+#else
+ lockfile[0] = 0;
+ if (doinit >= 0) {
+ int rc = ttylock(dial_tty);
+ if (rc < 0) {
+ if (access(dial_tty, W_OK) == -1)
+ fprintf(stderr, _("Device %s access failed: %s.\n"),
+ dial_tty, strerror(errno));
+ else
+ fprintf(stderr, _("Device %s lock failed: %s.\n"),
+ dial_tty, strerror(-rc));
+ } else if (rc > 0) {
+ fprintf(stderr, _("Device %s is locked.\n"), dial_tty);
+ } else if (rc == 0) {
+ snprintf(lockfile, sizeof(lockfile), "%s", dial_tty);
+ }
+ if (rc) {
+ if (stdwin) mc_wclose(stdwin, 1);
+ drop_privs();
+ return(-1);
+ }
+ }
+#endif
+
/* Run a special program to disable callin if needed. */
if (doinit > 0 && P_CALLOUT[0]) {
if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) {
@@ -250,7 +279,7 @@ int open_term(int doinit, int show_win_o
mc_wclose(stdwin, 1);
fprintf(stderr, _("Could not setup for dial out.\n"));
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
drop_privs();
return -1;
}
@@ -310,12 +339,12 @@ int open_term(int doinit, int show_win_o
fprintf(stderr, _("minicom: cannot open %s. Sorry.\n"), dial_tty);
#endif
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
drop_privs();
return -1;
}
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
if (show_win_on_error)
werror(_("Cannot open %s!"), dial_tty);
drop_privs();
Only in minicom-2.3/src: main.c.orig
Only in minicom-2.3/src: main.c.rej
diff -urp minicom-2.3.orig/src/minicom.c minicom-2.3/src/minicom.c
--- minicom-2.3.orig/src/minicom.c 2008-02-24 21:21:30.000000000 +0100
+++ minicom-2.3/src/minicom.c 2008-02-24 21:26:07.000000000 +0100
@@ -1548,7 +1548,7 @@ dirty_goto:
set_privs();
keyboard(KUNINSTALL, 0);
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
close(portfd);
/* Please - if your system doesn't have uid_t and/or gid_t, define 'em
* conditionally in "port.h".
Only in minicom-2.3/src: minicom.c.orig
diff -urp minicom-2.3.orig/src/minicom.h minicom-2.3/src/minicom.h
--- minicom-2.3.orig/src/minicom.h 2008-02-02 23:49:53.000000000 +0100
+++ minicom-2.3/src/minicom.h 2008-02-24 21:26:07.000000000 +0100
@@ -35,6 +35,8 @@
#include <time.h>
+#include <baudboy.h>
+
#ifdef USE_SOCKET
#include <sys/socket.h>
#include <sys/un.h>
@@ -84,7 +86,7 @@ EXTERN int tempst; /* Status line is tem
EXTERN int escape; /* Escape code. */
EXTERN int disable_online_time; /* disable online time display */
-EXTERN char lockfile[128]; /* UUCP lock file of terminal */
+EXTERN char lockfile[1024]; /* UUCP lock file of terminal */
EXTERN char homedir[256]; /* Home directory of user */
EXTERN char logfname[PARS_VAL_LEN]; /* Name of the logfile */
EXTERN char username[16]; /* Who is using minicom? */
Only in minicom-2.3/src: minicom.h.orig
diff -urp minicom-2.3.orig/src/updown.c minicom-2.3/src/updown.c
--- minicom-2.3.orig/src/updown.c 2007-10-10 22:18:20.000000000 +0200
+++ minicom-2.3/src/updown.c 2008-02-24 21:26:07.000000000 +0100
@@ -384,8 +384,10 @@ void kermit(void)
{
int status;
int pid, n;
+#ifdef NOTNOW
char buf[81];
int fd;
+#endif
/* Clear screen, set keyboard modes etc. */
mc_wleave();
@@ -399,7 +401,7 @@ void kermit(void)
/* Remove lockfile */
set_privs();
if (lockfile[0])
- unlink(lockfile);
+ ttyunlock(lockfile);
setgid((gid_t)real_gid);
setuid((uid_t)real_uid);
@@ -420,6 +422,7 @@ void kermit(void)
/* Re-create lockfile */
if (lockfile[0]) {
set_privs();
+#ifdef NOTNOW
n = umask(022);
/* Create lockfile compatible with UUCP-1.2 */
if ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) {
@@ -431,6 +434,9 @@ void kermit(void)
close(fd);
}
umask(n);
+#else
+ ttylock(lockfile);
+#endif
drop_privs();
}
m_flush(portfd);
Only in minicom-2.3/src: updown.c.orig
minicom-2.3-wchar.patch:
--- NEW FILE minicom-2.3-wchar.patch ---
diff -urp minicom-2.3.orig/src/minicom.c minicom-2.3/src/minicom.c
--- minicom-2.3.orig/src/minicom.c 2008-02-24 20:46:09.000000000 +0100
+++ minicom-2.3/src/minicom.c 2008-02-24 20:48:03.000000000 +0100
@@ -31,7 +31,6 @@
RCSID(PKG_VER "$Id: minicom.c,v 1.34 2008-02-02 22:49:53 al-guest Exp $")
#include <getopt.h>
-#include <wchar.h>
#include <wctype.h>
#define EXTERN
Only in minicom-2.3/src: minicom.c.wchar
diff -urp minicom-2.3.orig/src/window.c minicom-2.3/src/window.c
--- minicom-2.3.orig/src/window.c 2008-02-24 21:06:29.000000000 +0100
+++ minicom-2.3/src/window.c 2008-02-24 21:06:42.000000000 +0100
@@ -27,7 +27,6 @@ RCSID("$Id: window.c,v 1.21 2008-02-06 2
#include <limits.h>
#include <stdarg.h>
-#include <wchar.h>
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#elif defined (HAVE_NCURSES_TERMCAP_H)
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 9 Mar 2007 12:19:02 -0000 1.6
+++ .cvsignore 24 Feb 2008 20:34:38 -0000 1.7
@@ -1 +1 @@
-minicom-2.2.tar.gz
+minicom-2.3.tar.gz
Index: minicom.spec
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/minicom.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- minicom.spec 19 Feb 2008 14:04:37 -0000 1.29
+++ minicom.spec 24 Feb 2008 20:34:38 -0000 1.30
@@ -1,7 +1,7 @@
Summary: A text-based modem control and terminal emulation program
Name: minicom
-Version: 2.2
-Release: 6%{?dist}
+Version: 2.3
+Release: 1%{?dist}
URL: http://alioth.debian.org/projects/minicom/
License: GPLv2+
Group: Applications/Communications
@@ -10,21 +10,17 @@
BuildRequires: lockdev-devel ncurses-devel
Requires: lockdev lrzsz
-Source: minicom-%{version}.tar.gz
+Source0: http://alioth.debian.org/frs/download.php/2332/minicom-2.3.tar.gz
-Patch1: minicom-2.2-ncurses.patch
-Patch2: minicom-2.2-drop-privs.patch
-Patch3: minicom-2.2-wchar.patch
+Patch1: minicom-2.3-ncurses.patch
+Patch2: minicom-2.3-drop-privs.patch
+Patch3: minicom-2.3-wchar.patch
Patch4: minicom-2.2-umask.patch
-Patch5: minicom-2.2-setlocale.patch
Patch6: minicom-2.2-spaces.patch
-Patch7: minicom-2.2-gotodir.patch
-Patch8: minicom-2.2-rh.patch
+Patch7: minicom-2.3-gotodir.patch
+Patch8: minicom-2.3-rh.patch
Patch9: minicom-2.2-esc.patch
Patch10: minicom-2.2-staticbuf.patch
-Patch11: minicom-2.2-sigs.patch
-Patch12: minicom-2.2-ttyerror.patch
-Patch13: minicom-2.2-capture.patch
%description
Minicom is a simple text-based modem control and terminal emulation
@@ -35,18 +31,14 @@
%prep
%setup -q
%patch1 -p1 -b .ncurses
-%patch2 -p1 -b .privs
+%patch2 -p1 -b .drop-privs
%patch3 -p1 -b .wchar
%patch4 -p1 -b .umask
-%patch5 -p1 -b .setlocale
%patch6 -p1 -b .spaces
%patch7 -p1 -b .gotodir
%patch8 -p1 -b .rh
%patch9 -p1 -b .esc
%patch10 -p1 -b .staticbuf
-%patch11 -p1 -b .sigs
-%patch12 -p1 -b .ttyerror
-%patch13 -p1 -b .capture
%build
%configure
@@ -75,6 +67,9 @@
%{_mandir}/man1/*
%changelog
+* Sun Feb 24 2008 Lubomir Kundrak <lkundrak at redhat.com> 2.3-1
+- 2.3
+
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 2.2-6
- Autorebuild for GCC 4.3
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources 9 Mar 2007 12:19:02 -0000 1.6
+++ sources 24 Feb 2008 20:34:38 -0000 1.7
@@ -1 +1 @@
-13933c8777839f00e3730df23599dc93 minicom-2.2.tar.gz
+0ebe7a91898384ca906787cc4e2c3f25 minicom-2.3.tar.gz
--- minicom-2.2-capture.patch DELETED ---
--- minicom-2.2-drop-privs.patch DELETED ---
--- minicom-2.2-gotodir.patch DELETED ---
--- minicom-2.2-ncurses.patch DELETED ---
--- minicom-2.2-rh.patch DELETED ---
--- minicom-2.2-setlocale.patch DELETED ---
--- minicom-2.2-sigs.patch DELETED ---
--- minicom-2.2-ttyerror.patch DELETED ---
--- minicom-2.2-wchar.patch DELETED ---
More information about the fedora-extras-commits
mailing list