Thread View: news.software.readers
9 messages
9 total messages
Started by Felix von Leitner
Tue, 30 Apr 1996 00:00
Slrn 0.8.8 domain name recognition patch
Author: Felix von Leitner
Date: Tue, 30 Apr 1996 00:00
Date: Tue, 30 Apr 1996 00:00
129 lines
4237 bytes
4237 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hi folks,
when installing slrn under Solaris with NIS, I always have the problem
that slrn bails out with:
Unable to find a fully qualified hostname. You will have to specify a
hostname in your .slrnrc file (slrn.rc on VMS).
Clearly, this is not the Right Thing. This patch should correct this
problem. It makes configure look into /etc/resolv.conf to get the DNS
domain name and hard codes it into slrn. I've submitted this patch to
John Davis, but you might be interested in it, too.
Felix [slrn rules!]
diff -u --recursive --new-file slrn/configure slrn.new/configure
- --- slrn/configure Mon Apr 29 05:59:25 1996
+++ slrn.new/configure Tue Apr 30 19:22:28 1996
@@ -1265,7 +1265,7 @@
echo "$ac_t""no" 1>&6
fi
- - if test "$ac_cv_lib_dnet" = no; then
+ if test $ac_cv_lib_dnet = no; then
echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
ac_lib_var=`echo dnet_stub_dnet_ntoa | tr '.-/+' '___p'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1713,6 +1713,29 @@
fi
done
+
+echo $ac_n "checking for domain in /etc/resolv.conf""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'slrn_cv_domain'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -f /etc/resolv.conf; then
+ slrn_cv_domain=`grep domain /etc/resolv.conf | sed 's/^domain *//'`
+else
+ slrn_cv_domain=no
+fi
+fi
+
+echo "$ac_t""$slrn_cv_domain" 1>&6
+if test $slrn_cv_domain != no; then
+ cat >> confdefs.h <<\EOF
+#define USE_DOMAIN 1
+EOF
+
+ cat >> confdefs.h <<EOF
+#define DOMAIN "${mutt_cv_domain}"
+EOF
+
+fi
#---------------------------------------------------------------------------
diff -u --recursive --new-file slrn/configure.in slrn.new/configure.in
- --- slrn/configure.in Mon Apr 29 05:59:25 1996
+++ slrn.new/configure.in Tue Apr 30 19:22:14 1996
@@ -39,6 +39,17 @@
getdomainname
)
+AC_CACHE_CHECK(for domain in /etc/resolv.conf, slrn_cv_domain,
+[if test -f /etc/resolv.conf; then
+ slrn_cv_domain=`grep domain /etc/resolv.conf | sed 's/^domain *//'`
+else
+ slrn_cv_domain=no
+fi])
+if test $slrn_cv_domain != no; then
+ AC_DEFINE(USE_DOMAIN)
+ AC_DEFINE_UNQUOTED(DOMAIN, "${mutt_cv_domain}")
+fi
+
JD_SET_OBJ_SRC_DIR
JD_TERMCAP
JD_FIND_SLANG
diff -u --recursive --new-file slrn/src/config.hin slrn.new/src/config.hin
- --- slrn/src/config.hin Mon Apr 29 05:59:27 1996
+++ slrn.new/src/config.hin Tue Apr 30 19:24:21 1996
@@ -62,7 +62,13 @@
/* define if you have <arpa/inet.h> */
#undef HAVE_ARPA_INET_H
+/* define if you want to hard-code the domain */
+#undef USE_DOMAIN
+/* set your domain here */
+#undef DOMAIN
+
+/* define if you have getdomainname() */
#undef HAVE_GETDOMAINNAME
#undef mode_t
diff -u --recursive --new-file slrn/src/slrn.c slrn.new/src/slrn.c
- --- slrn/src/slrn.c Mon Apr 29 05:59:26 1996
+++ slrn.new/src/slrn.c Tue Apr 30 19:26:03 1996
@@ -630,6 +630,12 @@
* has a username and a usable hostname. Without those, we are not
* starting up.
*/
+#ifdef USE_DOMAIN
+ if (0 == slrn_is_fqdn (Slrn_User_Info.host))
+ {
+ strcat(Slrn_User_Info.host,DOMAIN);
+ }
+#endif
if (0 == slrn_is_fqdn (Slrn_User_Info.host))
{
slrn_exit_error ("\
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1
iQCVAwUBMYZhjh/Da1Yoy+f1AQE8TAP/QAjC5j7DOkIeOCrcvaZUZejGiT5yg4El
nLZtF6Zx3HZ8VwF0QtwC9eWAqnObzT56SQw9PReGyKmYP2AiuDRjGoCIchdc2hVC
E6OX+9MoQxGSHTWjTn6s08Zer8OwtPntAoLv17v7LUPZCVcGpzM2PuCIOOR75P2v
suT1DFCsJfc=
=RFnZ
-----END PGP SIGNATURE-----
RFC 1036 compliance! (was Re: Slrn 0.8.8 domain name recognition patch)
Author: Russell Schulz
Date: Fri, 03 May 1996 00:00
Date: Fri, 03 May 1996 00:00
20 lines
1272 bytes
1272 bytes
leitner@prz.tu-berlin.de writes: > slrn bails out with: > > Unable to find a fully qualified hostname. You will have to specify a > hostname in your .slrnrc file (slrn.rc on VMS). > > Clearly, this is not the Right Thing. clearly, this is the Right Thing to do. if a newsreader can't find a fqdn, it shouldn't allow you to post. that's pretty simple. sure, it could look harder. I hope your patch is considered. -- Russell_Schulz@locutus.ofB.ORG Shad 86c
Re: RFC 1036 compliance! (was Re: Slrn 0.8.8 domain name recognition patch)
Author: Felix von Leitner
Date: Sat, 04 May 1996 00:00
Date: Sat, 04 May 1996 00:00
33 lines
1647 bytes
1647 bytes
-----BEGIN PGP SIGNED MESSAGE----- On Fri, 3 May 1996 22:26:56 -0600, Russell Schulz <Russell_Schulz@locutus.ofB.ORG> wrote: > > slrn bails out with: > > > > Unable to find a fully qualified hostname. You will have to specify a > > hostname in your .slrnrc file (slrn.rc on VMS). > > > > Clearly, this is not the Right Thing. > clearly, this is the Right Thing to do. > if a newsreader can't find a fqdn, it shouldn't allow you to post. that's > pretty simple. Oh, wait, I didn't mean that slrn should let you post without a fqdn! I meant that I don't want to specify a hostname in an .slrnrc! Felix -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBMYugCB/Da1Yoy+f1AQH7JgP+LDNabHs53XlQPQtL61ENIaNzdn2DSP6v 67B5ZoTT4Dyil+aBKF0iKNQcI1hlU4Xj3+AzDI1REtpTjoUIOu6+oU3BjC76jr+k 6i2wEgBerL3rmf0LU20wMFm0yxdKON7zqJf1RM8EXjODZTnfe65QXhJVEKS1pQxW H8vAO+nUbis= =rQXS -----END PGP SIGNATURE-----
Re: Slrn 0.8.8 domain name recognition patch
Author: Andreas Karrer
Date: Sat, 04 May 1996 00:00
Date: Sat, 04 May 1996 00:00
34 lines
2077 bytes
2077 bytes
In article <slrn4ococl.91u.leitner@xorn.prz.tu-berlin.de>, Felix von Leitner wrote: >when installing slrn under Solaris with NIS, I always have the problem >that slrn bails out with: > > Unable to find a fully qualified hostname. You will have to specify a > hostname in your .slrnrc file (slrn.rc on VMS). > >Clearly, this is not the Right Thing. This patch should correct this >problem. It makes configure look into /etc/resolv.conf to get the DNS >domain name and hard codes it into slrn. I've submitted this patch to >John Davis, but you might be interested in it, too. This will only work in one of the myriads of ways a machine can sensibly be configured: - slrn is not really interested in the fully qualified host name, it needs the domain part of the e-mail address, - some (versions of IRIX) have resolv.conf in /usr/etc, - the domain in resolv.conf need not be the "thing after the @ in the mail address", - newer resolvers use "search", not "domain" in resolv.conf, the semantics of the "domain" clause are somewhat ill-defined, - a NIS domain may or may not be the same as the DNS domain, etc etc. There is simply no portable way to find the domain part of the email address on a unix system, and making guesses might do more harm than good. I find slrn's method wholly acceptable: look up system-wide slrn.rc, then ~/.slrnrc , then envvar HOSTNAME. You can even compile it in... - Andi
Re: Slrn 0.8.8 domain name recognition patch
Author: Felix von Leitner
Date: Sun, 05 May 1996 00:00
Date: Sun, 05 May 1996 00:00
64 lines
2960 bytes
2960 bytes
-----BEGIN PGP SIGNED MESSAGE----- On 4 May 1996 23:11:47 GMT, Andreas Karrer <karrer@ife.ee.ethz.ch> wrote: > This will only work in one of the myriads of ways > a machine can sensibly be configured: > - slrn is not really interested in the fully qualified host name, it needs > the domain part of the e-mail address, Which it can't find out portably. > - some (versions of IRIX) have resolv.conf in /usr/etc, IRIX 4.x is *more* than obsolete. Besides, if /etc/resolv.conf is not found, slrn reverts back to the old behaviour. > - the domain in resolv.conf need not be > the "thing after the @ in the mail address", But it is most likely. In fact, I've never seen a site where this assertion would fail. > - newer resolvers use "search", not "domain" in resolv.conf, the > semantics of the "domain" clause are somewhat ill-defined, Newer resolvers don't choke on domain clause, so it does not hurt to have them there. BTW: resolv+ uses searchlist. Anyway. The domain thing is very widely used and the check works most of the time, and when it does not work, neither does it does do any harm. > - a NIS domain may or may not be the same as the DNS domain, Congratulations for this insight. But what does it have to do with our problem at hand? That's why I use /etc/resolv.conf, which is the DNS domain. > etc etc. There is simply no portable way to find the domain part of the > email address on a unix system, and making guesses might do more harm than > good. No. I fail to construct a case where this patch does any harm. > I find slrn's method wholly acceptable: look up system-wide slrn.rc, > then ~/.slrnrc , then envvar HOSTNAME. You can even compile it in... I don't want to force users to set HOSTNAME. And I don't want to change config.h manually to put my domain name there. So this patch gets the domain automatically for me. This is exactly the way God intended it to be ;) Felix -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBMYy93h/Da1Yoy+f1AQFhNgP+NyuddWje7XAstxZ/p+7dicDMrF9Sa0pe /jOUL3/BF71TA4hAvdpgMS/gQ6xZOErZaarxx8P9bpOiDvLjr8RPlxP1OP6VUccN HIBGuAxeQa0+nkNWOHenXiLNUGtgmU4rwcuKROoxRfGle8NTdBYRMfeUfjOaHlJd +QYf6LInhR8= =lwYY -----END PGP SIGNATURE-----
Re: Slrn 0.8.8 domain name recognition patch
Author: John Caruso
Date: Wed, 08 May 1996 00:00
Date: Wed, 08 May 1996 00:00
65 lines
2916 bytes
2916 bytes
On 5 May 1996, Felix von Leitner <leitner@sandmann.prz.tu-berlin.de> wrote:
>
>> - newer resolvers use "search", not "domain" in resolv.conf
>
>Newer resolvers don't choke on domain clause, so it does not hurt to
>have them there.
>[...]
>No. I fail to construct a case where this patch does any harm.
Sorry, but that isn't true. This patch was apparently incorporated into
slrn 0.8.8.1 and it did indeed break the configure script.
If a site is using "search" instead of "domain", this patch causes the
configure script to fail. The patch assumes that if /etc/resolv.conf
exists there will necessarily be a "domain" line in the file, which is a
faulty assumption since both "search" and "domain" are perfectly acceptable
(and mutually exclusive) ways of setting the default domain. If there's
no "domain" line, slrn_cv_domain gets set to nothing and subsequent uses
of it cause the configure script to bomb with "test: argument expected".
The following replacement code handles "search" lines correctly and also
handles the case where neither "search" nor "domain" are present:
-------- cut here -------------------------------------------------------
*** configure Tue May 7 16:17:26 1996
--- configure.new Tue May 7 16:30:05 1996
***************
*** 1724,1733 ****
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -f /etc/resolv.conf; then
! slrn_cv_domain=`grep domain /etc/resolv.conf | sed 's/^domain *//'`
! else
slrn_cv_domain=no
! fi
fi
echo "$ac_t""$slrn_cv_domain" 1>&6
--- 1724,1738 ----
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -f /etc/resolv.conf; then
! slrn_cv_domain=`(grep "^domain" /etc/resolv.conf ||
! grep "^search" /etc/resolv.conf) |
! awk '{ print $2 }'`
! fi
!
! if test -z "$slrn_cv_domain"; then
slrn_cv_domain=no
! fi
!
fi
echo "$ac_t""$slrn_cv_domain" 1>&6
-------- cut here -------------------------------------------------------
--
John Caruso, Senior Technical Consultant
ADP Claims Solutions Group Phone: (800) 366-4237 x2102
2010 Crow Canyon Place FAX : (510) 866-4839
San Ramon, CA 94583 (USA) Email: jcaruso@sr.csg.com
Re: Slrn 0.8.8 domain name recognition patch
Author: Greg Wooledge x5932
Date: Thu, 09 May 1996 00:00
Date: Thu, 09 May 1996 00:00
31 lines
1618 bytes
1618 bytes
leitner@sandmann.prz.tu-berlin.de (Felix von Leitner) writes: >> - the domain in resolv.conf need not be >> the "thing after the @ in the mail address", > >But it is most likely. In fact, I've never seen a site where this >assertion would fail. I offer our site as an example. $ head -1 /etc/resolv.conf domain clv.ous.bp.com 550 clv.ous.bp.com (tcp)... 550 Host unknown 554 <wooledgj@clv.ous.bp.com>... 550 Host unknown (Valid name but no A or MX) I can accept your "most likely" assertion as valid. But now you've seen a site where it fails. -- Greg Wooledge wooledgj@techsrv2.clv.ous.bp.com UNIX Technical Support (216) 586-5932 British Petroleum FAX (216) 621-6459 "The views expressed in this note are those of the individual concerned and should not necessarily be taken as being the views of The British Petroleum Company p.l.c. or any of the BP Group of companies."
Re: Slrn 0.8.8 domain name recognition patch
Author: John E. Davis
Date: Thu, 09 May 1996 00:00
Date: Thu, 09 May 1996 00:00
24 lines
1602 bytes
1602 bytes
On 9 May 96 10:47:29 -0400, Greg Wooledge x5932 <wooledgj@techsrv1.clv.ous.bp.com> wrote: : $ head -1 /etc/resolv.conf : domain clv.ous.bp.com : : 550 clv.ous.bp.com (tcp)... 550 Host unknown : 554 <wooledgj@clv.ous.bp.com>... 550 Host unknown (Valid name but no A or MX) : : I can accept your "most likely" assertion as valid. But now you've : seen a site where it fails. slrn only uses this if the hostname does not appear to be a fully qualified one by appending the domain to the hostname. For example, if slrn finds that your hostname is simply `techsrv1', it will attempt to create a fully qualified one by appending clv.ous.bp.com to techsrv1. -- John E. Davis Center for Space Research/AXAF Science Center 617-258-8119 MIT 37-662c, Cambridge, MA 02139 http://space.mit.edu/~davis
Re: RFC 1036 compliance! (was Re: Slrn 0.8.8 domain name recognition patch)
Author: Russell Schulz
Date: Sat, 11 May 1996 00:00
Date: Sat, 11 May 1996 00:00
16 lines
1304 bytes
1304 bytes
leitner@prz.tu-berlin.de writes: >> clearly, this is the Right Thing to do. > >> if a newsreader can't find a fqdn, it shouldn't allow you to post. that's >> pretty simple. > > Oh, wait, I didn't mean that slrn should let you post without a fqdn! I > meant that I don't want to specify a hostname in an .slrnrc! then why cut my next paragraph where I said that? -- Russell_Schulz@locutus.ofB.ORG Shad 86c
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads