[PATCH 4/4] Send a USER_LOGIN event like other Linux login programs do.

Gaetan Nadon memsize at videotron.ca
Fri Aug 12 13:25:42 PDT 2011


On Fri, 2011-08-12 at 16:28 +0200, Matěj Cepl wrote:

> Dne 12.8.2011 04:23, Gaetan Nadon napsal(a):
> > Thanks for your patience. I noticed that the log to audit will only work
> > if PAM is available.
> > When a user configures --with-libaudit but PAM is not installed, Linux
> > Audit won't work
> > and there is no way for the user to figure out why. I'll figure out an
> > additional check tomorrow
> > and post it. The configuration should abort if libaudit is requested
> > (=yes) but libpam is missing.
> 
> Wouldn't libaudit fail anyway when -lpam is not present (from the 
> previous test) in LIBS? Or is the problem missing explicit message for 
> (very unlikely) situation when user requires libaudit but doesn't have PAM?

I found this out by testing. I did not have PAM installed. The statement

        AC_CHECK_LIB(audit, audit_log_user_message ...

emits the following configure test:

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
        /* end confdefs.h.  */
        
        /* Override any GCC internal prototype to avoid an error.
           Use char because int might match the return type of a GCC
           builtin and then its argument prototype would still apply.  */
        #ifdef __cplusplus
        extern "C"
        #endif
        char audit_log_user_message ();
        int
        main ()
        {
        return audit_log_user_message ();
          ;
          return 0;
        }
        _ACEOF


The pam library is not needed for the test to be successful.


None of the pam or libaudit are installed by defaults on My Debian based
distro. PAM is not a prerequisite for libaudit either. An extra check
with an appropriate message would be helpful. I'll propose something,
testing is time consuming.



> What do you think?
> 
> Matěj
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110812/c25936dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110812/c25936dd/attachment.pgp>


More information about the xorg-devel mailing list