small issue with lock_author_names

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Dec 27 21:48:04 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/12/07 05:07 AM, Wolfgang Barth wrote:
> On Wed, Dec 26, 2007 at 06:38:39PM -0800, local.coder wrote:
>> The username comes from two different places on that web page.
>> For the top header it's a simple read of the string from the authdata. 
> ...
>> in cmd.c Author for the form portion is set through a multi-step process.
> ...
>> And comment_author is set earlier in the c file by.
>>    /* get name to use for author */
>>         if(lock_author_names==TRUE){
>>                 temp_contact=find_contact(current_authdata.username);
>>                 if(temp_contact!=NULL && temp_contact->alias!=NULL)
>>                         comment_author=temp_contact->alias;
>>                 else
>>                         comment_author=current_authdata.username;
>>                 }
> 
> Okay, that's the point. The authors name comes from contact->alias, may be
> this is what Ethan intends. The manpage configcgi.html#lock_author_names
> is not really clear and should mention that the alias and not the contact
> name is used there.
> 
> What is about the following:
> 
> lock_author_names=1 -> contact->alias
> lock_author_names=2 -> contact->name

Why would you want that? You can have the alias being the same as the
name; after all it's just a string with no real other purpose. The idea,
though, is to have the real name displayed instead of the login name.

A cleaner solution would be not to require an alias in contact
definitions. Without an alias defined it will use the user name.

In our systems we went as far as pulling the name (among others) out of
AD and generate the contact files automatically. If anyone is interested
I could put the scripts on NagiosCommunity.org. Those are Perl scripts
so anyone with a bit of Perl and LDAP knowledge can pull anything out of
AD and put it in the config if they need anything else.

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHdA+E6dZ+Kt5BchYRAp5iAKDmJS6WgDqmDKjt4wgAjF73YwANKACgrJ8o
DzytWVlUNfkEr+hIdRvNLbk=
=7pK6
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list