• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pam-auth-plugin
    • None
    • FreeBSD 10.0

      Hi,

      I installed jenkins-1.545, under FreeBSD-10.0RC5.

      For this installation, I enabled a feature which I don't
      normally use. In the configuration setup,
      I enabled security, and used Unix security. This uses the
      PAM plugin for Jenkins.

      I enabled "Matrix security", and created one user "jenkins"
      and gave the user all the permissions.

      The "jenkins" user was already created in /etc/passwd.

      I validated that I could login as "jenkins" from the command-line.

      When I tried to login via the jenkins web interface as "jenkins",
      I saw this error traceback in /var/log/jenkins.log:

      JNA: Callback org.jvnet.libpam.PAM$1@
      66732173 threw the following exception:
      Invalid file format
      at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166)
      at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
      at com.sun.jna.Library$Handler.<init>(Library.java:140)
      at com.sun.jna.Native.loadLibrary(Native.java:366)
      at com.sun.jna.Native.loadLibrary(Native.java:351)
      at org.jvnet.libpam.impl.CLibrary$Instance.init(CLibrary.java:127)
      at org.jvnet.libpam.impl.CLibrary$Instance.access$000(CLibrary.java:124)
      at org.jvnet.libpam.impl.CLibrary.<clinit>(CLibrary.java:122)
      at org.jvnet.libpam.PAM$1.callback(PAM.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
      at com.sun.jna.Library$Handler.<init>(Library.java:140)
      at com.sun.jna.Native.loadLibrary(Native.java:366)
      at com.sun.jna.Native.loadLibrary(Native.java:351)
      at org.jvnet.libpam.impl.CLibrary$Instance.init(CLibrary.java:127)
      at org.jvnet.libpam.impl.CLibrary$Instance.access$000(CLibrary.java:124)
      at org.jvnet.libpam.impl.CLibrary.<clinit>(CLibrary.java:122)
      at org.jvnet.libpam.PAM$1.callback(PAM.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      java:57)
      sorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:622)
      lbackReference.java:394)
      eference.java:424)
      at com.sun.jna.Native.invokeInt(Native Method)
      at com.sun.jna.Function.invoke(Function.java:344)
      at com.sun.jna.Function.invoke(Function.java:276)
      at com.sun.jna.Library$Handler.invoke(Library.java:216)

      and the login failed.

      After further investigation of the source code, it looks like in Jenkins,
      one of the modules
      used in PAM authentication is this one:
      http://libpam4j.kohsuke.org/

      libpam4j has some hardcoded logic about the size
      of certain C data structures such as "struct passwd" gets the logic
      wrong, becaue in FreeBSD, those structures have changed since
      this code was written.

          [JENKINS-21507] libpam4j problem under FreeBSD 10

          Craig Rodrigues created issue -
          R. Tyler Croy made changes -
          Assignee New: R. Tyler Croy [ rtyler ]
          Craig Rodrigues made changes -
          Link New: This issue is related to JENKINS-24521 [ JENKINS-24521 ]
          Craig Rodrigues made changes -
          Assignee Original: R. Tyler Croy [ rtyler ] New: Craig Rodrigues [ rodrigc ]
          Craig Rodrigues made changes -
          Link New: This issue is related to JENKINS-24527 [ JENKINS-24527 ]
          Craig Rodrigues made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 153373 ] New: JNJira + In-Review [ 194564 ]

            rodrigc Craig Rodrigues
            rodrigc Craig Rodrigues
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: