Hello community, here is the log from the commit of package tkrat for openSUSE:Factory checked in at 2011-12-25 17:42:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tkrat (Old) and /work/SRC/openSUSE:Factory/.tkrat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tkrat", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/tkrat/tkrat.changes 2011-09-23 12:48:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.tkrat.new/tkrat.changes 2011-12-25 17:42:33.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Dec 21 11:42:12 UTC 2011 - [email protected] + +- Use the latest CVS snapshot from 2010-07-21. +- Apply the last fix to blt_busy.so as well. +- %{?_smp_mflags} breaks build, so don't use it. + +------------------------------------------------------------------- +Fri Oct 7 14:34:16 UTC 2011 - [email protected] + +- Fix build with newer Tcl that doesn't use RTLD_GLOBAL anymore. + +------------------------------------------------------------------- Old: ---- tkrat-2.2-20071230.tar.bz2 New: ---- tkrat-2.2-20100721.tar.bz2 tkrat-load.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tkrat.spec ++++++ --- /var/tmp/diff_new_pack.0z9vkB/_old 2011-12-25 17:42:34.000000000 +0100 +++ /var/tmp/diff_new_pack.0z9vkB/_new 2011-12-25 17:42:34.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package tkrat (Version 2.2) +# spec file for package tkrat # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,21 +15,24 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: tkrat Url: http://www.tkrat.org -BuildRequires: openssl-devel pam-devel tk-devel xorg-x11-devel -License: BSD 3-Clause +BuildRequires: openssl-devel +BuildRequires: pam-devel +BuildRequires: tk-devel +BuildRequires: xorg-x11-devel +License: BSD-3-Clause Group: Productivity/Networking/Email/Clients AutoReqProv: on Version: 2.2 Release: 50 Summary: A very mighty, graphical emailclient -Source0: tkrat-2.2-20071230.tar.bz2 +Source0: tkrat-2.2-20100721.tar.bz2 Patch0: tkrat.patch Patch1: tkrat-warnings.patch +Patch2: tkrat-load.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -39,35 +42,28 @@ MIME-encoded e-mail, has a nice mail monitor, can sync e-mail for offline work, and has many other nice features. - - -Authors: --------- - [email protected] - %prep %setup -q -n %name %patch0 %patch1 +%patch2 -p 1 %build export CFLAGS="%optflags -fno-strict-aliasing" export CC=gcc -./configure \ +%configure \ --prefix=%_prefix \ --libdir=%tcl_archdir \ --datadir=%tcl_noarchdir \ --with-tkconfig=%_libdir \ --mandir=%_mandir -make CC=gcc +# tkrat's build system doesn not support make -j +make %install rm -rf %buildroot make install INSTALL_PREFIX=%buildroot -%clean -rm -rf %buildroot - %files %defattr(-,root,root) %_prefix/bin/tkrat ++++++ tkrat-2.2-20071230.tar.bz2 -> tkrat-2.2-20100721.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/configure new/tkrat/configure --- old/tkrat/configure 2007-04-16 06:55:38.000000000 +0200 +++ new/tkrat/configure 2009-06-28 21:48:39.000000000 +0200 @@ -3128,7 +3128,49 @@ { (exit 1); exit 1; }; } fi else - # Extract the first word of "tclsh8.5", so it can be a program name with args. + # Extract the first word of "tclsh8.6", so it can be a program name with args. +set dummy tclsh8.6; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_tclsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $tclsh in + [\\/]* | ?:[\\/]*) + ac_cv_path_tclsh="$tclsh" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_tclsh="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +tclsh=$ac_cv_path_tclsh +if test -n "$tclsh"; then + { echo "$as_me:$LINENO: result: $tclsh" >&5 +echo "${ECHO_T}$tclsh" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + tv=8.6 + if test "x$tclsh" = "x"; then + # Extract the first word of "tclsh8.5", so it can be a program name with args. set dummy tclsh8.5; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } @@ -3168,7 +3210,8 @@ fi - tv=8.5 + tv=8.5 + fi if test "x$tclsh" = "x"; then # Extract the first word of "tclsh8.4", so it can be a program name with args. set dummy tclsh8.4; ac_word=$2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/configure.in new/tkrat/configure.in --- old/tkrat/configure.in 2007-04-16 06:55:38.000000000 +0200 +++ new/tkrat/configure.in 2009-06-28 21:48:39.000000000 +0200 @@ -113,8 +113,12 @@ AC_MSG_ERROR('Can not find tcl/tk $required_tcl_version in path') fi else - AC_PATH_PROG(tclsh, tclsh8.5, , $PATH) - tv=8.5 + AC_PATH_PROG(tclsh, tclsh8.6, , $PATH) + tv=8.6 + if test "x$tclsh" = "x"; then + AC_PATH_PROG(tclsh, tclsh8.5, , $PATH) + tv=8.5 + fi if test "x$tclsh" = "x"; then AC_PATH_PROG(tclsh, tclsh8.4, , $PATH) tv=8.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/Makefile new/tkrat/doc/Makefile --- old/tkrat/doc/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/tkrat/doc/Makefile 2011-12-21 13:30:41.000000000 +0100 @@ -0,0 +1,37 @@ +############################################################################# +# TkRat software and its included text is Copyright 1996-2004 by # +# Martin Forssen. # +# # +# The full text of the legal notices is contained in the file called # +# COPYRIGHT, included with this distribution. # +############################################################################# + +# Installation directories + datarootdir = ${prefix}/share + prefix = /usr/local + exec_prefix = ${prefix} + MAN_DIR = ${datarootdir}/man + BIN_DIR = ${exec_prefix}/bin + DATA_DIR = ${datarootdir}/`echo tkrat${VERSION} | sed '${TRANSFORM}'` + LIB_DIR = ${exec_prefix}/lib64/`echo tkrat${VERSION} | sed '${TRANSFORM}'` + + INSTALL = /usr/bin/install -c +INSTALL_PREFIX = + +#-------- No changes should be done below -------- +TARGETS = tkrat.1 + +all: ${TARGETS} + +install.shared: ${TARGETS} + if test ! -d ${INSTALL_PREFIX}${MAN_DIR} ; then \ + ${INSTALL} -m 0755 -d ${INSTALL_PREFIX}${MAN_DIR} ;\ + fi + if test ! -d ${INSTALL_PREFIX}${MAN_DIR}/man1 ; then \ + ${INSTALL} -m 0755 -d ${INSTALL_PREFIX}${MAN_DIR}/man1 ;\ + fi + ${INSTALL} -m 0644 tkrat.1 ${INSTALL_PREFIX}${MAN_DIR}/man1/tkrat.1 + +install: install.shared + +clean: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/Makefile.in new/tkrat/doc/Makefile.in --- old/tkrat/doc/Makefile.in 2004-07-09 19:43:51.000000000 +0200 +++ new/tkrat/doc/Makefile.in 2009-06-28 21:49:19.000000000 +0200 @@ -7,6 +7,7 @@ ############################################################################# # Installation directories + datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ MAN_DIR = @mandir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/changes new/tkrat/doc/changes --- old/tkrat/doc/changes 2007-12-30 15:48:14.000000000 +0100 +++ new/tkrat/doc/changes 2010-07-08 21:09:54.000000000 +0200 @@ -1,6 +1,15 @@ This file lists the changes made to TkRat between versions. It is much more detailed than the changes shown to the user when starting a new version. +100708: (bug fix) Fixed sending on some linuxes + +100105: (bug fix) Fixed various issues with how bad passphrases where + handled when signing or decrypting messages. + +100105: (bug fix) Fixed bug in advanced pop mode of first use wizard. + +090630: (bug fix) Fixed a number of compilation warnings. + 071230: (bug fix) Handle new configure events generated by tcl/tk 8.5. 070917: (bug fix) Do not dump core if getpwuid() fails. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/doc/features new/tkrat/doc/features --- old/tkrat/doc/features 2005-02-23 07:11:53.000000000 +0100 +++ new/tkrat/doc/features 2009-06-28 21:49:51.000000000 +0200 @@ -1,23 +1,20 @@ CURRENT +gmail + imap.gmail.com BUGS -#What happens when one mistypes the pgp passphrase: later +Move two (flagged) messages from spam to inbox causes it to download all messages again MUST TODO -+ Make spell-check and sorting be set globally... -Upfdate to latest c-client -Look through preferences (weed) -Autocomplete addresses -Remember dir between sessions... +Color icon? -Setting for date format in msglist +Hotkeys for moving email to folders +Create groups on dates +Search LDAP when entering address +New imap toolkit Better keydef window -Concatenate flag updates when uploading local to disconnected. -Add support for tnef helper program -Look at combobox -Go through dialogs and make escape be cancel Dialogs, Status, Reason, Action (Verb) Fix bcc problem when doing pgp Icons in vfolderdef window (instead of Monitored,INBOX et al) @@ -28,7 +25,6 @@ More detailed date info specifier Create generic paning-widget Performance -Support pictures as attachments to html Userproc for alias expansion (gives list of possible expansions) Alias-expansion should expand on given part of address... Keyboard shortcut to show body @@ -38,20 +34,14 @@ Button to close alias window? Go offline when all connections fails Rename RatAddressSize to RatAddressMaxSize (and change implementation) -Reply should include fullname in adresses Move more stuff to preferences window (everything which uses rat_list) -Mailto hyperlinks according to rfc2817 -Generate Message-Id Escape '^From ' in attachments and text Ignore trailing dot in urls Do not always update the master folder when running in online-mode? Include From in reply-to all Implement save to dynamic folder Use mime.types-file and possibly other file command -Convert hold and sent to real (openable) folders Reimplement PGP (sign & encrypt immediately) -Folder list window -Group operations (forward, bounce) Partial quotations Network sync command which includes ';' Import & generate vcard diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/Makefile.in new/tkrat/lib/Makefile.in --- old/tkrat/lib/Makefile.in 2006-01-16 16:46:16.000000000 +0100 +++ new/tkrat/lib/Makefile.in 2009-06-28 21:49:19.000000000 +0200 @@ -20,6 +20,7 @@ EXTRA_CFLAGS = @CFLAGS@ @MEM_DEBUG_FLAGS@ # Installation directories + datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ MAN_DIR = @mandir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratAppInit.c new/tkrat/lib/ratAppInit.c --- old/tkrat/lib/ratAppInit.c 2007-09-17 16:07:43.000000000 +0200 +++ new/tkrat/lib/ratAppInit.c 2009-06-30 22:13:29.000000000 +0200 @@ -895,11 +895,11 @@ { char buf[1024]; const char *tmp = Tcl_GetVar(timerInterp, "rat_tmp", TCL_GLOBAL_ONLY); - int fd; + int fd, l; snprintf(buf, sizeof(buf), "%s/mark", tmp); if (0 <= (fd = open(buf, O_RDWR|O_TRUNC|O_CREAT, 0644))) { - write(fd, "mark", 4); + l = safe_write(fd, "mark", 4); /* Ignore result */ lseek(fd, 0, SEEK_SET); SafeRead(fd, buf, 4); close(fd); @@ -1412,7 +1412,7 @@ long RatDelaySoutr(void *stream_x, char *string) { - int len1, len2; + int len1, len2, l; len1 = strlen(ratDelayBuffer); len2 = strlen(string); @@ -1420,8 +1420,8 @@ strlcat(ratDelayBuffer, string, sizeof(ratDelayBuffer)); return 1; } - write((int)stream_x, ratDelayBuffer, len1); - write((int)stream_x, string, len2-2); + l = safe_write((int)stream_x, ratDelayBuffer, len1); /* Ignore result */ + l = safe_write((int)stream_x, string, len2-2); /* Ignore result */ ratDelayBuffer[0] = string[len2-2]; ratDelayBuffer[1] = string[len2-1]; return 1; @@ -2425,7 +2425,9 @@ *size = used; } else { buf = (char*)ckalloc(sbuf.st_size+1); - fread(buf, sbuf.st_size, 1, fp); + if (1 != fread(buf, sbuf.st_size, 1, fp)) { + sbuf.st_size = 0; + } buf[sbuf.st_size] = '\0'; *size = sbuf.st_size; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratDbase.c new/tkrat/lib/ratDbase.c --- old/tkrat/lib/ratDbase.c 2007-08-16 06:45:30.000000000 +0200 +++ new/tkrat/lib/ratDbase.c 2010-01-05 21:52:39.000000000 +0100 @@ -408,7 +408,9 @@ } } } while (-1 == fhLock); - write(fhLock, ident, strlen(ident)); + if (-1 == safe_write(fhLock, ident, strlen(ident))) { + fprintf(stderr, "Failed to write dbase lock\n"); + } close(fhLock); if (msgPost) { RatLog(interp, RAT_INFO, "", RATLOG_TIME); @@ -610,7 +612,9 @@ */ size = sbuf.st_size - cmdArg; indexBuf = (char*)ckalloc(size + 1); - fread(indexBuf, size, 1, fpIndex); + if (!fread(indexBuf, size, 1, fpIndex)) { + size = 0; + } fclose(fpIndex); indexBuf[size] = '\0'; indexOffset = cmdArg; @@ -1055,7 +1059,7 @@ losing: (void)snprintf(buf, sizeof(buf), "%s/index", dbDir); - (void)truncate(buf, indexPos); + i = truncate(buf, indexPos); /* Ignore result */ Unlock(interp); return TCL_ERROR; @@ -1637,9 +1641,12 @@ return NULL; } Unlock(interp); - fgets(header, sizeof(header)-1, messFp); + if (fgets(header, sizeof(header)-1, messFp)) { + header[sizeof(header)-1] = '\0'; + } else { + header[0] = '\0'; + } fclose(messFp); - header[sizeof(header)-1] = '\0'; return header; } @@ -1699,7 +1706,7 @@ fname, "\": ", Tcl_PosixError(interp), (char*)NULL); return NULL; } - while (fgets(buf, sizeof(buf), messFp), !feof(messFp)) { + while (fgets(buf, sizeof(buf), messFp) != NULL && !feof(messFp)) { if ('\n' == buf[0] || '\r' == buf[0]) { break; } @@ -1969,7 +1976,7 @@ fdDst = open(buf2, O_WRONLY|O_TRUNC|O_CREAT, 0666); do { len = SafeRead(fdSrc, buf, sizeof(buf)); - if (0 > write(fdDst, buf, len)) { + if (0 > safe_write(fdDst, buf, len)) { error = errno; len = 0; } @@ -2222,7 +2229,8 @@ Tcl_HashTable *tablePtr, int fix) { char buf[1024], path[1024]; - int seq = -1, i; + unsigned long seq = 0, maxnum = 0, num, fact; + int i; Tcl_HashEntry *entryPtr; RatDbItem *itemPtr; struct dirent *entPtr; @@ -2252,7 +2260,9 @@ } } } else { - fscanf(fp, "%d", &seq); + if (1 != fscanf(fp, "%ld", &seq)) { + seq = -1; + } fclose(fp); } } @@ -2306,6 +2316,15 @@ } entryPtr = Tcl_CreateHashEntry(tablePtr, buf, &i); Tcl_SetHashValue(entryPtr, (ClientData)itemPtr); + + /* Check sequence number */ + num = 0; + for (i=0, fact=1; isdigit(entPtr->d_name[i]); i++, fact *= 10) { + num += (entPtr->d_name[i]-'0') * fact; + } + if (num > maxnum) { + maxnum = num; + } } else if (S_IFDIR == (sbuf.st_mode&S_IFMT)) { if (prefix && *prefix) { snprintf(path, sizeof(path), "%s/%s", prefix, entPtr->d_name); @@ -2320,6 +2339,19 @@ } } closedir(dirPtr); + + if (maxnum > seq) { + snprintf(buf, sizeof(buf), + "Bad sequence number was %ld but expected %ld", seq, maxnum); + Tcl_DStringAppendElement(dsPtr, buf); + if (fix) { + snprintf(path, sizeof(buf), "%s/.seq", dir); + if (NULL != (fp = fopen(path, "w"))) { + fprintf(fp, "%ld", maxnum); + fclose(fp); + } + } + } } @@ -2410,7 +2442,9 @@ Tcl_SetResult(interp, "Failed to open index.info file", TCL_STATIC); return TCL_ERROR; } else { - fscanf(fp, "%d %d", &i, &indexInfo); + if (2 != fscanf(fp, "%d %d", &i, &indexInfo)) { + i = -1; + } fclose(fp); if (i != DBASE_VERSION) { Tcl_SetResult(interp, "Wrong version of dbase", TCL_STATIC); @@ -2438,7 +2472,7 @@ */ snprintf(buf, sizeof(buf), "%s/index.changes", dbDir); if (NULL != (fp = fopen(buf, "r"))) { - while (fgets(buf, sizeof(buf), fp), !feof(fp)) { + while (fgets(buf, sizeof(buf), fp) != NULL && !feof(fp)) { switch (buf[0]) { case 'a': indexInfo++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratDisFolder.c new/tkrat/lib/ratDisFolder.c --- old/tkrat/lib/ratDisFolder.c 2007-08-16 06:45:30.000000000 +0200 +++ new/tkrat/lib/ratDisFolder.c 2009-06-30 22:13:29.000000000 +0200 @@ -1147,7 +1147,7 @@ rat_sequence_t seq = RatSequenceInit(); buf[sizeof(buf)-1] = '\0'; - while (fgets(buf, sizeof(buf)-1, fp), !feof(fp)) { + while (fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) { if (!strncmp(buf, "delete", 6)) { RatSequenceAdd(seq, atol(buf+7)); } @@ -1186,7 +1186,7 @@ fseek(fp, 0, SEEK_SET); - while (fgets(buf, sizeof(buf)-1, fp), !feof(fp)) { + while (fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) { if (!strncmp(buf, "flag", 4)) { sscanf(buf+5, "%ld %d %d", &uid, &f, &value); flag = f; @@ -1469,7 +1469,7 @@ Tcl_DString ds; STRING string; SEARCHPGM *pgm; - int i; + int i, unused; FILE *stateFp; long mapPos; @@ -1515,11 +1515,11 @@ stateFp = fopen(statetmp, "w"); if (0>fprintf(stateFp, "%ld\n%ld\n", masterStream->uid_validity,uid)){ fclose(stateFp); - ftruncate(fileno(mapFp), mapPos); + unused = ftruncate(fileno(mapFp), mapPos); goto disk_full; } if (0 != fclose(stateFp)) { - ftruncate(fileno(mapFp), mapPos); + unused = ftruncate(fileno(mapFp), mapPos); unlink(statetmp); goto disk_full; } @@ -1534,7 +1534,7 @@ RatPurgeFlags(MsgFlags(elt), 0), datebuf, &string)) { Tcl_DStringFree(&ds); - ftruncate(fileno(mapFp), mapPos); + unused = ftruncate(fileno(mapFp), mapPos); unlink(statetmp); goto disk_full; } @@ -1661,7 +1661,7 @@ snprintf(buf, sizeof(buf), "%s/mappings", dir); if (NULL != (fp = fopen(buf, "r"))) { buf[sizeof(buf)-1] = '\0'; - while(fgets(buf, sizeof(buf)-1, fp), !feof(fp)) { + while(fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) { if (strchr(buf, '<')) { ReadOldMappings(s, mapPtr, buf, sizeof(buf)-1, fp); break; @@ -1715,7 +1715,7 @@ lPtr = (unsigned long*)ckalloc(sizeof(unsigned long)); *lPtr = atol(buf); Tcl_SetHashValue(entryPtr, lPtr); - } while (fgets(buf, buflen, fp), !feof(fp)); + } while (fgets(buf, buflen, fp) && !feof(fp)); /* * Loop through folder and add the new mappings to the real map diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratFolder.c new/tkrat/lib/ratFolder.c --- old/tkrat/lib/ratFolder.c 2006-07-19 23:15:08.000000000 +0200 +++ new/tkrat/lib/ratFolder.c 2009-07-01 21:36:13.000000000 +0200 @@ -1579,7 +1579,7 @@ tm.tm_wday = 0; tm.tm_yday = 0; tm.tm_isdst = -1; - /* time represents the time teh message was sent, without + /* time represents the time the message was sent, without * the time zone factor. So when rendered in gmt it gives * correct date/time. */ time = mktime(&tm); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratHold.c new/tkrat/lib/ratHold.c --- old/tkrat/lib/ratHold.c 2004-07-09 19:43:52.000000000 +0200 +++ new/tkrat/lib/ratHold.c 2009-06-30 22:13:29.000000000 +0200 @@ -161,11 +161,13 @@ && 'c' == direntPtr->d_name[l-1]) { snprintf(buf, sizeof(buf), "%s/%s", dir, direntPtr->d_name); fPtr = fopen(buf, "r"); - fgets(buf, sizeof(buf), fPtr); + if (!fgets(buf, sizeof(buf), fPtr)) { + buf[0] = '\0'; + } fclose(fPtr); buf[strlen(buf)-1] = '\0'; Tcl_ListObjAppendElement(interp, oPtr, Tcl_NewStringObj(buf, -1)); - snprintf(buf, sizeof(buf), direntPtr->d_name); + snprintf(buf, sizeof(buf), "%s", direntPtr->d_name); if (fileListPtr) { Tcl_ListObjAppendElement(interp, fileListPtr, Tcl_NewStringObj(buf, strlen(buf)-5)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratPGPprog.c new/tkrat/lib/ratPGPprog.c --- old/tkrat/lib/ratPGPprog.c 2007-08-16 06:45:30.000000000 +0200 +++ new/tkrat/lib/ratPGPprog.c 2010-01-05 21:52:39.000000000 +0100 @@ -119,7 +119,7 @@ char *printed; int size = strlen(args)+16; - pipe(statusPipe); + if (pipe(statusPipe)) return 0; printed = (char*)ckalloc(size); snprintf(printed, size, args, statusPipe[1]); Tcl_DStringAppend(&cmd, printed, -1); @@ -140,8 +140,12 @@ if ( 0 > (out = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0600))) { return 0; } - pipe(toPipe); - pipe(errPipe); + if (pipe(toPipe)) return 0; + if (pipe(errPipe)) { + close(toPipe[0]); + close(toPipe[1]); + return 0; + } if (0 == (pid = fork())) { getrlimit(RLIMIT_NOFILE, &rlim); for (i=0; i<rlim.rlim_cur; i++) { @@ -164,7 +168,7 @@ char buf[1024]; snprintf(buf, sizeof(buf), "ERROR executing '%s %s': %s\n", cmdbuf, args, strerror(errno)); - write(STDERR_FILENO, buf, strlen(buf)); + if (0 > safe_write(STDERR_FILENO, buf, strlen(buf))) exit(-1); } exit(-1); /* notreached */ @@ -281,17 +285,20 @@ pid = RatRunPGP(interp, 0, command, Tcl_DStringValue(&cmdDS), &toPGP, &from, &errPGP, NULL); if (signer) { - write(toPGP, (char*)passPhrase, strlen((char*)passPhrase)); + if (0 > safe_write(toPGP, (char*)passPhrase, + strlen((char*)passPhrase))){ + return TCL_ERROR; + } for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; } if (strcmp("6", version) || signer) { - write(toPGP, "\n", 1); + if (1 != safe_write(toPGP, "\n", 1)) return TCL_ERROR; } hdrPtr = buf; buf[0] = '\0'; rfc822_write_body_header(&hdrPtr, *body); strlcat(buf, "\015\012", sizeof(buf)); - write(toPGP, buf, strlen(buf)); + if (0 > safe_write(toPGP, buf, strlen(buf))) return TCL_ERROR; RatInitDelayBuffer(); rfc822_output_body(*body, RatDelaySoutr, (void*)toPGP); close(toPGP); @@ -416,6 +423,7 @@ BODY *multiPtr; PARAMETER *parmPtr; PART *partPtr; + int write_failed; version = Tcl_GetVar2(interp, "option", "pgp_version", TCL_GLOBAL_ONLY); @@ -425,6 +433,7 @@ /* * Run command */ + write_failed = 0; rfc822_encode_body_7bit(NIL, *body); Tcl_DStringSetLength(&cmdDS, 0); if (!strcmp("gpg-1", version)) { @@ -453,19 +462,25 @@ if (NULL == RatPGPPhrase(interp, passPhrase, sizeof(passPhrase))) { return TCL_ERROR; } - write(toPGP, (char*)passPhrase, strlen((char*)passPhrase)); + if (0 > safe_write(toPGP,(char*)passPhrase,strlen((char*)passPhrase))) { + return TCL_ERROR; + } for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; - write(toPGP, "\n", 1); + if (0 > safe_write(toPGP, "\n", 1)) return TCL_ERROR; hdrPtr = buf; buf[0] = '\0'; rfc822_write_body_header(&hdrPtr, *body); strlcat(buf, "\015\012", sizeof(buf)); - write(toPGP, buf, strlen(buf)); + if (strlen(buf) != safe_write(toPGP, buf, strlen(buf))) { + write_failed = 1; + } RatInitDelayBuffer(); - rfc822_output_body(*body, RatDelaySoutr, (void*)toPGP); + if (!rfc822_output_body(*body, RatDelaySoutr, (void*)toPGP)) { + write_failed = 1; + } close(toPGP); /*i = open("/tmp/sigdump", O_CREAT | O_TRUNC | O_WRONLY, FILEMODE); - write(i, buf, strlen(buf)); + safe_write(i, buf, strlen(buf)); RatInitDelayBuffer(); rfc822_output_body(*body, RatDelaySoutr, (void*)i); close(i);*/ @@ -495,7 +510,12 @@ /* * Check for errors */ - if (pid != result || WEXITSTATUS(status)) { + if (pid != result || WEXITSTATUS(status) || write_failed) { + /* We do not know why it failed, but it may be due to a + * bad passphrase. So to be on teh safe side we clear the + * cached passphrase here. */ + ClearPGPPass(NULL); + Tcl_DStringSetLength(&cmdDS, 0); Tcl_DStringAppendElement(&cmdDS, "RatPGPError"); Tcl_DStringStartSublist(&cmdDS); @@ -663,23 +683,21 @@ } } if (!boundary || NULL == (start = FindBoundary((char*)text,boundary))){ - bodyInfoPtr->sigStatus = RAT_SIG_BAD; - return; + goto fail; } start += strlen(boundary) + 4; if (NULL == (end = FindBoundary(start, boundary))) { - bodyInfoPtr->sigStatus = RAT_SIG_BAD; - return; + goto fail; } end -= 2; fd = open(textfile, O_CREAT | O_TRUNC | O_WRONLY, FILEMODE); - write(fd, start, end-start); + if (0 > safe_write(fd, start, end-start)) goto fail; close(fd); text = (unsigned char*)(*procInfo[bodyInfoPtr->type].fetchBodyProc) (bodyInfoPtr->secPtr->firstbornPtr->nextPtr, &length); fd = open(sigfile, O_CREAT | O_TRUNC | O_WRONLY, FILEMODE); if (text) { - write(fd, text, length); + if (0 > safe_write(fd, text, length)) goto fail; } close(fd); @@ -768,6 +786,10 @@ } else { Tcl_ResetResult(interp); } + return; + +fail: + bodyInfoPtr->sigStatus = RAT_SIG_BAD; } @@ -798,7 +820,7 @@ CONST84 char *version; BodyInfo *origPtr = *bodyInfoPtrPtr, *partInfoPtr; MessageInfo *msgPtr; - unsigned long length; + unsigned long length, textLength, passLength; Tcl_DString bodyDS, *errDSPtr = (Tcl_DString*)ckalloc(sizeof(Tcl_DString)); RatLog(interp, RAT_PARSE, "decrypting", RATLOG_EXPLICIT); @@ -811,7 +833,7 @@ (*procInfo[(*bodyInfoPtrPtr)->type].makeChildrenProc) (interp, *bodyInfoPtrPtr); text = (*procInfo[(*bodyInfoPtrPtr)->type].fetchBodyProc) - ((*bodyInfoPtrPtr)->firstbornPtr->nextPtr, &length); + ((*bodyInfoPtrPtr)->firstbornPtr->nextPtr, &textLength); retry = 1; while (retry && text) { if (NULL == RatPGPPhrase(interp, passPhrase, sizeof(passPhrase))) { @@ -837,15 +859,20 @@ for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; break; } - write(toPGP, (char*)passPhrase, strlen((char*)passPhrase)); + passLength = strlen((char*)passPhrase); + if (passLength != safe_write(toPGP, (char*)passPhrase, passLength)) { + goto failed; + } for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; - write(toPGP, "\n", 1); - write(toPGP, text, length); + if (1 != safe_write(toPGP, "\n", 1) + || textLength != safe_write(toPGP, text, textLength)) { + goto failed; + } /* fprintf(stderr, "%s:%d Dumped data to '/tmp/msgdump'\n", __FILE__, */ /* __LINE__); */ /* i = open("/tmp/msgdump", O_CREAT|O_TRUNC|O_WRONLY, 0600); */ -/* write(i, text, length); */ +/* safe_write(i, text, textLength); */ /* close(i); */ close(toPGP); @@ -1280,9 +1307,11 @@ for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; return NULL; } - write(toPGP, (char*)passPhrase, strlen((char*)passPhrase)); + if (0 > safe_write(toPGP,(char*)passPhrase,strlen((char*)passPhrase))) { + return NULL; + } for (i=0; i<strlen((char*)passPhrase); i++) passPhrase[i] = '\0'; - write(toPGP, "\n", 1); + if (0 > safe_write(toPGP, "\n", 1)) return NULL; fp = fdopen(toPGP, "w"); /* * Undo any encoding ant buggy MTA may have applied. Since we have this @@ -1643,7 +1672,7 @@ Tcl_DStringInit(&tmp); preamble = 1; buf[sizeof(buf)-1] = '\0'; - while (fgets(buf, sizeof(buf)-1, fp), !feof(fp)) { + while (fgets(buf, sizeof(buf)-1, fp) && !feof(fp)) { if (buf[0]) { buf[strlen(buf)-1] = '\0'; } @@ -1736,8 +1765,7 @@ buf[sizeof(buf)-1] = '\0'; do { - fgets(buf, sizeof(buf)-1, fp); - if (feof(fp)) { + if (!fgets(buf, sizeof(buf)-1, fp) || feof(fp)) { buf[0] = '\0'; } else if (buf[0]) { buf[strlen(buf)-1] = '\0'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratPwCache.c new/tkrat/lib/ratPwCache.c --- old/tkrat/lib/ratPwCache.c 2004-07-09 19:43:52.000000000 +0200 +++ new/tkrat/lib/ratPwCache.c 2010-01-05 21:52:39.000000000 +0100 @@ -113,7 +113,7 @@ if (NULL == (fp = fopen(filename, "r"))) { return; } - while (fgets(buf, sizeof(buf), fp), !feof(fp)) { + while (fgets(buf, sizeof(buf), fp) && !feof(fp)) { if (TCL_OK != Tcl_SplitList(interp, buf, &argc, &argv) || (argc != 2 && argc != 5)) { continue; @@ -178,7 +178,7 @@ fstat(fd, &sbuf); c = 0; for (i=0; i<sbuf.st_size; i++) { - write(fd, &c, 1); + if (0 > safe_write(fd, &c, 1)) break; } close(fd); unlink(filename); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratSender.c new/tkrat/lib/ratSender.c --- old/tkrat/lib/ratSender.c 2007-09-04 06:32:04.000000000 +0200 +++ new/tkrat/lib/ratSender.c 2010-07-08 21:09:51.000000000 +0200 @@ -24,11 +24,6 @@ static int to_sender[2]; static FILE *to_sender_fh; static int from_sender[2]; -#define WRITE_STRING(str) { \ - unsigned int l = strlen(str); \ - fwrite(&l, sizeof(int), 1, to_sender_fh); \ - fwrite(str, l, 1, to_sender_fh); \ -} typedef enum { EVENT_NONE, EVENT_LOG, @@ -119,8 +114,12 @@ pid_t pid; if (0 == sender_created) { - pipe(to_sender); - pipe(from_sender); + if (pipe(to_sender)) return; + if (pipe(from_sender)) { + close(to_sender[0]); + close(to_sender[1]); + return; + } if (0 == (pid = fork())) { RatSender(); /* Notreached */ @@ -156,7 +155,32 @@ { RatSenderHandler((Tcl_Interp*)clientData, mask & TCL_READABLE); } - +/* + *---------------------------------------------------------------------- + * + * RatWriteString -- + * + * Writes the given string to the outgoing file + * + * Results: + * non zero on failure + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ +static int +RatWriteString(const char *str, FILE *out) +{ + unsigned int l = strlen(str); + if (1 != fwrite(&l, sizeof(int), 1, out) + || (l != 0 && 1 != fwrite(str, l, 1, out))) { + return -1; + } else { + return 0; + } +} /* *---------------------------------------------------------------------- * @@ -395,17 +419,17 @@ oPtr = Tcl_GetVar2Ex(interp, "option", "smtp_verbose", TCL_GLOBAL_ONLY); Tcl_GetIntFromObj(interp, oPtr, &verboseness); buf[1] = verboseness; - fwrite(buf, 2, 1, to_sender_fh); + if (1 != fwrite(buf, 2, 1, to_sender_fh)) goto fail; s = RatGetCurrent(interp, RAT_HOST, role); - WRITE_STRING(s); + if (RatWriteString(s, to_sender_fh)) goto fail; RatMessageGetContent(interp, msgPtr, &header, &body); - WRITE_STRING(header); - WRITE_STRING(body); + if (RatWriteString(header, to_sender_fh)) goto fail; + if (RatWriteString(body, to_sender_fh)) goto fail; if (buf[0]) { snprintf(buf, sizeof(buf), "%s,smtp_hosts", role); oPtr = Tcl_GetVar2Ex(interp, "option", buf, TCL_GLOBAL_ONLY); Tcl_ListObjGetElements(interp, oPtr, &objc, &objv); - fwrite(&objc, sizeof(int), 1, to_sender_fh); + if (1 != fwrite(&objc, sizeof(int), 1, to_sender_fh)) goto fail; snprintf(buf, sizeof(buf), "%s,validate_cert", role); oPtr = Tcl_GetVar2Ex(interp, "option", buf, TCL_GLOBAL_ONLY); Tcl_GetBooleanFromObj(interp, oPtr, &validate); @@ -424,14 +448,14 @@ strlcat(buf, "/user=", sizeof(buf)); strlcat(buf, user, sizeof(buf)); } - WRITE_STRING(buf); + if (RatWriteString(buf, to_sender_fh)) goto fail; } snprintf(buf, sizeof(buf), "%s,smtp_passwd", role); s = Tcl_GetVar2(interp, "option", buf, TCL_GLOBAL_ONLY); - WRITE_STRING(s); + if (RatWriteString(s, to_sender_fh)) goto fail; snprintf(buf, sizeof(buf), "%s,from", role); s = Tcl_GetVar2(interp, "option", buf, TCL_GLOBAL_ONLY); - WRITE_STRING(s); + if (RatWriteString(s, to_sender_fh)) goto fail; oPtr = Tcl_GetVar2Ex(interp, "option", "cache_conn", TCL_GLOBAL_ONLY); Tcl_GetBooleanFromObj(interp, oPtr, &i); if (0 == i) { @@ -441,18 +465,24 @@ TCL_GLOBAL_ONLY); Tcl_GetIntFromObj(interp, oPtr, &i); } - fwrite(&i, sizeof(int), 1, to_sender_fh); + if (1 != fwrite(&i, sizeof(int), 1, to_sender_fh)) goto fail; } else { snprintf(buf, sizeof(buf), "%s,sendprog", role); s = Tcl_GetVar2(interp, "option", buf, TCL_GLOBAL_ONLY); - WRITE_STRING(s); + if (RatWriteString(s, to_sender_fh)) goto fail; snprintf(buf, sizeof(buf), "%s,sendprog_8bit", role); oPtr = Tcl_GetVar2Ex(interp, "option", buf, TCL_GLOBAL_ONLY); Tcl_GetBooleanFromObj(interp, oPtr, &i); c = i; - fwrite(&c, 1, 1, to_sender_fh); + if (1 != fwrite(&c, 1, 1, to_sender_fh)) goto fail; } fflush(to_sender_fh); + return; + +fail: + fclose(to_sender_fh); + to_sender_fh = NULL; + sender_created = 0; } /* @@ -596,12 +626,16 @@ if (errmsg) { c = EVENT_SEND_FAIL; len = strlen(errmsg); - write(from_sender[1], &c, 1); - write(from_sender[1], &len, 4); - write(from_sender[1], errmsg, len); + if (0 > safe_write(from_sender[1], &c, 1) + || 0 > safe_write(from_sender[1], &len, 4) + || 0 > safe_write(from_sender[1], errmsg, len)) { + exit(1); + } } else { c = EVENT_SEND_OK; - write(from_sender[1], &c, 1); + if (0 > safe_write(from_sender[1], &c, 1)) { + exit(1); + } } /* @@ -855,10 +889,11 @@ { char c = EVENT_LOG; unsigned int len = strlen(msg); + int ignored; - write(fd, &c, 1); - write(fd, &len, sizeof(int)); - write(fd, msg, len); + ignored = safe_write(fd, &c, 1); + ignored = safe_write(fd, &len, sizeof(int)); + ignored = safe_write(fd, msg, len); } /* @@ -915,8 +950,10 @@ /* * Execute send command */ - pipe(to); - pipe(err); + if (pipe(to) || pipe(err)) { + snprintf(buf, bufsize, "$t(prog_send_failed): %s",strerror(errno)); + return buf; + } if (0 == (child = fork())) { /* Child */ RatSendProgChild(Tcl_DStringValue(cmd), to[0], err[1]); @@ -1117,7 +1154,7 @@ snprintf(buf, sizeof(buf), "Failed to exec '%s': %s\n", argv[0], strerror(errno)); - write(err, buf, strlen(buf)); + i = safe_write(err, buf, strlen(buf)); exit(1); } /* @@ -1153,7 +1190,7 @@ * - The child has died * */ - while (len != (r = write(sd->fd, data, len))) { + while (len != (r = safe_write(sd->fd, data, len))) { if (0 > r || sender_died) { /* If failed the child must be dead */ return NIL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/lib/ratWatchdog.c new/tkrat/lib/ratWatchdog.c --- old/tkrat/lib/ratWatchdog.c 2007-08-16 06:45:30.000000000 +0200 +++ new/tkrat/lib/ratWatchdog.c 2009-06-30 22:13:29.000000000 +0200 @@ -47,7 +47,7 @@ * The leash is used to release the watchdog (child) when the parent * dies. */ - pipe(leash); + if (pipe(leash)) return; if (0 == fork()) { /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/misc/Makefile.in new/tkrat/misc/Makefile.in --- old/tkrat/misc/Makefile.in 2004-07-09 19:43:52.000000000 +0200 +++ new/tkrat/misc/Makefile.in 2009-06-28 21:49:19.000000000 +0200 @@ -7,6 +7,7 @@ ############################################################################# # Installation directories + datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ MAN_DIR = @mandir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/test/data.tcl new/tkrat/test/data.tcl --- old/tkrat/test/data.tcl 2005-08-09 17:26:11.000000000 +0200 +++ new/tkrat/test/data.tcl 2009-06-28 21:51:29.000000000 +0200 @@ -291,7 +291,7 @@ { TEXT PLAIN {{name attachment.txt}} 7bit ATTACHMENT {{filename attachment.txt}} {} - {file /tmp/test_attachment.txt}} + {file $tmp/test_attachment.txt}} } } } @@ -377,7 +377,7 @@ {{name "This_is_a_very_long_header_value_which_needs_to_be_broken_into_exactly_two_pieces"}} 7bit ATTACHMENT {{filename "Detta �r en v�ldigt l�ng header-rad som beh�ver brytas i exakt tv� delar"}} {} - {file /tmp/test_attachment.txt}} + {file $tmp/test_attachment.txt}} } } } @@ -469,7 +469,7 @@ { APPLICATION OCTET-STREAM {{name attachment.bin}} binary ATTACHMENT {{filename attachment.bin}} {} - {file /tmp/test_attachment.bin}} + {file $tmp/test_attachment.bin}} } } } @@ -566,7 +566,7 @@ } {TEXT PLAIN {{charset us-ascii}} 7bit "" {} {} {utfblob {This is the body}}} - {file /tmp/test_attachment.txt} + {file $tmp/test_attachment.txt} } } } @@ -687,7 +687,7 @@ { TEXT PLAIN {{name foo}} 8bit ATTACHMENT {} {} - {file /tmp/test_attachment.8bit}} + {file $tmp/test_attachment.8bit}} } } } @@ -802,14 +802,14 @@ } # Create data files -set f [open /tmp/test_attachment.txt w] +set f [open $tmp/test_attachment.txt w] puts $f "Line 1 of attachment" puts $f "Line 2 of attachment" close $f -set f [open /tmp/test_attachment.8bit w] +set f [open $tmp/test_attachment.8bit w] puts $f "R�ckmackan" close $f -set f [open /tmp/test_attachment.bin w] +set f [open $tmp/test_attachment.bin w] fconfigure $f -encoding binary for {set i 0} {$i < 256} {incr i} { puts -nonewline $f [format "%c" $i] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/test/run.in new/tkrat/test/run.in --- old/tkrat/test/run.in 2002-09-21 19:56:48.000000000 +0200 +++ new/tkrat/test/run.in 2009-06-28 22:24:10.000000000 +0200 @@ -47,7 +47,6 @@ } # Run tests -# Run tests cd $dir if {0 < [llength $tests]} { set at $tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/test/test_disoffline.tcl new/tkrat/test/test_disoffline.tcl --- old/tkrat/test/test_disoffline.tcl 2002-09-21 19:56:48.000000000 +0200 +++ new/tkrat/test/test_disoffline.tcl 2009-06-28 21:51:29.000000000 +0200 @@ -9,12 +9,14 @@ } proc test_disoffline::verify_map {mf map} { + global tmp + foreach e $map { set expected($e) 1 } if {![catch "open $mf r" f]} { set f [open $mf r] - file copy -force $mf /tmp/map + file copy -force $mf $tmp/map while {-1 != [gets $f line]} { if {[catch {unset expected($line)}]} { close $f diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/test/test_disonline.tcl new/tkrat/test/test_disonline.tcl --- old/tkrat/test/test_disonline.tcl 2005-09-19 16:54:56.000000000 +0200 +++ new/tkrat/test/test_disonline.tcl 2009-06-28 21:51:29.000000000 +0200 @@ -9,13 +9,15 @@ } proc test_disonline::verify_map {mf map} { + global tmp + foreach e $map { set expected($e) 1 } if {[catch {open $mf r} f]} { return 0 } - file copy -force $mf /tmp/map + file copy -force $mf $tmp/map while {-1 != [gets $f line]} { if {[catch {unset expected($line)}]} { close $f diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/test/test_pgp.tcl new/tkrat/test/test_pgp.tcl --- old/tkrat/test/test_pgp.tcl 2004-07-06 23:03:13.000000000 +0200 +++ new/tkrat/test/test_pgp.tcl 2009-06-28 21:51:29.000000000 +0200 @@ -344,11 +344,11 @@ } proc test_pgp::test_pgp {} { - global option + global option tmp RatLibSetOnlineMode 1 set option(pgp_version) gpg-1 - set option(pgp_args) "--no-default-keyring --keyring [pwd]/../pgp_pub --secret-keyring [pwd]/../pgp_sec --always-trust --no-options --homedir /tmp" + set option(pgp_args) "--no-default-keyring --keyring [pwd]/../pgp_pub --secret-keyring [pwd]/../pgp_sec --always-trust --no-options --homedir $tmp" #test_signing #test_encrypting test_keylist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/tkrat/Makefile.in new/tkrat/tkrat/Makefile.in --- old/tkrat/tkrat/Makefile.in 2007-01-29 06:51:30.000000000 +0100 +++ new/tkrat/tkrat/Makefile.in 2009-06-28 21:49:19.000000000 +0200 @@ -9,6 +9,7 @@ SHELL = /bin/sh # Installation directories + datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ MAN_DIR = @mandir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/tkrat/firstwizard.tcl new/tkrat/tkrat/firstwizard.tcl --- old/tkrat/tkrat/firstwizard.tcl 2007-04-17 07:36:06.000000000 +0200 +++ new/tkrat/tkrat/firstwizard.tcl 2010-01-05 21:39:49.000000000 +0100 @@ -1,6 +1,6 @@ # firstwizard.tcl - # -# TkRat software and its included text is Copyright 1996-2004 by +# TkRat software and its included text is Copyright 1996-2010 by # Martin Forss�n # # The full text of the legal notice is contained in the file called @@ -343,6 +343,8 @@ if {"done" == $hd(action)} { set hd(mailServer) [VFolderWizardBuildNewServer $id2 $prot] + set hd(${prot}_host) $hd2(host) + set hd(${prot}_user) $hd2(user) } unset hd2 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/tkrat/vfolderwizard.tcl new/tkrat/tkrat/vfolderwizard.tcl --- old/tkrat/tkrat/vfolderwizard.tcl 2007-04-17 07:36:06.000000000 +0200 +++ new/tkrat/tkrat/vfolderwizard.tcl 2010-01-05 21:39:04.000000000 +0100 @@ -810,6 +810,8 @@ # Defaults if {![info exists hd(user)]} { set hd(user) $env(USER) + } + if {![info exists hd(method)]} { set hd(method) tcp_default set hd(ssh_cmd) $option(ssh_template) set hd(priv) tls @@ -898,10 +900,11 @@ -command "VFolderWizardPOPDone $id" rat_scrollframe::recalc $hd(bodym) focus $hd(body).name_e + SetupShortcuts [list $hd(next) $hd(prev)] + $hd(prev) configure -state normal } else { focus $hd(body).host_e } - SetupShortcuts [list $hd(next) $hd(prev)] foreach w [list $hd(body).host_e $hd(body).user_e $hd(body).ssh_e \ $hd(body).conn_tcpcust.e] { @@ -909,7 +912,6 @@ bind $w <Return> "VFolderWizardServerCheck $id" } VFolderWizardServerCheck $id - $hd(prev) configure -state normal } proc VFolderWizardPOPDone {id} { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/util/Makefile.in new/tkrat/util/Makefile.in --- old/tkrat/util/Makefile.in 2006-07-13 21:11:14.000000000 +0200 +++ new/tkrat/util/Makefile.in 2009-06-28 21:49:19.000000000 +0200 @@ -33,6 +33,7 @@ SHELL = /bin/sh # Installation directories + datarootdir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ MAN_DIR = @mandir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tkrat/util/rat_dummy.c new/tkrat/util/rat_dummy.c --- old/tkrat/util/rat_dummy.c 2004-07-09 19:43:52.000000000 +0200 +++ new/tkrat/util/rat_dummy.c 2009-06-28 21:52:10.000000000 +0200 @@ -18,6 +18,12 @@ # define CONST84 #endif +#if (TCL_MAJOR_VERSION >= 8) && (TCL_MINOR_VERSION >= 5) +# define CONST85 CONST +#else +# define CONST85 +#endif + void Tk_UnmapWindow(Tk_Window tkwin) {} @@ -92,7 +98,7 @@ Tk_MakeWindowExist (Tk_Window tkwin) {} void -Tk_ManageGeometry (Tk_Window tkwin, Tk_GeomMgr * mgrPtr, +Tk_ManageGeometry (Tk_Window tkwin, CONST85 Tk_GeomMgr * mgrPtr, ClientData clientData) {} void ++++++ tkrat-load.patch ++++++ Index: tkrat/lib/Makefile.in =================================================================== --- tkrat.orig/lib/Makefile.in +++ tkrat/lib/Makefile.in @@ -98,11 +98,11 @@ ${DUMMYLIB}: ratDummy.o ${SHLIB_LD} -o ${DUMMYLIB} ratDummy.o $(EXTRA_LIBS) ${SHLIB_LD_LIBS} pkgIndex.tcl: ${RATLIB} ${RATOLDLIB} ${DUMMYLIB} - echo "if [catch {load ./${DUMMYLIB}; \ - load ./${RATLIB}; \ + echo "if [catch {load ./${RATLIB}; \ load ./${RATOLDLIB}; \ pkg_mkIndex . ${RATLIB} ${RATOLDLIB}} error] \ - {puts \$$error; exit 1}" | ${TCLSH} + {puts \$$error; exit 1}" | \ + LD_PRELOAD="./${DUMMYLIB} ./${RATOLDLIB}" ${TCLSH} install.bin: ${RATLIB} ${RATOLDLIB} ${DUMMYLIB} if test ! -d ${INSTALL_PREFIX}${LIB_DIR} ; then\ Index: tkrat/util/Makefile.in =================================================================== --- tkrat.orig/util/Makefile.in +++ tkrat/util/Makefile.in @@ -91,10 +91,9 @@ ${DUMMYLIB}: rat_dummy.o ${SHLIB_LD} -o ${DUMMYLIB} rat_dummy.o $(EXTRA_LIBS) ${SHLIB_LD_LIBS} pkgIndex.tcl: ${TARGETS} ${DUMMYLIB} - echo "if [catch {load ./${DUMMYLIB}; \ - load ./${BUSYLIB}; \ + echo "if [catch {load ./${BUSYLIB}; \ pkg_mkIndex . ${TARGETS}} error] \ - {puts \$$error; exit 1}" | ${TCLSH} + {puts \$$error; exit 1}" | LD_PRELOAD=./${DUMMYLIB} ${TCLSH} install.bin: ${TARGETS_LIB} ${DUMMYLIB} if test ! -d ${INSTALL_PREFIX}${LIB_DIR} ; then\ @@ -105,11 +104,10 @@ install.bin: ${TARGETS_LIB} ${DUMMYLIB} ${INSTALL} -m 0755 $$i ${INSTALL_PREFIX}${LIB_DIR} ;\ done INST=${INSTALL_PREFIX}${LIB_DIR}; \ - echo "if [catch {load ./${DUMMYLIB}; \ - cd $$INST; \ + echo "if [catch { cd $$INST; \ pkg_mkIndex -load ./*${SHLIB_SUFFIX} . \ *${SHLIB_SUFFIX}} error] \ - {puts \$$error; exit 1}" | ${TCLSH} + {puts \$$error; exit 1}" | LD_PRELOAD=./${DUMMYLIB} ${TCLSH} install.shared: ${TARGETS_data} if test ! -d ${INSTALL_PREFIX}${DATA_DIR} ; then\ ++++++ tkrat.patch ++++++ --- /var/tmp/diff_new_pack.0z9vkB/_old 2011-12-25 17:42:34.000000000 +0100 +++ /var/tmp/diff_new_pack.0z9vkB/_new 2011-12-25 17:42:34.000000000 +0100 @@ -10,14 +10,3 @@ echo "set auto_path [concat ${DATA_DIR} \$$auto_path]" >>$@ echo "TkRatClientStart" >>$@ ---- util/rat_dummy.c -+++ util/rat_dummy.c -@@ -92,7 +92,7 @@ - Tk_MakeWindowExist (Tk_Window tkwin) {} - - void --Tk_ManageGeometry (Tk_Window tkwin, Tk_GeomMgr * mgrPtr, -+Tk_ManageGeometry (Tk_Window tkwin, CONST Tk_GeomMgr * mgrPtr, - ClientData clientData) {} - - void -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
