Marco van Wieringen wrote:
...
>> 4) POSIX and other prohibit libsldap from exposing many external behaviors
>>
>>
> If thats so shouldn't you never use syslog to be honest. I thought about
> that too today. Any program that does propper syslogging would now
> endup getting inserted LDAP debug messages and errors into their
> logstream. But then how do you send errors to any log. This is the whole
> thing with syslog having only one filedescriptor etc. You cannot do
> an openlog in your code too.

syslog, being a libc API, obeys the same rules and does not keep
fd's open.  Openlog is not used in libsldap so an fd is not allocated
there either.

The use of syslog was approved for use by libsldap in the original Native
LDAP phase 1 project (PSARC/1998/381) [Solaris 8 timeframe].


>> However the proposed solution is currently not architecturally sound.
>>
>> That is, it would have to be ARCd (adding new environment variables to
>> solaris requires ARC) and it would be summarily rejected because
>> environment variables of this nature that impact the whole system are
>> scrutinized with great care, generally prohibited and secondly, an
>> environment variable that can impact the log level of every running
>> application in the system would not be permitted.  For one, POSIX
>> does not allow libc calls from APIs such as gethostbyname to change
>> log levels unbenownst to the application, under any circumstance.
>>
> As said above we can just kill those 3 lines of code. Then we don't
> change any upperlevels. I think doing something like this is also
> an ARC change right ?
> 
> In ns_internal.h
> 
> #define LDAP_TRACE_FILE         "/var/ldap/ldap_trace_enabled"

Just as with adding an environment variable, adding a file has the same issues.

1) it would have to be ARCd, and dtrace being the better solution would
get this new file rejected as architecturally unfit.

2) It goes against the architecturally approved syslog behavior

3) One of the points of Duckwater is to get rid of the files in /var/ldap so
adding a new file is not in line with our current directions.  Since we have 
already
announced our intentions to get rid of /var/ldap files, adding new ones
would not fall in line with our current stated directions.

Again, the right direction is in the promotion of syslog messages to LOG_INFO
as necessary and dtrace moving forward.

Doug.

Reply via email to