🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #253046

Re: [tin] -Z option

#253046
From: Urs Janßen
Date: Sat, 29 Dec 2012 23:48
69 lines
4270 bytes
In <kbnlku$849$1@n102.xanadu-bbs.net>, John F. Morse wrote:
>> -Z is a "batch mode" option, you must provide the username /
>> password via ${TIN_HOMEDIR:-"$HOME"}/.newsauth - there is no
>> intercative usage.
> The ~/.newsauth file is formatted correctly as shown in tin(5).

if that's the case tin wouldn't promt for a username/password.

>    My concern was or is the ~/ directory gets loaded down with various run
>    control (i.e. newsrc etc.) files from tin, slrn, nn, Pan, and who knows

the newsrc has standard format and can be shared among several
readers, thus it's default location is in $HOME and not in a reader
specific dir. if you don't like that you can use
${TIN_HOME‐DIR:-"$HOME"}/.tin/newsrctable to gave an alternate
location (even on a per server basis), i.e.:

*       ~/.tin/${NNTPSERVER:-localhost}

newsauth is also ment to be shareable among other programms...

> I do not remember if I had done this on my recently failed motherboard
> computer or not. I tried it on this new system, and it didn't work. The
> .newsauth file must be in the ~/ directory.

homedir is set early in tin here:

init.c:init_selfinfo()
[...]
   if (((ptr = getenv("TIN_HOMEDIR")) != NULL) && strlen(ptr)) {
        my_strncpy(homedir, ptr, sizeof(homedir) - 1);
    } else if (((ptr = getenv("HOME")) != NULL) && strlen(ptr)) {
        my_strncpy(homedir, ptr, sizeof(homedir) - 1);
    } else if (strlen(myentry->pw_dir)) {
        strncpy(homedir, myentry->pw_dir, sizeof(homedir) - 1);
    } else
        strncpy(homedir, TMPDIR, sizeof(homedir) - 1);
[...]

and used later on here:

auth.c:read_newsauth_file()
[...]
    joinpath(filename, sizeof(filename), homedir, ".newsauth");
[...]

settig TIN_HOMEDIR to someting else than $HOME also works for
.newsauth, but if you set to i.e. $HOME/.tin/ you'll have all the other
configs in $HOME/.tin/.tin (that's the way TIN_HOMEDIR always worked)!

> Back to when using the -Z option, without the -A option, Tin is reporting
> "There is no news" however there is a lot of unread news in several newsgroups
> on the server.

If tin is not allowed to issue a GROUP/LISTGROUP command it can't
know if threre is any unread news.

> I don't think the following patch is necessary because INN2 doesn't prompt for
> a login. The client must force it, which it does in the -A option mode.

the patch surpresses the prompting if -A is used in batch mode (or
the server requires auth) _and_ no valid password/username pair is
found in newsauth.

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Technical Details
Message-ID: <kbnvgo$qg5$1@news.rz.uni-karlsruhe.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!ecngs!feeder2.ecngs.de!newsfeeder.ewetel.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail
References: <kbmsbj$1ap$1@n102.xanadu-bbs.net> <kbn8ce$he6$1@news.rz.uni-karlsruhe.de> <kbnlku$849$1@n102.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <kbnvgo$qg5$1@news.rz.uni-karlsruhe.de>
Subject: Re: [tin] -Z option
Date: Sat, 29 Dec 2012 23:48:40 +0000
From: Urs Janßen <urs@buil.tin.org>
References: <kbmsbj$1ap$1@n102.xanadu-bbs.net> <kbn8ce$he6$1@news.rz.uni-karlsruhe.de> <kbnlku$849$1@n102.xanadu-bbs.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!ecngs!feeder2.ecngs.de!newsfeeder.ewetel.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail
Newsgroups: news.software.readers
Organization: tin.org
Lines: 69
Sender: Urs Janßen <urs@akk10-int.akk.uni-karlsruhe.de>
NNTP-Posting-Host: akkuser-dmz.akk.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.rz.uni-karlsruhe.de 1356824920 27141 172.22.9.237 (29 Dec 2012
X-Complaints-To: abuse@uni-karlsruhe.de
NNTP-Posting-Date: Sat, 29 Dec 2012 23:48:40 +0000 (UTC)
Cancel-Lock: sha1:grbTE52dep1Y9goKwP0D+EK06mY=
X-No-Archive: yes
Archive: no
X-No-HTML: yes
User-Agent: tin/2.1.3-20121224 ("Langholm") (UNIX) (Linux/2.6.24-32-generic
 (i686))
X-Original-Bytes: 4070