null pointer problem in nnrpd.c at line 919

Keith Lewis keithl at mukluk.cc.monash.edu.au
Wed Feb 9 02:10:55 UTC 2000


-----BEGIN PGP SIGNED MESSAGE-----

Hi Folks,

	I have a problem with a change that was made to nnrpd.c:

    if (innconf->readertrack)
        innconf->readertrack=TrackClient(ClientHost,Username);

	has become 

    if (PERMaccessconf->readertrack)
        PERMaccessconf->readertrack=TrackClient(ClientHost,Username);

	and similar things for the next few lines.

	This doesn't seem to me to be a good idea.

	Basically on startup, nnrpd calls StartConnection which 
calls PERMgetaccess and PERMgetpermissions.  (These seem to me to be poor
names btw, since PERMgetaccess is involved with *auth* realms in readers.conf
and PERMgetpermissions is involved with *access* realms.  Very confusing.)

	Normally PERMgetaccess will setup success_auth and then
PERMgetpermissions will set up PERMaccessconf = access_realms[i];

	But there is another possibility.  PERMgetaccess can return 
PERMneedauth, in which case PERMaccessconf does virtually nothing, since
success_auth is still NULL.

	The intention here is to force the user to do a `authinfo ...'
command, which jumps into command.c which will belatedly do the PERMgetaccess 
and PERMgetpermissions, or something similar.

	But it can't get there with the current code since nnrpd tries to
access PERMaccessconf which is also still null.

	(This is based on code I fetched this morning (0:0:0-9Feb2000GMT) with
httpsync @http://www.mibsoftware.com/userkt/inn/dev/inn2.0-beta/pack101.lst).

	I can see several ways around this, but I'd like to know exactly what
is going on before trying to fix it.  

	The reason I'm looking at this code, apart from trying to make it
work, is that I have a set of patches that enable access realms to `callout'
to separate programs in the same way that auth realms do, and I was going to
check they apply to the latest code before submitting them.

	Can anyone enlighten me please?

Keith

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBOKDMr3EpE0nRVDfpAQHsXQQApgSMccFfxL/MnNpf8mDEgLHnK7Kg19xr
39y3cg+2xz5C/PqDa8mvYiFTt/pwki5UgNPF4i/sENgsoY8SkyWFXcfFb7zgIpG5
wIcxl9G5X/vV9RvHEiqzRNj+BcWfySghF5Ui7amfAwza1cCJ+obkjt8VRZoqM9JK
PsaFbIPH7O8=
=rgM4
-----END PGP SIGNATURE-----



More information about the inn-workers mailing list