🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
13 messages
13 total messages Started by John F. Morse Sat, 29 Dec 2012 13:48
[tin] -Z option
#253040
Author: John F. Morse
Date: Sat, 29 Dec 2012 13:48
22 lines
1694 bytes
Apparently when using the -Z option, along with the -A option,
something is sent to the server after entering the username,
which in interpreted as an incorrect password.

An example:

rtin -rAZvg news_server

If the -A is not included. then without authenticating, the
only groups checked are those not requiring authentication.

That means the -v option doesn't display the other groups.

The -Z option works correctly on servers not requiring
authentication.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: [tin] -Z option
#253042
Author: Urs Janßen
Date: Sat, 29 Dec 2012 17:13
44 lines
3394 bytes
In <kbmsbj$1ap$1@n102.xanadu-bbs.net>, John F. Morse wrote:
> Apparently when using the -Z option, along with the -A option,
> something is sent to the server after entering the username,
> which in interpreted as an incorrect password.

-Z is a "batch mode" option, you must provide the username /
password via ${TIN_HOMEDIR:-"$HOME"}/.newsauth - there is no
intercative usage. This fixes the username prompting:

--- src/auth.c	2012-12-24 11:22:00.000000000 +0100
+++ src/auth.c	2012-12-29 18:09:46.273302968 +0100
@@ -313,6 +313,10 @@
 	 * that the server doesn't want a password; so only ask for it if needed.
 	 */
 	if (force_auth_on_conn_open || !startup) {
+		if (batch_mode) { /* no interactive username/password prompting */
+			error_message(0, _(txt_auth_needed));
+			return (ret == OK_AUTH);
+		}
 		if (nntp_caps.type != CAPABILITIES || (nntp_caps.type == CAPABILITIES && !nntp_caps.authinfo_state && ((nntp_caps.sasl & SASL_PLAIN) || nntp_caps.authinfo_user || (!nntp_caps.authinfo_user && !(nntp_caps.sasl & SASL_PLAIN))))) {
 #	ifdef USE_CURSES
 			int state = RawState();


> An example:
> 
> rtin -rAZvg news_server

-A and/or -g implie -r; rtin implies -r, you can leave off the -r:
tin -AZvg news_server

> If the -A is not included. then without authenticating, the
> only groups checked are those not requiring authentication.

how should tin be able to check the groups which do require auth if
auth was not requsted (neither by the server at startup nor by -A to
force auth on startup)?

> That means the -v option doesn't display the other groups.

without authentication there's not much info one could get bout
groups which do require auth (LIST ACTIVE usualy works but is not
very accurate). But the -v stats rely on GROUP/LISTGROUP (wich do not
work without auth if the group is restricted).
Re: [tin] -Z option
#253043
Author: John F. Morse
Date: Sat, 29 Dec 2012 21:00
112 lines
5736 bytes
Hi Urs,


On 12/29/2012 11:13 AM, Urs Janßen wrote:
> In <kbmsbj$1ap$1@n102.xanadu-bbs.net>, John F. Morse wrote: days, but now that all ther
>> Apparently when using the -Z option, along with the -A option,
>> something is sent to the server after entering the username,
>> which in interpreted as an incorrect password.
> -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).

We worked on a forced authinfo problem with INN a couple of years ago, and you
provided a patch with the new code that was to be provided in an upcoming
version. When I upgraded it worked.

Then on 20110624 we exchanged messages about the automation of the login. That
was fixed when I moved the .newsauth from ~/.tin to ~/ and hope none of my
other programs will mess with it.

As I stated then:

    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
    what else. Can't keep them straight.

    My attempt was to put each newsreaders' run control and other associated
    files within a directory bearing that program's name.


My reasoning is I access several NSP servers to check if certain missing
articles are available, and then I check the Path information. This requires
seeing these articles as new, and not already read and possibly hidden because
a shared newsrc was used by another program.

Hard disk space is very cheap today, so there is not much reason to share the
newsrc, except for the majority of users who are only interested in reading.
Such a user would then probably only use one newsreader.

An example is the Pan newsreader which was a fairly good tool back in the
version 0.14.2.91, where each configured NSP account was unique and
individual. The access was better than the present beta releases, but all
articles are still stored in one area. Since only one article per M-ID is
stored, you cannot examine individual articles to see how the Path shows the
propagation.

Then in Message-ID: <iu2kad$f7v$1@news2.rz.uni-karlsruhe.de> you suggested:

    tin(1)
    TIN_HOMEDIR Define this variable if you do not want the .tin directory in
    $HOME/. E.g., if you want all tin's private files in /tmp/.tin you would
    set $TIN_HOMEDIR to /tmp.


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.

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.


john@noc:~/.tin$ rtin -rZv
Reading config file...
tin 2.1.1 release 20120623 ("Mulindry") [UNIX] (c) Copyright 1991-2012 Iain Lea.
Connecting to news2...
newsw.my.net InterNetNews NNRP server INN 2.5.2 ready (no posting)
Reading global attributes file...
Reading attributes file...
Reading groups from active file...
Reading groups from newsrc file...
Processing attributes...
Reading filter file...
Reading newsrc file...
Checking for news...There is no news
newsrc file saved successfully.
Disconnecting from server...


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.

Please correct me if I'm wrong.


>  This fixes the username prompting:
>
> --- src/auth.c	2012-12-24 11:22:00.000000000 +0100
> +++ src/auth.c	2012-12-29 18:09:46.273302968 +0100
> @@ -313,6 +313,10 @@
>  	 * that the server doesn't want a password; so only ask for it if needed.
>  	 */
>  	if (force_auth_on_conn_open || !startup) {
> +		if (batch_mode) { /* no interactive username/password prompting */
> +			error_message(0, _(txt_auth_needed));
> +			return (ret == OK_AUTH);
> +		}
>  		if (nntp_caps.type != CAPABILITIES || (nntp_caps.type == CAPABILITIES && !nntp_caps.authinfo_state && ((nntp_caps.sasl & SASL_PLAIN) || nntp_caps.authinfo_user || (!nntp_caps.authinfo_user && !(nntp_caps.sasl & SASL_PLAIN))))) {
>  #	ifdef USE_CURSES
>  			int state = RawState();


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: [tin] -Z option
#253046
Author: 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."
Re: [tin] -Z option
#253047
Author: John F. Morse
Date: Sun, 30 Dec 2012 07:24
120 lines
5807 bytes
On 12/29/2012 05:48 PM, Urs Janßen wrote:
> 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.


That is an erroneous statement, Urs. The file IS formatted correctly, but
located in the wrong location, so Tin could not find it.


>>    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 have heard that many times, but I guess you don't understand that I am NOT
STANDARD!

I have a specific use for a newsreader other than gabbing. I use them as tools
for news server administration. Is that an issue?

When something is compiled into a newsreader, and that binary code is part of
a distro's package system, then I'm at the mercy of modifying the source and
recompiling.

I believe there should be enough freedom in a program's design so a user can
make changes easily, with a text editor.


>> 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)!


Sorry but I do not speak C (nor C++). I can barely fumble my way around in
BASH and Perl.

Why is the homedir etched into stone? Why is it not in one of the
configuration files like many other programs?

You are essentially forcing people to toe the line as you see it.


>> 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.


If the news server does not allow Tin access to groups that require
authentication, then Tin needs some changes in order to authenticate.


>> 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


Well, it is broke, so suppressing something that isn't accepted in the first
place makes no sense.

Have you even tried to reproduce my problem on a news server that does require
authentication?

Please do so before wasting any more of our time.

This is the same behavior you exhibited in earlier bug reports.

Just use Tin on Eternal-September, Albasani, or some other close-by NSP that
is free to use.

Don't believe me; believe your own eyes.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: [tin] -Z option
#253049
Author: Urs Janßen
Date: Sun, 30 Dec 2012 09:01
10 lines
1805 bytes
In <kboq81$h8p$1@n102.xanadu-bbs.net>, John F. Morse wrote:
> That is an erroneous statement, Urs.

well don't blame me if you fail to follow the detailed instructions
in the manpage.

> I have heard that many times, but I guess you don't understand that I am NOT
> STANDARD!

well, then go and find your very own solution. EOT.
Re: [tin] -Z option
#253052
Author: John F. Morse
Date: Sun, 30 Dec 2012 09:47
33 lines
2494 bytes
Urs Janßen <urs@buil.tin.org> wrote:
> In <kboq81$h8p$1@n102.xanadu-bbs.net>, John F. Morse wrote:
>> That is an erroneous statement, Urs.
> 
> well don't blame me if you fail to follow the detailed instructions
> in the manpage.


Your statement is incorrect, not the detailed instructions in the manual.

I was not blaming anyone. Your reading comprehension, or understanding of English, is not as I would like it to be.

I can run everything through Google Translate and into German if you think Google is a better translator than you are.

 
>> I have heard that many times, but I guess you don't understand that I am NOT
>> STANDARD!
> 
> well, then go and find your very own solution. EOT.


I was trying to find the solution with Tin.

You seem to prefer arguing instead of understanding the problem, and as the current maintainer, fixing it.

Do you want to help, or deinen Kopf in den Sand? Es ist Ihre Wahl.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: [tin] -Z option
#253054
Author: Shmuel Metz
Date: Sun, 30 Dec 2012 22:56
19 lines
2317 bytes
In <kboq81$h8p$1@n102.xanadu-bbs.net>, on 12/30/2012
   at 01:24 AM, "John F. Morse" <john@example.invalid> said:

>Why is the homedir etched into stone?

Why is the Moon bigger than the Earth?

>You are essentially forcing people to toe the line as you see it.

Not even close.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: [tin] -Z option
#253053
Author: Shmuel Metz
Date: Sun, 30 Dec 2012 22:59
20 lines
2307 bytes
In <kbp2iq$jbl$1@n102.xanadu-bbs.net>, on 12/30/2012
   at 09:47 AM, john@example.invalid (John F. Morse) said:

How appropriate (-;

>-- 
>John
>When a person has -- whether they knew it or not -- already
>rejected the Truth,

How appropriate.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: [tin] -Z option
#253056
Author: tlvp
Date: Mon, 31 Dec 2012 05:39
20 lines
2138 bytes
On Sun, 30 Dec 2012 17:56:58 -0500, Shmuel Metz wrote:

> In <kboq81$h8p$1@n102.xanadu-bbs.net>, on 12/30/2012
>    at 01:24 AM, "John F. Morse" <john@example.invalid> said:
> 
>>Why is the homedir etched into stone?
> 
> Why is the Moon bigger than the Earth?
> 
>>You are essentially forcing people to toe the line as you see it.
> 
> Not even close.

Hey, Shmuel, be a Mensch, don't just chortle quietly to yourself as you
watch the misunderstandings flying by -- be helpful, set folks straight:
how does one go about redefining the location of the homedir? ... etc.? 

It'd be a Mitzveh for the New Year :-) . Cheers, -- tlvp
-- 
Avant de repondre, jeter la poubelle, SVP.
Re: [tin] -Z option
#253057
Author: Shmuel Metz
Date: Mon, 31 Dec 2012 18:06
26 lines
2804 bytes
In <lakfz7za2cab$.1oic2694tzlwh$.dlg@40tude.net>, on 12/31/2012
   at 12:39 AM, tlvp <mPiOsUcB.EtLlLvEp@att.net> said:

>Hey, Shmuel, be a Mensch, don't just chortle quietly to yourself 
>as you watch the misunderstandings flying by -- be helpful, set 
>folks straight:

Some folks aren't interested in being set straight. If I take the time
to research such questions[1], it will be for the benefit of somebody
who hasn't already insulted those who tried to help him.

>how does one go about redefining the location of the homedir?

By setting TIN_HOMEDIR; the OP does not like how that works.

[1] I've been known to post sample code and excerpts from manuals,
    but I'm particular about whom I'll do that for.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: [tin] -Z option
#253059
Author: John F. Morse
Date: Mon, 31 Dec 2012 20:58
44 lines
2899 bytes
On 12/31/2012 12:06 PM, Shmuel (Seymour J.) Metz wrote:
> In <lakfz7za2cab$.1oic2694tzlwh$.dlg@40tude.net>, on 12/31/2012
>    at 12:39 AM, tlvp <mPiOsUcB.EtLlLvEp@att.net> said:
>
>> Hey, Shmuel, be a Mensch, don't just chortle quietly to yourself 
>> as you watch the misunderstandings flying by -- be helpful, set 
>> folks straight:
> Some folks aren't interested in being set straight. If I take the time
> to research such questions[1], it will be for the benefit of somebody
> who hasn't already insulted those who tried to help him.


Let me attempt to set you straight.

I didn't ask for help. I was reporting a bug. The so-called "maintainer"
didn't want to maintain.

I never insulted him, but you certainly are heaping the insults toward me.

Got that?


>> how does one go about redefining the location of the homedir?
> By setting TIN_HOMEDIR; the OP does not like how that works.
>
> [1] I've been known to post sample code and excerpts from manuals,
>     but I'm particular about whom I'll do that for.


I want Tin to work the way the manual pages said it should work.

Either it should be fixed, or the man page edited to match reality.

Got that?

Don't really care.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: [tin] -Z option
#253060
Author: Shmuel Metz
Date: Tue, 01 Jan 2013 20:26
32 lines
2824 bytes
In <kbsu9g$kla$1@n102.xanadu-bbs.net>, on 12/31/2012
   at 02:58 PM, "John F. Morse" <john@example.invalid> said:

>Let me attempt to set you straight.

ROTF,LMAO!

>The so-called "maintainer" didn't want to maintain.

BS.

>I never insulted him,

Liar.

"You are essentially forcing people to toe the line as you see it."

"I have heard that many times, but I guess you don't understand that I
am NOT STANDARD!"

>Got that?

I got that you don't get it.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
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