Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2002 04:20:30 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Scott Mitchell <scott.mitchell@mail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: PAM, setusercontext, kdm and ports/32273
Message-ID:  <3C53F08E.66E3E4D5@mindspring.com>
References:  <20020126224243.A72777@localhost> <3C534F33.2755EED9@mindspring.com> <20020127115514.A295@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Mitchell wrote:
> > > However, this got me thinking -- is the right solution here to have a PAM
> > > module that does the setusercontext(), so programs that already know about
> > > PAM will just work, without needing to know about setusercontext() as well?
> > > I can see that causing problems with programs (login, xdm, etc.) that
> > > already understand both mechanisms, but they could always not use this
> > > hypothetical pam_setusercontext module, right?
> > >
> > > So, is this a worthwhile thing to have?  I'm happy to either write the PAM
> > > module or fix kdm, but I'd rather not waste my time learning about PAM
> > > internals if people think this would be a pointless exercise.
> >
> > No.  THis is a bad idea.  Fix KDM instead.
> 
> OK, but could you explain *why* you think it's a bad idea?

It adds a side effect that wasn't there before in order to
work around an improper usage of an interface.

It's very bad to add a side effect that changes the API
behaviour into a platform dependent API behaviour.

It's very bad to have side effects, even if they are
documented (look at the effort that is currently going
into wedging an error return value into the external
global "errno" for strtod()'s "0.0" case, in another
thread).

It's very bad to add a complex behaviour that can be
aggregated out of a set of simple behaviours, instead.

It's bad to change an abstraction layer; it's possible
for a program to want to avoid the side effect, and
find itself unable to do so, as well, which would mean
that the interface abstraction itself was damaged by
the change.

Basically, xdm demonstrates that the problem is that
kdm is using the interface wrong, and should be changed
to do what xdm does.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C53F08E.66E3E4D5>