🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #55563

Re: Is there a hack to support paswords that contain spaces?

#55563
From: Andrew - Supernews
Date: Sun, 09 Dec 2001 09:12
23 lines
2136 bytes
In article <ylzo4t2fci.fsf@windlord.stanford.edu>, Russ Allbery wrote:
> The right thing to do is probably to pass every function both the raw
> command line and the Argify'd command line in case it needs the raw one;
> that way nothing has to be special-cased but there isn't massive code
> duplication.  Still kind of ugly, though.

You'll find that this is a pain, because you've probably argified the
original command line in place by nulling out the whitespace. (Ok, so I
haven't looked at INN's nnrpd much lately so I'm guessing.)

What I actually do (though I've not actually set this up for AUTHINFO PASS,
mainly because it's never seemed to be an issue before) is have a flag
in the command table which says whether the command needs to be argified;
if not, I just pass the whole argument string as argv[1].

Perhaps an even better solution would be to use a number instead of that
flag, giving the number of words to argify, with any remaining text left
as the last argument.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID: <slrna16ao4.23i3.andrew+nonews@trinity.supernews.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <9urfpi$7vi$1@teta.doit.wisc.edu> <ylwuzybpvz.fsf@windlord.stanford.edu> <1007846386.132947@ok-corral.gunslinger.net> <ylg06l5r1p.fsf@windlord.stanford.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrna16ao4.23i3.andrew+nonews@trinity.supernews.net>
Subject: Re: Is there a hack to support paswords that contain spaces?
Date: Sun, 09 Dec 2001 09:12:36 -0000
From: andrew+nonews@supernews.com (Andrew - Supernews)
References: <9urfpi$7vi$1@teta.doit.wisc.edu> <ylwuzybpvz.fsf@windlord.stanford.edu> <1007846386.132947@ok-corral.gunslinger.net> <ylg06l5r1p.fsf@windlord.stanford.edu> <9uuko7$br8$1@marduk.litech.org> <ylzo4t2fci.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.nntp
Organization: Posted via Supernews, http://www.supernews.com
Reply-To: andrew@supernews.com
User-Agent: slrn/0.9.7.1 (FreeBSD)
X-Complaints-To: newsabuse@supernews.com
Lines: 22