head 1.5; access; symbols pkgsrc-2013Q2:1.5.0.54 pkgsrc-2013Q2-base:1.5 pkgsrc-2012Q4:1.5.0.52 pkgsrc-2012Q4-base:1.5 pkgsrc-2011Q4:1.5.0.50 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q2:1.5.0.48 pkgsrc-2011Q2-base:1.5 pkgsrc-2009Q4:1.5.0.46 pkgsrc-2009Q4-base:1.5 pkgsrc-2008Q4:1.5.0.44 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.42 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.40 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.38 pkgsrc-2008Q2-base:1.5 pkgsrc-2008Q1:1.5.0.36 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.34 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.5.0.32 pkgsrc-2007Q3-base:1.5 pkgsrc-2007Q2:1.5.0.30 pkgsrc-2007Q2-base:1.5 pkgsrc-2007Q1:1.5.0.28 pkgsrc-2007Q1-base:1.5 pkgsrc-2006Q4:1.5.0.26 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.24 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.22 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.20 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.5.0.18 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.5.0.16 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.14 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.12 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.10 pkgsrc-2004Q4-base:1.5 pkgsrc-2004Q3:1.5.0.8 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.5.0.6 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.5.0.4 pkgsrc-2004Q1-base:1.5 pkgsrc-2003Q4:1.5.0.2 pkgsrc-2003Q4-base:1.5 buildlink2-base:1.5 netbsd-1-5-RELEASE:1.4 netbsd-1-4-PATCH003:1.4 netbsd-1-4-PATCH002:1.4 comdex-fall-1999:1.3 netbsd-1-4-PATCH001:1.3 netbsd-1-4-RELEASE:1.2 netbsd-1-3-PATCH003:1.1; locks; strict; comment @# @; 1.5 date 2000.12.15.00.41.04; author wiz; state dead; branches; next 1.4; 1.4 date 99.11.26.22.12.37; author hubertf; state Exp; branches; next 1.3; 1.3 date 99.06.01.12.14.00; author hubertf; state Exp; branches; next 1.2; 1.2 date 98.11.12.23.40.20; author frueauf; state Exp; branches; next 1.1; 1.1 date 98.09.03.16.36.09; author christos; state Exp; branches; next ; desc @@ 1.5 log @Move packages from 'net' into new 'chat' category. Add chat to main Makefile. @ text @$NetBSD: patch-ad,v 1.4 1999/11/26 22:12:37 hubertf Exp $ diff -x *.orig -urN ./icb/helpdata.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/helpdata.c --- ./icb/helpdata.c Fri Feb 24 22:20:23 1995 +++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/helpdata.c Fri Nov 26 22:56:30 1999 @@@@ -600,6 +600,11 @@@@ " waiting for your screen, this gives you a chance to see the output", " of your command.", "", +"printtime (boolean) default: false", +"", +" Print the current time in front of every line sent to the display", +" and log file.", +"", "restricted (boolean) default: false", "", " Restricted shuts off the ability to run subshell commands or to", @ 1.4 log @Split patches and add code to print time in front of each line. Needs to be switched on from .icbrc: oset printtime true. Bump version to 5.0.9pl1 for that. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Remove some compilation warnings, use mkstemp instead of mktemp. Patches submitted by Jaromir Dolecek in PR 7683 @ text @d1 17 a17 51 --- icb/serverlist.c.orig Fri Feb 24 22:20:29 1995 +++ icb/serverlist.c Tue Jun 1 10:43:14 1999 @@@@ -1,4 +1,6 @@@@ #include +#include +#include #include #include #include "icb.h" @@@@ -14,15 +16,14 @@@@ static FILE *serverfile = NULL; FILE *openserverfile() { struct stat statbuf; - char *personalsl; - char command[256]; - char pwd[256]; + char *personalsl, *home; + char pwd[MAXPATHLEN+1]; FILE *ret; #ifdef sgi #undef SYSV #endif -#ifndef SYSV +#if !defined(SYSV) && !(defined(BSD) && BSD >= 199306) getwd(pwd); #else /* SYSV */ getcwd(pwd, MAXPATHLEN+1); @@@@ -30,11 +31,20 @@@@ FILE *openserverfile() #ifdef sgi #define SYSV #endif - chdir(getenv("HOME")); + if ((home = getenv("HOME")) == NULL) { + struct passwd *pw; + if ((pw = getpwuid(getuid())) == NULL) + home = "."; + home = pw->pw_dir; + } + chdir(home); if (!stat(PERSONALSL,&statbuf)) { - sprintf(command,"/bin/cat %s %s\n", PERSONALSL, SERVERLIST); + char *command = malloc(strlen("/bin/cat \n") + + strlen(PERSONALSL) + strlen(SERVERLIST) + 1); + sprintf(command, "/bin/cat %s %s\n", PERSONALSL, SERVERLIST); ret= popen(command,"r"); + free(command); } else ret= fopen(SERVERLIST,"r"); @ 1.2 log @Add missing rcs ids. @ text @d1 51 a51 78 $NetBSD$ *** icb/serverlist.c.orig Fri Feb 24 16:20:29 1995 --- icb/serverlist.c Thu Sep 3 10:37:50 1998 *************** *** 1,4 **** --- 1,5 ---- #include + #include #include #include #include "icb.h" *************** *** 14,28 **** FILE *openserverfile() { struct stat statbuf; ! char *personalsl; ! char command[256]; ! char pwd[256]; FILE *ret; #ifdef sgi #undef SYSV #endif ! #ifndef SYSV getwd(pwd); #else /* SYSV */ getcwd(pwd, MAXPATHLEN+1); --- 15,28 ---- FILE *openserverfile() { struct stat statbuf; ! char *personalsl, *home; ! char pwd[MAXPATHLEN+1]; FILE *ret; #ifdef sgi #undef SYSV #endif ! #if !defined(SYSV) && !(defined(BSD) && BSD >= 199306) getwd(pwd); #else /* SYSV */ getcwd(pwd, MAXPATHLEN+1); *************** *** 30,40 **** #ifdef sgi #define SYSV #endif ! chdir(getenv("HOME")); if (!stat(PERSONALSL,&statbuf)) { ! sprintf(command,"/bin/cat %s %s\n", PERSONALSL, SERVERLIST); ret= popen(command,"r"); } else ret= fopen(SERVERLIST,"r"); --- 30,49 ---- #ifdef sgi #define SYSV #endif ! if ((home = getenv("HOME")) == NULL) { ! struct passwd *pw; ! if ((pw = getpwuid(getuid())) == NULL) ! home = "."; ! home = pw->pw_dir; ! } ! chdir(home); if (!stat(PERSONALSL,&statbuf)) { ! char *command = malloc(strlen("/bin/cat \n") + ! strlen(PERSONALSL) + strlen(SERVERLIST) + 1); ! sprintf(command, "/bin/cat %s %s\n", PERSONALSL, SERVERLIST); ret= popen(command,"r"); + free(command); } else ret= fopen(SERVERLIST,"r"); @ 1.1 log @- use getcwd instead of getwd - increase the buffer size appropriatetely for holding cwd to avoid overflow - don't core-dump if $HOME is not set - dynamically allocate command space to avoid overflow @ text @d1 2 @