[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: An interference between PAM and other libraries [was: Linux-PAM and syslog]



On Fri, 27 Mar 1998, Savochkin Andrey Vladimirovich wrote:

> Being an application developer we should assume the worst behavior
> from PAM library and modules and reopen syslog and do other things
> which protect our application from unexpected behavior of other libraries.

How would you feel if your own libs developed for "the appplication" would
do soemthing like that do you ?

You can't be possibly advocating this "Oops, I just called a function from
a library, I'd better re-open syslog, check the status of stdin, stdout
and stderr to be sure they have the values I expect, do a seek on file
descriptor N to be sure that the library didn't mess with it, etc."

Don't get me wrong, I am only advocating that Linux-PAM should be as
transparent to any application as possible.

Especially when one can do syslog(LOG_DAEMON|LOG_ALERT, message) without
the need to call openlog() to change facility. Please, somebody shoot me
down and tell me that not having any openlog() and closelog() calls in the
Linux-PAM modules is a wrong thing.

> I spoke about reopening syslog after PAM calls seriously.

That's a hack. Once we start doing that kind of stuff we will never stop.
Besides, you're talking with a lazy bastard now that just happen not to
like the idea of modifying all the pam patches in our packages to reopen
the syslog.

> Any coder is responsible for the code that he writes.

Exactly. And I, as a coder, don't want any library to mess with my program
state.

Best wishes,

Cristian
--
----------------------------------------------------------------------
Cristian Gafton   --   gafton@redhat.com   --   Red Hat Software, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 UNIX is user friendly. It's just selective about who its friends are.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []