diff options
author | Mamoru Komachi <usata@gentoo.org> | 2003-08-01 16:32:48 +0000 |
---|---|---|
committer | Mamoru Komachi <usata@gentoo.org> | 2003-08-01 16:32:48 +0000 |
commit | afc58595906a5cd7b200d69f4ff670169ddc3a5c (patch) | |
tree | 79ee57d145426c353f444f1ed1ad87906f5fd70b /app-i18n/skkserv/files | |
parent | new version, mark .16 x86 (diff) | |
download | gentoo-2-afc58595906a5cd7b200d69f4ff670169ddc3a5c.tar.gz gentoo-2-afc58595906a5cd7b200d69f4ff670169ddc3a5c.tar.bz2 gentoo-2-afc58595906a5cd7b200d69f4ff670169ddc3a5c.zip |
fixed segfault problem when started with inappropriate /etc/hosts
Diffstat (limited to 'app-i18n/skkserv/files')
-rw-r--r-- | app-i18n/skkserv/files/skkserv-9.6-segfault-gentoo.patch | 15 | ||||
-rw-r--r-- | app-i18n/skkserv/files/skkserv.initd | 16 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app-i18n/skkserv/files/skkserv-9.6-segfault-gentoo.patch b/app-i18n/skkserv/files/skkserv-9.6-segfault-gentoo.patch new file mode 100644 index 000000000000..e40bfa942c1f --- /dev/null +++ b/app-i18n/skkserv/files/skkserv-9.6-segfault-gentoo.patch @@ -0,0 +1,15 @@ +--- skkserv.c.orig Tue Jan 21 04:16:36 1997 ++++ skkserv.c Thu Mar 25 19:45:50 1999 +@@ -723,7 +723,11 @@ + fprintf(errout, "%s:cannot get hostname, or too long hostname\n", pgmnm); + exit(1); + } +- hentry = gethostbyname(hname); ++ if ((hentry = gethostbyname(hname)) == NULL ++ && (hentry = gethostbyname("localhost")) == NULL) { ++ perror("gethostbyname"); ++ exit(1); ++ } + #ifdef NO_ADDR_LIST + strcat(hname, ":"); + strcat(hname, hentry->h_addr); diff --git a/app-i18n/skkserv/files/skkserv.initd b/app-i18n/skkserv/files/skkserv.initd new file mode 100644 index 000000000000..1f22109db4e6 --- /dev/null +++ b/app-i18n/skkserv/files/skkserv.initd @@ -0,0 +1,16 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-i18n/skkserv/files/skkserv.initd,v 1.1 2003/08/01 16:32:40 usata Exp $ + +start() { + ebegin "Starting skkserv" + start-stop-daemon --start --quiet --exec /usr/sbin/skkserv + eend $? +} + +stop() { + ebegin "Stopping skkserv" + start-stop-daemon --stop --quiet --exec /usr/sbin/skkserv + eend $? +} |